1 #define GL_GLEXT_PROTOTYPES 1
7 #include "vignette_effect.h"
10 VignetteEffect::VignetteEffect()
15 register_vec2("center", (float *)¢er);
16 register_float("radius", (float *)&radius);
17 register_float("inner_radius", (float *)&inner_radius);
20 std::string VignetteEffect::output_fragment_shader()
22 return read_file("vignette_effect.frag");
25 void VignetteEffect::set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
27 Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
29 set_uniform_float(glsl_program_num, prefix, "inv_radius", 1.0f / radius);
31 Point2D aspect(16.0f / 9.0f, 1.0f); // FIXME
32 set_uniform_vec2(glsl_program_num, prefix, "aspect_correction", (float *)&aspect);