PDA

View Full Version : Colormaterial alpha problems with 7800



Madoc
01-18-2006, 12:49 AM
One of the shaders in our engine uses colormaterial on diffuse to define per-vertex alpha values. On the GF Go 7800 GTX (81.94 and older drivers) this no longer works, the alpha values just default to 0. The RGB values are still correct and the alpha values are correct with lighting disabled (just vertex colours with no colormaterial).

I haven't yet been able to test this on other recent nvidia boards (6x, other 7x). It definitely works fine up to the 5x and with all other cards we've tested (ancient to recent ATIs).

I've experimented with changing various state to see if it affected the presence of an alpha channel with colormaterial but nothing I do seems to bring back the alpha. *sigh*

jra101
01-18-2006, 08:28 AM
Madoc, would you be able to mail me a binary that reproduces this problem?

Madoc
01-18-2006, 11:43 AM
Ok, I'll try make you something tomorrow, if I find the time.

Thanks

Madoc
01-19-2006, 02:06 AM
Hmm... It seems one of the earliest tests I did was applied to a code-path I didn't use...

It looks like that the alpha values are not given by colormaterial unless a blending mode involving source alpha is enabled. I am not using the alpha values for frame-buffer blending (blending is disabled) but rather in a texture environment.

I sent you a binary+source that uses the primary colour alpha in a texture environment to blend between two textures. It does this first with a source alpha blending mode which shows correct results and then with blending disabled which functions as for a constant alpha value of 0.

It might also be worth noting that if colourmaterial is not enabled the alpha value specified with glMaterialfv gives correct results.