Browse Source

Fix behavior where shadowMode is None but the shadow display because cascade is enabled. We keep the choice to turn all cascadeShadows enabled to be dynamic because we can't handle static nor mixed cascadeShadows.

borisrp 2 weeks ago
parent
commit
08c86ecfb9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hrt/prefab/Light.hx

+ 1 - 1
hrt/prefab/Light.hx

@@ -237,7 +237,7 @@ class Light extends Object3D {
 						cs.transitionFraction = transitionFraction;
 						cs.debugShader = debugShader;
 						cs.blur.radius = 0.0;
-						cs.mode = Dynamic;
+						cs.mode = shadows.mode == None ? None : Dynamic;
 						params.resize(cascadeNbr);
 						for ( i in 0...params.length )
 							if ( params[i] == null )