[osg-users] How to render depth texture
radu at cm-labs.com
Wed Sep 12 14:45:54 PDT 2007
If you use shaders, you can render the depth texture to a quad using
texture access function in place of shadow2D().
The trouble is that the values are not suitable for rendering, if you
looks through the archives, someone posted how to map the values to some
useful gray scale ( all I remember of it is subtracting 128 from the
color value from the texture op. ).
I hope this will set you on the right path, and if you manage to do it,
please post the solution.
Marcus Fritzen wrote:
> is there an easy and fast way how I can render the depth values from the
> depth texture to screen so that the scene is in grayscale? If i do a
> shadow2D(...) in the shader, it is directly compared with the actual
> depth value or am I wrong? So I am unsure how I can reach the actual
> depth value stored in the depth texture.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 542 bytes
Desc: OpenPGP digital signature
More information about the osg-users