namespace GL {
ColorCurve::ColorCurve(Resources &resources):
- shprog(resources.get<Program>("_colorcurve.glsl")),
+ shprog(resources.get<Program>("_colorcurve.glsl.shader")),
quad(resources.get<Mesh>("_fullscreen_quad.mesh")),
linear_sampler(resources.get<Sampler>("_linear_clamp.samp")),
nearest_sampler(resources.get<Sampler>("_nearest_clamp.samp"))
{
- shdata.uniform("source", 0);
- shdata.uniform("curve", 1);
-
curve.storage(LUMINANCE8, 256, 1);
- texturing.attach(1, curve, &linear_sampler);
set_exposure_adjust(0.0f);
set_brightness_response(0.4f);
void ColorCurve::render(Renderer &renderer, const Texture2D &color_buf, const Texture2D &)
{
- texturing.attach(0, color_buf, &nearest_sampler);
-
Renderer::Push push(renderer);
renderer.set_shader_program(&shprog, &shdata);
- renderer.set_texturing(&texturing);
+ renderer.set_texture("source", &color_buf, &nearest_sampler);
+ renderer.set_texture("curve", &curve, &linear_sampler);
quad.draw(renderer);
}