Browse Source

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 năm trước cách đây
mục cha
commit
99a459e941
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      src/renderers/WebGLRenderer.js

+ 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 ) {