View Full Version : Colormaterial alpha problems with 7800

01-17-2006, 11:49 PM
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*

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

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


01-19-2006, 01: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.