diff --git a/src/nodes/functions/material/getParallaxCorrectNormal.js b/src/nodes/functions/material/getParallaxCorrectNormal.js index 8f82bc8a1bbaaa..e525b00200dc0a 100644 --- a/src/nodes/functions/material/getParallaxCorrectNormal.js +++ b/src/nodes/functions/material/getParallaxCorrectNormal.js @@ -1,4 +1,4 @@ -import { positionWorld } from '../../accessors/Position'; +import { positionWorld } from '../../accessors/Position.js'; import { float, Fn, min, normalize, sub, vec3 } from '../../tsl/TSLBase.js'; // https://devlog-martinsh.blogspot.com/2011/09/box-projected-cube-environment-mapping.html diff --git a/src/renderers/common/RenderObjects.js b/src/renderers/common/RenderObjects.js index 26dffcece2979a..ca38e03af93946 100644 --- a/src/renderers/common/RenderObjects.js +++ b/src/renderers/common/RenderObjects.js @@ -40,9 +40,12 @@ class RenderObjects { renderObject.updateClipping( clippingContext ); - if ( renderObject.version !== material.version || renderObject.needsUpdate ) { + // force update if geometry has changed + const forceUpdate = renderObject.geometry.id !== renderObject.object.geometry.id; - if ( renderObject.initialCacheKey !== renderObject.getCacheKey() ) { + if ( forceUpdate || renderObject.version !== material.version || renderObject.needsUpdate ) { + + if ( forceUpdate || renderObject.initialCacheKey !== renderObject.getCacheKey() ) { renderObject.dispose();