Hi, Sebastian
You can setup blend func in a way that will keep old rgb values and replace
alpha with new value.
for second pass - BlendFunc(osg::BlendFunc::ZERO, osg::BlendFunc::ONE,
osg::BlendFunc::ONE, osg::BlendFunc::ZERO).
However if you reading from same texture attached to camera output
Thanks to all replies but I was able to figure it out.
My initial idea was to modify a color attachment created in the first
pass in the second pass only where fragments were created(i.e. depth was
written)
I came up with the following solution:
1. Pass
RTT-Cam1
- DEPTH, COLOR1, COLOR2,
Hello,
I've have a question regarding RenderToTexture in a multipass setup.
I have to RTT cameras, the first one has DEPTH and 3 color attachments,
while the second has only one color attachment.
I need to use the data from the first RTT-pass in the second camera, so
the renderorder is set
On 9/21/2011 10:54 AM, Sebastian Messerschmidt wrote:
Hello,
I've have a question regarding RenderToTexture in a multipass setup.
I have to RTT cameras, the first one has DEPTH and 3 color attachments, while
the second has only one color attachment.
I need to use the data from the first
Thank you Paul,
It seems a little bit more obvious now.
Basically I need to write some additional value to one of the COLOR
attachments alpha channel, which is derived from the first pass.
So my second approach (which seems to be failing) is somehow to write
only to those texels in my color
Sebastian Messerschmidt wrote on 2011-09-21:
Thank you Paul,
It seems a little bit more obvious now. Basically I need to write some
additional value to one of the COLOR attachments alpha channel, which is
derived from the first pass. So my second approach (which seems to be
failing) is
6 matches
Mail list logo