aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-05-16 21:35:47 +0200
committerladevieq <ladevie.quentin@gmail.com>2021-05-16 21:35:47 +0200
commitb715df2c21dbb8656fc01d5a64605ac18cb5c6e4 (patch)
treecf99f55f9fd4efb647f4c6826648876410f2cfb8 /src/main.cpp
parenta7707f730cd28853dc750b72ec882f07dba85406 (diff)
Wip BVH + BVH debugging tools
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 071903a..19b7b54 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -103,8 +103,8 @@ int main() {
}
case EVENT_TYPES::KEY_PRESS: {
auto move_speed = 0.01f * delta_time;
- if (wnd.keyboard[KEYS::LSHIFT] || wnd.keyboard[KEYS::RSHIFT]) {
- move_speed *= 2.f;
+ if (wnd.keyboard[KEYS::LSHIFT] || wnd.keyboard[KEYS::RSHIFT] || wnd.keyboard[KEYS::SHIFT]) {
+ move_speed *= 10.f;
}
vec3 move_vec {};
@@ -126,6 +126,14 @@ int main() {
move_vec = -((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->cam.right.unit() * move_speed;
break;
}
+ case KEYS::SPACE: {
+ move_vec = ((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->cam.up.unit() * move_speed;
+ break;
+ }
+ case KEYS::CTRL: {
+ move_vec = -((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->cam.up.unit() * move_speed;
+ break;
+ }
default:
break;
}
@@ -183,6 +191,10 @@ int main() {
ImGui::SliderInt("bounces", (int32_t*)&((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->max_bounce, 2, 250);
+ if (ImGui::Checkbox("debug bvh", (bool*)&((input_data*) renderer.compute_shader_buffer.alloc_info.pMappedData)->debug_bvh)) {
+ reset_accumulation = true;
+ }
+
ImGui::End();
ImGui::EndFrame();
@@ -226,6 +238,7 @@ int main() {
// write_color(std::cout, output_image[index]);
// }
+
std::cerr << "Done !" << std::endl;
return 0;