View Full Version : Clip when Wc is negative
Is clipping done for negative Wc?
What does it mean when Wc<0?
memfr0b
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.
Can you pleas direct me where it says that "OpenGL might not clip and interpolate those correctly"
memfr0b
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.