3 #include "vignette_effect.h"
7 VignetteEffect::VignetteEffect()
12 register_vec2("center", (float *)¢er);
13 register_float("radius", (float *)&radius);
14 register_float("inner_radius", (float *)&inner_radius);
17 std::string VignetteEffect::output_fragment_shader()
19 return read_file("vignette_effect.frag");
22 void VignetteEffect::set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num)
24 Effect::set_gl_state(glsl_program_num, prefix, sampler_num);
26 set_uniform_float(glsl_program_num, prefix, "inv_radius", 1.0f / radius);
28 Point2D aspect(16.0f / 9.0f, 1.0f); // FIXME
29 set_uniform_vec2(glsl_program_num, prefix, "aspect_correction", (float *)&aspect);