PDA

View Full Version : FragDepth?



Rabur
02-17-2011, 12:25 PM
Hi,
If I am not wrong, there is no working gl_FragDepth in WebGL now. GLSL spec has it.
Is it just temporary?
What if I would like to count depth per-pixel? Is there any other way?

SteveBaker
03-17-2011, 11:57 AM
It's not present in OpenGL ES 2.0 - so WebGL doesn't have it.

http://old.siggraph.org/publications/20 ... .10.11.pdf (http://old.siggraph.org/publications/2006cn/course16/KhronosSpecs/ESLanguageSpec1.10.11.pdf)

...says:

The output variables gl_ClipVertex and gl_FragDepth are removed.

-- Steve