-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
Closed
Labels
Milestone
Description
Description
it will cause an error when setting a uniform value specific to MeshDistanceMaterial: Cannot read properties of undefined (reading 'value') at https://github.com/mrdoob/three.js/blob/master/src/renderers/webgl/WebGLMaterials.js#L665
that is because the node builder overwrites it here: https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.js#L96
which happens because of this: https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/webgl/nodes/WebGLNodes.js#L13
the fix is to just overwrite onBuild again for MeshDistanceMaterial.
THREE.MeshDistanceMaterial.prototype.onBuild = () => undefined;
or disabling shadowmap...
Reproduction steps
n/a
Code
n/a
Live example
n/a
Screenshots
No response
Version
145
Device
Desktop
Browser
Chrome
OS
Windows