aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-08-08 23:01:44 +0200
committerladevieq <ladevie.quentin@gmail.com>2021-08-08 23:01:44 +0200
commit03fdcb0341d35bb99fccb2e155ee967f932c9961 (patch)
treee318a2e755556b299009dd84230705a3f4432efc /src/main.cpp
parentdb6adfebe08027a49c6b2204683a2b9f3527cd64 (diff)
Bindless compute pipelines
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 83d460a..8d79000 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -217,6 +217,9 @@ int main() {
}
ImGui::SliderInt("bounces", (int32_t*)&((scene*) renderer.scene_buffer_ptr())->meta.max_bounce, 1, 250);
+ if (ImGui::SliderInt("downscale factor", (int32_t*)&((scene*) renderer.scene_buffer_ptr())->meta.downscale_factor, 1, 32)) {
+ reset_accumulation = true;
+ }
if (ImGui::Checkbox("debug bvh", (bool*)&((scene*) renderer.scene_buffer_ptr())->meta.debug_bvh)) {
reset_accumulation = true;
@@ -240,7 +243,8 @@ int main() {
renderer.reset_accumulation();
}
- renderer.compute(width, height);
+ float scale = (float)((scene*) renderer.scene_buffer_ptr())->meta.downscale_factor;
+ renderer.compute(width / scale, height / scale);
((scene*) renderer.scene_buffer_ptr())->meta.sample_index++;