2
0
Эх сурвалжийг харах

Add the shadow map and matrix uniforms to markUniformsLightsNeedsUpdate (#23559)

* Add the shadow map and matrix uniforms to the markUniformsLightsNeedsUpdate function

This reduces redundent uniform setting when using shadows.

* Linter fix
Scott Nagy 3 жил өмнө
parent
commit
99a459e941

+ 7 - 0
src/renderers/WebGLRenderer.js

@@ -1771,6 +1771,13 @@ function WebGLRenderer( parameters = {} ) {
 		uniforms.rectAreaLights.needsUpdate = value;
 		uniforms.hemisphereLights.needsUpdate = value;
 
+		uniforms.directionalShadowMap.needsUpdate = value;
+		uniforms.directionalShadowMatrix.needsUpdate = value;
+		uniforms.spotShadowMap.needsUpdate = value;
+		uniforms.spotShadowMatrix.needsUpdate = value;
+		uniforms.pointShadowMap.needsUpdate = value;
+		uniforms.pointShadowMatrix.needsUpdate = value;
+
 	}
 
 	function materialNeedsLights( material ) {