Skip to content

How to get scene depth? #419

Answered by pragma37
Psi25 asked this question in Q&A
Discussion options

You must be logged in to vote

The PrePass node has a Normal Depth output texture, where the fourth channel is the current layer depth.

That texture is read internally in the Mesh MainPass shaders and in Screen shaders, but it's not currently exposed to nodes.
You could add an extra custom input and plug it there so it's available to nodes, or use a custom node function that reads it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Psi25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants