View Full Version : Clip when Wc is negative

04-23-2006, 04:21 AM
Is clipping done for negative Wc?
What does it mean when Wc<0?

04-23-2006, 04:50 AM
Technically, negative homogenous components would negate/mirror the vector. (x, y, z, -w) = (-x, -y, -z, w). You should avoid negative homogenous components (both for texture coordinates and vertex positions) as OpenGL might not clip and interpolate those correctly.

04-23-2006, 05:01 AM
Can you pleas direct me where it says that "OpenGL might not clip and interpolate those correctly"

04-23-2006, 05:02 AM
Can Wc be Zero??

04-23-2006, 05:23 AM
Appendix H of the OpenGL Programming Guide (http://fly.srk.fer.hr/~unreal/theredbook/appendixh.html) under "OpenGL Correctness Tips":

Avoid using negative w vertex coordinates and negative q texture coordinates. OpenGL might not clip such coordinates correctly and might make interpolation errors when shading primitives defined by such coordinates.A zero homogenous component is allowed and refers to a vertex at infinity.