diff --git a/examples/deferred.cpp b/examples/deferred.cpp index ab85c676..a77b76d2 100644 --- a/examples/deferred.cpp +++ b/examples/deferred.cpp @@ -296,7 +296,7 @@ void deferred_app::on_resize(int width, int height) app::on_resize(width, height); camera.set_fov(camera.fov_y, static_cast(width) / height); - pre_gamma_texture.load({width, height}); + pre_gamma_texture.load>({width, height}); pre_gamma_framebuffer.color(pre_gamma_texture); pre_gamma_framebuffer.assert_complete(); @@ -404,8 +404,8 @@ void deferred_app::render() auto & l = options.point_lights.emplace_back(); l.color = {15.f, 15.f, 15.f}; - l.position = {std::cos(a) * 10.f, std::sin(a) * 10.f, 0.5f}; - l.attenuation = {1.f, 0.5f, 1.f}; + l.position = {std::cos(a) * 9.f, std::sin(a) * 9.f, 0.5f}; + l.attenuation = {0.f, 0.f, 10.f}; } for (auto const & l : options.point_lights) @@ -424,6 +424,7 @@ void deferred_app::render() float const gamma = 2.2f; options.max_intensity = 20.f; + options.min_intensity = options.max_intensity / std::pow(8.f, gamma); gfx::framebuffer::null().bind(); gl::DrawBuffer(gl::BACK);