-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
Nodes: Issue with Using Depth Textures in Post Process Output #29436
Comments
Hi cmhhelgeson, https://codepen.io/Spiri0/pen/MWMpzGd In it you can see how you can use the scene depth texture and also the scene texture in post-processing. |
Hi Spir0, I'll have to look more closely at the code later, but I'm not sure if it helps me solve my issue. I'm explicitly not writing the depth to the renderTarget, so I can't access it with a call to getTextureNode('depth'). I'm doing this so that I can more easily apply blending to the renderTarget that renders the scene. Irrespective of whether I render to renderTarget or not, I still need to access the depth from two separate depth texture passes. |
Description
When attempting to port OutlinePassNode, I came across this issue when trying to conditionally set the color of the outline depending on the depth of the fragment within the scene.
This code properly creates the outline:
However, uncommenting the viewZ related code, produces this error in the console.
Reproduction steps
Reproducing this entails replicating the code added to this branch of Three.js:
https://github.com/cmhhelgeson/three.js/tree/outline_pass_node
Particularly the OutlinePassNode logic: https://github.com/cmhhelgeson/three.js/blob/outline_pass_node/src/nodes/display/OutlinePassNode.js
And the corresponding example:
https://github.com/cmhhelgeson/three.js/blob/outline_pass_node/examples/webgpu_postprocessing_outline.html
Code
.
Live example
.
Screenshots
No response
Version
r168
Device
Desktop
Browser
Chrome
OS
Windows
The text was updated successfully, but these errors were encountered: