[osg-users] Possible with BlendFunc?

Bradford, Chase CHASE.BRADFORD at saic.com
Thu Sep 6 11:28:02 PDT 2007


Hi Everyone,

 

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?

 

Thanks,

Chase

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070906/ee5124fd/attachment-0002.htm>


More information about the osg-users mailing list