We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86c3bd3 commit ccf979eCopy full SHA for ccf979e
src/renderers/common/RenderObject.js
@@ -729,9 +729,16 @@ class RenderObject {
729
*/
730
getDynamicCacheKey() {
731
732
- // Environment Nodes Cache Key
+ let cacheKey = 0;
733
734
- let cacheKey = this._nodes.getCacheKey( this.scene, this.lightsNode );
+ // `Nodes.getCacheKey()` returns an environment cache key which is no relevant when
735
+ // the renderer is inside a shadow pass.
736
+
737
+ if ( this.material.isShadowNodeMaterial !== true ) {
738
739
+ cacheKey = this._nodes.getCacheKey( this.scene, this.lightsNode );
740
741
+ }
742
743
if ( this.object.receiveShadow ) {
744
0 commit comments