mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 16:40:21 +01:00
Vulkan ray tracing: test the gathered scene around the camera, not the world origin
This commit is contained in:
@@ -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
|
// 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};
|
auto const range{Global.gfx_raytracing_range};
|
||||||
camera.position() = m_colorpass.pass_camera.position();
|
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);
|
camera.projection() = ortho_projection(-range, range, -range, range, -range, range);
|
||||||
frustumtest_proj = ortho_frustumtest_projection(-range, range, -range, range, -range, range);
|
frustumtest_proj = ortho_frustumtest_projection(-range, range, -range, range, -range, range);
|
||||||
Config.draw_range = range;
|
Config.draw_range = range;
|
||||||
|
|||||||
Reference in New Issue
Block a user