From eaf294dd2eed3423f7f27967fd5441059fd5b809 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 10 Feb 2021 22:21:34 +0100 Subject: Use two images for accumulation (TAA style) --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index c87e57a..9e3634f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,7 +46,7 @@ int main() { const float aspect_ratio = 16.0 / 9.0; uint32_t width = 400; uint32_t height = width / aspect_ratio; - const uint32_t samples_per_pixel = 10; + const uint32_t samples_per_pixel = 25; window wnd { width , height }; @@ -80,6 +80,7 @@ int main() { canRender = true; renderer.recreate_swapchain(); ((input_data*) renderer.compute_shader_buffer.mapped_ptr)->cam.set_aspect_ratio((float)event.width / (float)event.height); + ((input_data*) renderer.compute_shader_buffer.mapped_ptr)->sample_index = 0; } break; } -- cgit v1.3