summaryrefslogtreecommitdiffstats
path: root/Components/src/ShadowMapManager.cpp
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-02-09 02:50:02 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-02-09 02:50:02 +0000
commit5fc7f4fc7e8cd8c61e29f61f80a044f58cde333f (patch)
treedc42a5c710e84c8c9465a711514a41a4abdfabe1 /Components/src/ShadowMapManager.cpp
parentFixed 32-bit build issue (diff)
downloadDiligentFX-5fc7f4fc7e8cd8c61e29f61f80a044f58cde333f.tar.gz
DiligentFX-5fc7f4fc7e8cd8c61e29f61f80a044f58cde333f.zip
Added RightHandedLightViewTransform parameter to DistributeCascadeInfo
Diffstat (limited to 'Components/src/ShadowMapManager.cpp')
-rw-r--r--Components/src/ShadowMapManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Components/src/ShadowMapManager.cpp b/Components/src/ShadowMapManager.cpp
index 10ec39f..404f3e3 100644
--- a/Components/src/ShadowMapManager.cpp
+++ b/Components/src/ShadowMapManager.cpp
@@ -170,7 +170,7 @@ void ShadowMapManager::DistributeCascades(const DistributeCascadeInfo& Info,
LightSpaceY = cross(LightSpaceZ, LightSpaceX);
LightSpaceX = cross(LightSpaceY, LightSpaceZ);
LightSpaceX = normalize(LightSpaceX);
- LightSpaceY = normalize(LightSpaceY);
+ LightSpaceY = normalize(LightSpaceY) * (Info.RightHandedLightViewTransform ? +1.f : -1.f);
float4x4 WorldToLightViewSpaceMatr =
float4x4::ViewFromBasis(LightSpaceX, LightSpaceY, LightSpaceZ);