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 have a codePen in which I use logarithmicDepth. This worked so far without any problems with the outputStruct node. Since r173 I have been getting the following error message in connection with the depthNode
index.html:1 Error while parsing WGSL: :56:2 error: struct member depth not found
output.depth = ( log2( ( ( - ( - vDepth ) ) / nodeVar0 ) ) / log2( ( render.cameraFar / nodeVar0 ) ) );
I have installed a switch in the codePen example with which you can switch between the colorNode and the outputNode:
In line 106:
const testSwitch = 0;
I'm currently trying to understand what has changed in r173 so that the outputNode no longer works with the depthNode, but maybe the one who made the changes knows immediately what's going on.
Reproduction steps
Simply set the testSwitch from 0 to 1 in the codePen so that the outputNode is used.
@sunag You made extensive changes to the outputNode in the struct extension #30394
I haven't found any other PR in r173 that has made changes to the outputNode.
I suspect that this could be the reason why the depthNode is no longer connected to the outputNode.
I'm trying to reconstruct the cause of the error step by step, but maybe you'll immediately think of what it could be
P.S. I have now only adopted the struct extension in r172 and was able to reproduce exactly the error message
127.0.0.1/:1 Error while parsing WGSL: :228:2 error: struct member depth not found
output.depth = ( log2( ( ( - ( - vDepth ) ) / nodeVar0 ) ) / log2( ( render.cameraFar / nodeVar0 ) ) );
^^^^^^^^^^^^
I have no idea jet which part of the extension is the reason, but at least I could narrowed down the cause to the struct extension. By the way, I think it's really great. It is once again a great hub in threejs around WebGPU
Spiri0
changed the title
There is maybe an issue with outputStruct since r173
DepthNode no longer works in conjunction with the OutputNode in r173. The cause are OutputNode changes in #30394
Feb 9, 2025
I've just run into this as well using logarithmicDepthBuffer in the WebGPURenderer upgrading from 172 => 173.
It seems to only occur when using MRT in my tests. If we apply a LogarithmicDepthBuffer to the selective bloom example /examples/webgpu_postprocessing_bloom_selective.html, we see the same error you have shared. When we add it to the normal bloom postprocessing example we don't have any issues.
I see your example is not explicitly using MRT @Spiri0 so I'm not sure where this issue lies since the selective bloom example does not use the depthNode at all and we can reproduce the exact same error there.
@spreadpando The MRT uses the outputNode just like I do. I haven't had a chance to take a closer look at it yet because of my work on my current project. I should probably take some time to investigate it. Maybe I can narrow down the cause even further around the outputNode
Description
I have a codePen in which I use logarithmicDepth. This worked so far without any problems with the outputStruct node. Since r173 I have been getting the following error message in connection with the depthNode
I have installed a switch in the codePen example with which you can switch between the colorNode and the outputNode:
In line 106:
const testSwitch = 0;
I'm currently trying to understand what has changed in r173 so that the outputNode no longer works with the depthNode, but maybe the one who made the changes knows immediately what's going on.
Reproduction steps
Simply set the testSwitch from 0 to 1 in the codePen so that the outputNode is used.
Code
see in live example link
Live example
https://codepen.io/Spiri0/pen/vYqpRga?editors=1010
Screenshots
No response
Version
173
Device
No response
Browser
No response
OS
No response
The text was updated successfully, but these errors were encountered: