Hi,

On 08/12/10 13:04, Thorsten Roth wrote:
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 ;)

Yes, a pass where the camera looks at a screen aligned quad. You just fill in whatever you want into all the MRT buffers using glFragData. You attach the same textures as for the second pass. Let me know if you need more info.

rgds
jp


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

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

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

Reply via email to