Ian Romanick wrote:
On Tue, Nov 12, 2002 at 09:34:38AM -0800, Ian Romanick wrote:

I was monkeying around with DOT3 bumpmapping in SW Mesa and in the Radeon
driver.  In both cases, when a scale (either 2x or 4x) is applied, the
resulting colors wrap.  However, I noticed that in the Nvidia driver (for
Linux) clamps in the same situation.  Which is correct?  Both?

I see that the Radeon has a bit to enable clamping, and the R200 has two
different clamp modes (CLAMP_0_1 & CLAMP_8_8).  If clamping is correct, it
should be trivial to enable in the two drivers that support DOT3 bumpmapping.

As usual, I answered my own question.  From second paragraph of page 153
(page 166 of the PDF) of the 1.4 spec:

	If the value of TEXTURE_ENV_MODE is COMBINE, the form of the texture
	function depends on the values of COMBINE_RGB and COMBINE_ALPHA,
	according to table 3.24.  The RGB and ALPHA results of the texture
	function are then multiplied by the values of RGB_SCALE and
	ALPHA_SCALE, respectively.  The results are clamped to [0,1].

Therefore, the R100, R200, and software fallback is wrong.  I will make the
change to the R100 driver.  I'm guessing that I'll just set the clamp bit
and be done with it.  I'll have to read the rest of the spec to see if the
clamp bit should always be set or just for COMBINE.
I think it will probably always be clamped. I've never seen anything about colors wrapping in the spec.

Keith



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd522.html
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to