Dewey Anderson (dewey++at++evt.com)
Tue, 29 Apr 1997 18:35:18 -0600
I seem to remember reading once that when transparency is enabled in Performer,
it uses whatever the current blending function is in OpenGL. But I can't seem
to find that in the documentation anywhere. Can anybody confirm or deny this?
And point me to place in the documentation?
A related OpenGL point: The OpenGL book says that
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA )
is "the most commonly used blending operation".
For color components, I agree, but this leads to undesired values for alpha
channel. (e.g. a 50% opaque object on top of a 100% opaque pbject results in
something only 75% opaque instead of 100%.) What's needed is a blending func
that does ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) on the colors but does
( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ) on the alpha.
The only recourse I see is to use ( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ) and
premultipy all my color components by alpha. Inconvenient. And this leads to
loss of information, i.e. I can't "recover" a part of an image where I have
0'ed the alpha.
BTW, for people who only look at the results on the graphics screen, using
SRC_ALPHA doesn't matter. At that stage you're done with the alpha. For
people in the video business who then take that alpha out of the box and into a
switcher, this is a big problem.
I guess this part is just a gripe and a "heads up" for anyone with input to new
OpenGL extensions.
Thanks,
Dewey K. Anderson
dewey++at++evt.com
Evolving Video Technologies
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:07 PDT