#include "effect_chain.h"
#include "util.h"
#include "widgets.h"
-#include "texture_enum.h"
unsigned char result[WIDTH * HEIGHT * 4];
float radius = 0.3f;
float inner_radius = 0.3f;
-
+
void update_hsv(Effect *lift_gamma_gain_effect, Effect *saturation_effect)
{
RGBTriplet lift(0.0f, 0.0f, 0.0f);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glBindTexture(GL_TEXTURE_2D, SOURCE_IMAGE);
- check_error();
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- check_error();
-
unsigned img_w, img_h;
unsigned char *src_img = load_image("blg_wheels_woman_1.jpg", &img_w, &img_h);
Effect *lift_gamma_gain_effect = chain.add_effect(EFFECT_LIFT_GAMMA_GAIN);
Effect *saturation_effect = chain.add_effect(EFFECT_SATURATION);
Effect *vignette_effect = chain.add_effect(EFFECT_VIGNETTE);
+ //chain.add_effect(EFFECT_MIRROR);
chain.add_output(inout_format);
chain.finalize();
update_hsv(lift_gamma_gain_effect, saturation_effect);
vignette_effect->set_float("radius", radius);
vignette_effect->set_float("inner_radius", inner_radius);
+ //vignette_effect->set_vec2("center", (float[]){ 0.7f, 0.5f });
chain.render_to_screen(src_img);
glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB, 1);