-void SingleBlurPassEffect::set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
+string SingleBlurPassEffect::output_fragment_shader()
+{
+ char buf[256];
+ sprintf(buf, "#define DIRECTION_VERTICAL %d\n#define NUM_TAPS %d\n",
+ (direction == VERTICAL), num_taps);
+ uniform_samples = new float[2 * (num_taps / 2 + 1)];
+ register_uniform_vec2_array("samples", uniform_samples, num_taps / 2 + 1);
+ return buf + read_file("blur_effect.frag");
+}
+
+void SingleBlurPassEffect::set_gl_state(GLuint glsl_program_num, const string &prefix, unsigned *sampler_num)