ソースを参照

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 年 前
コミット
99a459e941
1 ファイル変更7 行追加0 行削除
  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 ) {