void pass_positions::pass_reset() { EPS_STATE_SAMPLER_0(texture_displacement_.get_product()); EPS_STATE_PROGRAM(program_reset_.get_product()); program_reset_.uniform_value(utils::to_int(reset_enum::u_displacement), 0); square_.render(program_reset_, utils::to_int(reset_enum::a_vertex_xy)); }
void gradient::process(float) { EPS_STATE_SAMPLER_0(get_inputs().get_slot(pass_input_slot::input_0)); EPS_STATE_PROGRAM(program_.get_product()); program_.uniform_value(utils::to_int(program_enum::u_source), 0); program_.uniform_value(utils::to_int(program_enum::u_color_1), color_1_); program_.uniform_value(utils::to_int(program_enum::u_color_2), color_2_); square_.render(program_, utils::to_int(program_enum::a_vertex_xy), utils::to_int(program_enum::a_vertex_uv)); }
void pass_positions::pass_process(float dt) { EPS_STATE_SAMPLER_0(get_inputs().get_product()); EPS_STATE_SAMPLER_1(get_inputs().get_slot(rendering::pass_input_slot::input_0)); EPS_STATE_PROGRAM(program_process_.get_product()); program_process_.uniform_value(utils::to_int(process_enum::u_positions), 0); program_process_.uniform_value(utils::to_int(process_enum::u_velocities), 1); program_process_.uniform_value(utils::to_int(process_enum::u_dt), dt); square_.render(program_process_, utils::to_int(process_enum::a_vertex_xy)); }
void pass_particles::process(float) { EPS_STATE_BLEND(GL_SRC_ALPHA, GL_ONE); EPS_STATE_SAMPLER_0(get_inputs().get_slot(rendering::pass_slot::slot_0)); EPS_STATE_VERTICES(product_index_.get_product()); EPS_STATE_PROGRAM(program_.get_product()); program_.attribute_array_enable(utils::to_int(product_enum::a_product_uv)); program_.attribute_array(utils::to_int(product_enum::a_product_uv), 0, 2, 0); program_.uniform_value(utils::to_int(product_enum::u_positions), 0); glDrawArrays(GL_POINTS, 0, product_index_.get_product_count()); }
void pass_fire::process(float) { EPS_STATE_SAMPLER_0(get_inputs().get_slot(rendering::pass_input_slot::input_0)); EPS_STATE_SAMPLER_1(texture_background_.get_product()); EPS_STATE_PROGRAM(program_.get_product()); program_.uniform_value(utils::to_int(program_enum::u_fire), 0); program_.uniform_value(utils::to_int(program_enum::u_background), 1); program_.uniform_value(utils::to_int(program_enum::u_texel), texel_); square_.render(program_, utils::to_int(program_enum::a_vertex_xy), utils::to_int(program_enum::a_vertex_uv)); }
void tone::process(float) { EPS_STATE_SAMPLER_0(get_inputs().get_slot(pass_slot::slot_0)); EPS_STATE_SAMPLER_1(get_inputs().get_slot(pass_slot::slot_1)); EPS_STATE_PROGRAM(program_.get_product()); program_.uniform_value(utils::to_int(program_enum::u_source_0), 0); program_.uniform_value(utils::to_int(program_enum::u_source_1), 1); program_.uniform_value(utils::to_int(program_enum::u_exposure), exposure_); program_.uniform_value(utils::to_int(program_enum::u_gamma), gamma_); square_.render(program_, utils::to_int(program_enum::a_vertex_xy), utils::to_int(program_enum::a_vertex_uv)); }