[osg-users] Setting alpha channel in Frag Shader does not work.

Steven Powers StevenAPowers at gmail.com
Wed Mar 18 08:11:34 PDT 2009


danielh wrote:
> Try attaching a texture to the COLOR_BUFFER0 instead of an image directly.
> That's what worked for me.



Thats what this code is doing. I've written to COLOR_BUFFER0 and whenever I change the shader alpha value to something other than 1 all color values come back incorrect.

This will be read correctly:
 
Code:
gl_FragColor = vec4(1,2,3,4, 1);



But this will be read incorrectly:

Code:
gl_FragColor = vec4(1,2,3,4, .5);



------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=8707#8707








More information about the osg-users mailing list