From 598c9568330278c41645c379b0f0d6f86096624e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 13 Jul 2019 20:41:47 -0700 Subject: Shadow mgr: calling user callback to adjust entire camera z range --- Components/src/ShadowMapManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Components/src/ShadowMapManager.cpp') diff --git a/Components/src/ShadowMapManager.cpp b/Components/src/ShadowMapManager.cpp index e4e3c0d..915bd75 100644 --- a/Components/src/ShadowMapManager.cpp +++ b/Components/src/ShadowMapManager.cpp @@ -114,6 +114,10 @@ void ShadowMapManager::DistributeCascades(const DistributeCascadeInfo& Info, float fMainCamNearPlane, fMainCamFarPlane; Info.pCameraProj->GetNearFarClipPlanes(fMainCamNearPlane, fMainCamFarPlane, IsGL); + if(Info.AdjustCascadeRange) + { + Info.AdjustCascadeRange(-1, fMainCamNearPlane, fMainCamFarPlane); + } for(int i=0; i < MAX_CASCADES; ++i) shadowMapAttribs.fCascadeCamSpaceZEnd[i] = +FLT_MAX; -- cgit v1.2.3