aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-03-10 21:59:56 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-03-10 22:00:45 +0100
commit214c32a5475ec302b0caa837ea4d241ece263174 (patch)
tree9dee7eadaf833bd97d5a31448110bb74e940b98c /src/main.cpp
parentf32b8f50f5d826c9bb8c6cd78a9f69ffe787fa69 (diff)
Fix TAA to have infinite accumulation
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d541bb6..fd582a5 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 = 100;
+ const uint32_t samples_per_pixel = 25;
window wnd { width , height };
@@ -179,14 +179,9 @@ int main() {
if (canRender) {
renderer.begin_frame();
- if (((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->sample_index < samples_per_pixel) {
- bool clear = ((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->sample_index == 0;
- renderer.compute(width, height, clear, true);
+ renderer.compute(width, height);
- ((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->sample_index++;
- } else {
- renderer.compute(width, height, false, false);
- }
+ ((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->sample_index++;
renderer.ui();