Posted by Frank C. on January 21, 2004 at 11:30:17:
On 21-Jan-04, at 8:22 AM, Seth Willits wrote:> http://www.freaksw.com/Fog.jpg
>
> Why does the fog affect the shadow textures?This is a problem with how Quesa handles texture transparency...
To work like QD3D, Quesa resorts to using additive blending for
textures with alpha channels (that's why you have to pre-multiply
alphas to get a modulated blend instead of additive). A side effect of
this is that vertex attributes like fog and specular highlights will be
blended additively as well, resulting in the effect in your screenshot.There's no real way of fixing this without adding some face/vertex
attribute extensions that allow you to explicitly assign blend modes.
I'm all for this, and it could be extended to include alpha testing,
which is also impaired (can only use 16bit textures with it currently).
More robust control will also allow the use of both blending and
testing simultaneously to give hardware a chance to reject fragments
early in the pipeline and avoid expensive blending operations on 100%
transparent pixels.Back to your problem: If you can live without additive blending, just
use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) in
IRTransparent.c, instead of glBlendFunc(GL_ONE,
GL_ONE_MINUS_SRC_ALPHA).Frank.