From cdacb4110b8a4cc137dc8030c962032748e8b786 Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Sun, 25 Oct 2026 14:53:06 +0100 Subject: [PATCH] Vulkan ray tracing: test the gathered scene around the camera, not the world origin --- rendering/vulkan14/vulkan14frame.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rendering/vulkan14/vulkan14frame.cpp b/rendering/vulkan14/vulkan14frame.cpp index 07e5f8fd..d4d6450d 100644 --- a/rendering/vulkan14/vulkan14frame.cpp +++ b/rendering/vulkan14/vulkan14frame.cpp @@ -1244,6 +1244,8 @@ void vulkan14_renderer::setup_pass(viewport_config &Viewport, renderpass_config // going to the world around the camera; a box of the range of the rays stands for the frustum auto const range{Global.gfx_raytracing_range}; camera.position() = m_colorpass.pass_camera.position(); + // the frustum is tested in the world, the draws keep only the rotation of the view (none here) + viewmatrix = glm::translate(viewmatrix, -camera.position()); camera.projection() = ortho_projection(-range, range, -range, range, -range, range); frustumtest_proj = ortho_frustumtest_projection(-range, range, -range, range, -range, range); Config.draw_range = range;