Preet
2012-04-17 06:35:18 UTC
Hey,
I have some geometry which has a single primitive set that's a
tri-strip. Some of the triangles in the primitive overlap, so when I
add a material to the geometry with an alpha value I see the overlap
as shown here:
Loading Image...
I don't want the object's opacity to be affected by self
interferences. I read that "one way to solve this in generic OpenGL is
to fill the framebuffer with your desired alpha channel, switch the
blending mode to glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA) and
draw the geometry". I can use osg::BlendFunc properly, but...
* I don't know how to preemptively "fill the framebuffer with your
desired alpha channel" with osg. Can anyone provide any pointers as to
how that can be done?
Regards,
Preet
I have some geometry which has a single primitive set that's a
tri-strip. Some of the triangles in the primitive overlap, so when I
add a material to the geometry with an alpha value I see the overlap
as shown here:
Loading Image...
I don't want the object's opacity to be affected by self
interferences. I read that "one way to solve this in generic OpenGL is
to fill the framebuffer with your desired alpha channel, switch the
blending mode to glBlendFunc(GL_ONE_MINUS_DST_ALPHA, GL_DST_ALPHA) and
draw the geometry". I can use osg::BlendFunc properly, but...
* I don't know how to preemptively "fill the framebuffer with your
desired alpha channel" with osg. Can anyone provide any pointers as to
how that can be done?
Regards,
Preet