On 2/21/2011 7:52 AM, "Martin Großer" wrote:
Hello,
Have everyone experience with the gl shading language? I would like to do
something like that on my texture (I use render to texture):
gl_FragData[0] += vec(0.01,0,0,1);
Is that possible? I want to increment the color in my texture in every render
pass (in this case the red channel). I don't want to copy back to the cpu
memory. And I use the FRAME_BUFFER_OBJECT. I guess the gl_FragData[0] is in
every render pass zero (black). Is it possible to change that?
If you believe the above code will read the current color out of the frame
buffer, add (0.01,0,0,1) to it, then write it back out, no, I don't think it
works that way. It's not clear to me what you're trying to do, but I wonder if
use of additive blending might help.
-Paul
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org