Hi Marcus,

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.

Cheers
Mihai

Marcus Fritzen wrote:
> Hello,
>
> 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.
>
> Thx.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>   

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to