}
void SingleBlurPassEffect::set_gl_state(GLuint glsl_program_num, const string &prefix, unsigned *sampler_num)
}
void SingleBlurPassEffect::set_gl_state(GLuint glsl_program_num, const string &prefix, unsigned *sampler_num)
//
// We pack the parameters into a float4: The relative sample coordinates
// in (x,y), and the weight in z. w is unused.
//
// We pack the parameters into a float4: The relative sample coordinates
// in (x,y), and the weight in z. w is unused.
- samples[4 * 0 + 0] = 0.0f;
- samples[4 * 0 + 1] = 0.0f;
- samples[4 * 0 + 2] = weight[0];
- samples[4 * 0 + 3] = 0.0f;
+ samples[2 * 0 + 0] = 0.0f;
+ samples[2 * 0 + 1] = weight[0];
float offset, total_weight;
combine_two_samples(w1, w2, &offset, &total_weight, NULL);
float offset, total_weight;
combine_two_samples(w1, w2, &offset, &total_weight, NULL);
- samples[4 * i + 0] = x;
- samples[4 * i + 1] = y;
- samples[4 * i + 2] = total_weight;
- samples[4 * i + 3] = 0.0f;
+ samples[2 * i + 1] = total_weight;
- set_uniform_vec4_array(glsl_program_num, prefix, "samples", samples, NUM_TAPS / 2 + 1);
+ set_uniform_vec2_array(glsl_program_num, prefix, "samples", samples, NUM_TAPS / 2 + 1);