Replies: 1 comment 1 reply
-
You can sample from a depth texture you rendered into, that's how shadow maps, ambient occlusion, etc. work internally. The part of the spec you are quoting means that if you use Where do you get a depth of 1? Note that we use reverse Z when we can to improve depth buffer precision. |
Beta Was this translation helpful? Give feedback.
-
I'm experimenting with a material whose fragment shader samples from a depth texture associated with a
RenderTarget
, and I'm wondering about a couple things. First, is this a legitimate thing to do? I'm new to GLSL_ES, and the language specification says some things that I don't really understand but sound scary, such asSecond, if the concept is OK, I was expecting the far plane to have depth 1, but experimentally it appears to have depth 0. Why?
Beta Was this translation helpful? Give feedback.
All reactions