You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get Uncaught RangeError: Maximum call stack size exceeded when assigning NomralMap texture to material using material.normalNode.
This error occurs when I light the scene using only scene.environment.
The error does not occur when I add a directional light in the scene scene.add( new THREE.DirectionalLight( 0xffffff, 0 ) );
Reproduction steps
1.Create mesh with geometry and a MeshStandardNodeMaterial
2.Assign a normal map to MeshStandardNodeMaterial using material.normalNode = normalMap(texture(tex))
3.Add a hdri to scene using scene.background = texture;
Code
constrgbeLoader=newRGBELoader();rgbeLoader.load('https://cdn.jsdelivr.net/gh/mrdoob/three.js@r171/examples/textures/equirectangular/royal_esplanade_1k.hdr',// Replace with your HDR URL(texture)=>{texture.mapping=THREE.EquirectangularReflectionMapping;scene.background=texture;scene.environment=texture;});// geometryconstgeometry=newTHREE.BoxGeometry(5,5,5);// materialconstmaterial=newTHREE.MeshStandardNodeMaterial({});lettex=newTHREE.TextureLoader().load("https://i.postimg.cc/Fz4NsfDg/Bricks097-1-K-JPG-Normal-GL-result.jpg")material.normalNode=normalMap(texture(tex));// meshmesh=newTHREE.Mesh(geometry,material);scene.add(mesh);
The text was updated successfully, but these errors were encountered:
gnansai
changed the title
Uncaught RangeError: Maximum call stack size exceeded when using normalNode with only scene backgroundUncaught RangeError: Maximum call stack size exceeded when using normalNode with only scene environment
Jan 3, 2025
Description
I get
Uncaught RangeError: Maximum call stack size exceeded
when assigning NomralMap texture to material usingmaterial.normalNode
.This error occurs when I light the scene using only
scene.environment
.The error does not occur when I add a directional light in the scene
scene.add( new THREE.DirectionalLight( 0xffffff, 0 ) );
Reproduction steps
1.Create mesh with geometry and a MeshStandardNodeMaterial
2.Assign a normal map to MeshStandardNodeMaterial using
material.normalNode = normalMap(texture(tex))
3.Add a hdri to scene using
scene.background = texture;
Code
Live example
Uncaught RangeError: Maximum call stack size exceeded
- only scene backgroundScreenshots
Version
r172
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered: