Showing the changes to libraries/render-utils/src/RenderShadowTask.cpp (1 of 3 files). Show all
Unified · Split
| @@ -146,9 +146,9 @@ void RenderShadowTask::run(const SceneContextPointer& sceneContext, const render · 145 unmodified lines | ||
| 146 | 146 | RenderArgs::RenderMode mode = args->_renderMode; |
| 147 | 147 | |
| 148 | 148 | auto nearClip = viewFrustum->getNearClip(); |
| 149 | − const int SHADOW_NEAR_DEPTH = -2; | |
| 149 | + float nearDepth = -args->_boomOffset.z; | |
| 150 | 150 | const int SHADOW_FAR_DEPTH = 20; |
| 151 | − globalLight->shadow.setKeylightFrustum(viewFrustum, nearClip + SHADOW_NEAR_DEPTH, nearClip + SHADOW_FAR_DEPTH); | |
| 151 | + globalLight->shadow.setKeylightFrustum(viewFrustum, nearDepth, nearClip + SHADOW_FAR_DEPTH); | |
| 152 | 152 | |
| 153 | 153 | // Set the keylight render args |
| 154 | 154 | args->_viewFrustum = globalLight->shadow.getFrustum().get(); |