Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"globals": "^17.0.0",
"jpeg-js": "^0.4.4",
"jsdoc": "^4.0.5",
"magic-string": "^0.30.0",
"magic-string": "^1.0.0",
"pngjs": "^7.0.0",
"puppeteer": "^25.0.0",
"rollup": "^4.6.0",
Expand Down
13 changes: 10 additions & 3 deletions src/materials/nodes/manager/NodeMaterialObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,24 +730,31 @@ class NodeMaterialObserver {

const { renderId } = nodeFrame;

let force = false;

// shared UBOs are potentially never updated when objects don't change. Below block
// make sure these UBOs are updated at least once.

if ( this.renderId !== renderId ) {

this.renderId = renderId;

return true;
// no early out here. instead, force the render object to use the equals() code path so its internal cache state gets synched

force = true;

}

const isStatic = renderObject.object.static === true;
const isBundle = renderObject.bundle !== null && renderObject.bundle.static === true && this.getRenderObjectData( renderObject ).version === renderObject.bundle.version;

if ( isStatic || isBundle )
return false;
return force;

const lightsData = this.getLights( renderObject.lightsNode, renderId );
const notEqual = this.equals( renderObject, lightsData, renderId ) !== true;

return notEqual;
return ( force || notEqual );

}

Expand Down
Loading