Hi Bram,
Hi,
thanks for the reply!
I get the undefined part, that makes sense, but what I still don't understand
though: I just specify blending (GL_BLEND on) is on in the nodes. But then if I
do
gl_FragData[0] = vec4(0,0,0,0);
then it doesn't seem to matter anymore what I write to gl_FragData[1[ trough
gl_FragData[3], because it doesn't seem to write anything to the other buffers,
or at least I noticed that the alpha value from fragdata 0 seems to have an
effect on what happens with fragdate 3 in my tests. In my test if I set
gl_FragData[0] = vec4(0,0,0,0);, then fragdata 3 is also not updated, even if I
write a pixel with alpha value 1 to it, vec4(1,0,0,1) for example.
Sorry but you are not nearly providing enough context to understand what
you are really doing here.
First of all: In order to get blending working your buffers need to
have alpha (GL_RGBA).
Also, Do you setup a blendfunction and activate it for the stateset?
I prefer to set the blending at the off-screen camera btw.
to clarify further, what I would like is to use the destination blend, so it
should only use the alpha from my new pixels to blend, and that goes for all
buffers. And obviously the alpha value from the fragdata 0 should not effect
the other buffers.
I don't understand what you mean? Can you point to the blendfunction here?
There is no simple way to blend onyl gl_FragData[0] without touching the
other buffers. As said before: Blending function is applied to all bound
buffers.
So design your passes in a way that only the buffer to be blended is bound.
What would I need to set in osg to make it so?
So could try to post your buffer setup and your passes or at least
create a minimalistic example showing your problem?
A little more context on what you are trying to achieve would be helpful too
Cheers
Sebastian
Thank you!
Cheers,
Bram
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57124#57124
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org