Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depthNode: the default value of depthNode is invalid #29659

Open
Lafeu-p opened this issue Oct 15, 2024 · 0 comments
Open

depthNode: the default value of depthNode is invalid #29659

Lafeu-p opened this issue Oct 15, 2024 · 0 comments

Comments

@Lafeu-p
Copy link

Lafeu-p commented Oct 15, 2024

Description

In the three.js example with a webgpu_instance_points, when enabling logarithmicDepthBuffer, the example encounters the following error.
image
I noticed that the issue was caused by not setting a value for depthNode. When I set depthNode = depth, the error disappeared. However, I noticed that three.js does have a default depthNode set.
image
Additionally, although directly setting depthNode = depth eliminates the error, the result is not as expected, as the depth appears to be chaotic.
image

I noticed that the configuration for depth in the code didn't take effect, and upon debugging the shader, I found that the logarithmic depth-related shader code wasn't being used.
image
If I modify this line of code to
depth.valueNode = depthNode
then I no longer need to manually set depthNode = node, and the depth behaves as expected. I'm a beginner with NodeMaterial, but I believe this is a bug, and I look forward to further feedback.
image

Reproduction steps

1.enabling logarithmicDepthBuffer,

Code

logarithmicDepthBuffer = true

Live example

http://localhost:8080/examples/?q=instance#webgpu_instance_points

Screenshots

image

Version

170dev

Device

Desktop

Browser

Chrome

OS

MacOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants