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
Using the following TSL (Three.js Shading Language) node throws an error:
float(1e21)
but the following node does not:
uniform(1e21)
The reason I bring this up is because I noticed that the webgpu_camera_logarithmicdepthbuffer example on threejs.org uses 1e27 as the camera.far value, and camera.far is used in TSL nodes (as a uniform node). In the case that one day the camera.far value is not used in a uniform node, an error will be thrown.
Reproduction steps
Use the node float(x) in a NodeMaterial where x is a number greater than or equal to 1e21.
Code
constnodeMaterial=newTHREE.NodeMaterial()nodeMaterial.colorNode=THREE.Fn(()=>{constn=THREE.float(1e21);// <-- this throws an error//const n = THREE.uniform(1e21); // <-- this does not throw an errorreturnTHREE.vec3(n.mul(0),0,1)})()
Description
Using the following TSL (Three.js Shading Language) node throws an error:
float(1e21)
but the following node does not:
uniform(1e21)
The reason I bring this up is because I noticed that the webgpu_camera_logarithmicdepthbuffer example on threejs.org uses
1e27
as thecamera.far
value, andcamera.far
is used in TSL nodes (as a uniform node). In the case that one day thecamera.far
value is not used in a uniform node, an error will be thrown.Reproduction steps
float(x)
in aNodeMaterial
wherex
is a number greater than or equal to1e21
.Code
Live example
https://jsfiddle.net/trm2onsy/2/
Screenshots
No response
Version
169
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered: