[osg-users] Possible with BlendFunc?
CHASE.BRADFORD at saic.com
Thu Sep 6 11:28:02 PDT 2007
I'm trying to control transparency of a subgraph from a high level, and
I though BlendFunc with BlendColor would be a good way to go.
Setting up the two with constant color = (1, 1, 1, opacity_scale) and
BlendFunc = (GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA) allows me
to adjust the opacity_scale value effecting all frags below. The
problem is that it overrides the source color's alpha.
The above equates to
sfactor = aC
dfactor = 1-aC
D = ( S * aC + D *(1-aC) )
The equation I really want would give
sfactor = aS*aC
dfactor = 1 - aS*aC
Does anyone know if a setup like that is even possible?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users