RE: Signed colour values and clamping
"Pat Brown \(OpenGL\)" <[email protected]> Mon, 10 Apr 2006 07:29:24 -0800
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
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 ________________________________ Robin Charlton Sent: Monday, April 10, 2006 10:54 AM To: Multiple recipients of list OPENGL-GAMEDEV-L 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. -----------------------------------------------------------------------------------