Hi,

Am 08.12.2010 11:14, schrieb J.P. Delport:
Hi,

On 07/12/10 18:47, Thorsten Roth wrote:
Hi,

I have multiple render targets attached to separate color buffers in my
application. One of them is used to store linearized, normalized depth
values as well as absolute depth values and some additional information.
My problem now is that this color buffer should in fact be cleared with
the value 1 for the normalized depth component instead of the background
color component which is set for the viewer camera.

So, is there any (easy?) way to do this?
If you consider a fragment shader running prior to you rendering easy,
then yes :)

In which way exactly? You mean as a separate rendering pass? Well, I believe at least I could live with it...though it's not yet quite clear to me ;)

Can i use separate clear colors
for separate color buffers?
I don't think so.

Would be really important, as I do not
really want to be forced to do a further "normalization" of my buffer
afterwards... ;-)

How are you writing to the buffers? glFragData?

Yup.

Currently, the problem is only solved by having a -1 in the alpha channel where there is an object. Everything else is then considered as background. Of course this is not really satisfying, as I need to run a filter on it afterwards, so I still need to change the background pixels to the maximum depth (far plane) value...


jp

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

Reply via email to