Skip to content

depthNode: the default value of depthNode is invalid #29659

@Lafeu-p

Description

@Lafeu-p

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions