From d13e05b5f3e3c9467f3d01ac7782092aafd7ecbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Mon, 27 Dec 2021 00:13:16 +0100 Subject: [PATCH] lightshaft fix when camera is far from origin --- WickedEngine/wiRenderPath3D.cpp | 2 +- WickedEngine/wiVersion.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WickedEngine/wiRenderPath3D.cpp b/WickedEngine/wiRenderPath3D.cpp index b7f58ae67..14b0f8ca6 100644 --- a/WickedEngine/wiRenderPath3D.cpp +++ b/WickedEngine/wiRenderPath3D.cpp @@ -1226,7 +1226,7 @@ void RenderPath3D::RenderLightShafts(CommandList cmd) const // Radial blur on the sun: { - XMVECTOR sunPos = XMVector3Project(sunDirection * 100000, 0, 0, + XMVECTOR sunPos = XMVector3Project(camera->GetEye() + sunDirection * camera->zFarP, 0, 0, 1.0f, 1.0f, 0.1f, 1.0f, camera->GetProjection(), camera->GetView(), XMMatrixIdentity()); { diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 4a4a88548..bc0f4642b 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 60; // minor bug fixes, alterations, refactors, updates - const int revision = 7; + const int revision = 8; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);