RE: Signed colour values and clamping

"Robin Charlton" <[email protected]> Tue, 11 Apr 2006 01:39:25 -0800
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
GL_NV_register_combiners seems to offer functionality similar to what
you describe.
 
Thanks for the help!
-
Robin

________________________________

	From: [email protected] [mailto:[email protected]] On
Behalf Of Pat Brown (OpenGL)
	Sent: 10 April 2006 16:29
	To: Multiple recipients of list OPENGL-GAMEDEV-L
	Subject: RE: Signed colour values and clamping
	
	

	Yes, colors are clamped to [0,1] in Section 2.14.6 in the OpenGL
2.0 spec.  I believe that there is a register combiner input mode that
can take values in the range [0,1] and map them to [-1,+1], or possibly
[-1/2, +1/2] in conjunction with a scale by half.

	

	ARB_color_buffer_float provides a control that relaxes this
clamping plus clamping for fragment processing operations, for use with
floating-point color buffers.  I'm not sure that we've properly
documented the interaction of ARB_color_buffer_float and
NV_register_combiners.  I'm 95% certain that the approach we chose was
that register combiners continued to operate with clamped values.

	

	Pat

	

	
________________________________


	From: [email protected] [mailto:[email protected]] On
Behalf Of Robin Charlton
	Sent: Monday, April 10, 2006 10:54 AM
	To: Multiple recipients of list OPENGL-GAMEDEV-L
	Subject: Signed colour values and clamping

	

	I'd like to use signed vertex colour values in the range -0.5 to
0.5 with an additive texture stage to create high-lights and low-lights.
Unfortunately it seems that the colour values are clamped in the range 0
to 1 before input to the register-combiner.

	

	The documentation says Neither floating-point nor signed integer
values are clamped to the range [0,1] before updating the current color.
However, color components are clamped to this range before they are
interpolated or written into a color buffer.

	

	Is what I'm seeing consistent with the docs and expected
behavour?

	

	Thanks

	__________________________________________________________
	Robin E. Charlton                   [email protected]

	

________________________________

	This email message is for the sole use of the intended
recipient(s) and may contain confidential information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply email and
destroy all copies of the original message. 
________________________________


	



	This message has been scanned for viruses by MailController
<http://www.MailController.altohiway.com/> .