From 8786cb3da3df93e691fb1be85998b5f4f42bba20 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Tue, 9 Mar 2021 22:21:12 +0100 Subject: Fix taa --- shaders/compute.comp | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shaders/compute.comp b/shaders/compute.comp index 4ee0a69..411c520 100644 --- a/shaders/compute.comp +++ b/shaders/compute.comp @@ -229,5 +229,5 @@ void main() { float spp_scale = (1.0 / samples_per_pixel); vec4 acc_color = imageLoad(accumulation_image, ivec2(x, y)); - imageStore(output_image, ivec2(x, y), mix(out_color, acc_color, spp_scale)); + imageStore(output_image, ivec2(x, y), acc_color + out_color * spp_scale); } diff --git a/src/main.cpp b/src/main.cpp index d581c9f..d541bb6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -47,7 +47,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 = 25; + const uint32_t samples_per_pixel = 100; window wnd { width , height }; -- cgit v1.3