View Full Version : Clip R,G,B,S,T
Are R,G,B,S,T clipped according to Z or 1/Z ?
04-23-2006, 05:46 AM
What exactly are you referring to? R,G,B sound like color components, S,T,R sound like texture coordinates. Neither of those are clipped. Color components, however, are clamped (limited to the range 0..1) before being interpolated and written to the color buffer, but there's no connection between either colors or texture coordinates and depth values (Z).
When clipping is done by hardware all parameters of color anf texture should be clliped accordingly. The clipping is done according to 1/z (if w=1, correct?) So are the color and texture componnets clipped the same way by the hardwrae ?
04-23-2006, 05:59 AM
Vertex positions are clipped agains w and -w, not z (z is being clipped itself). As homogenous coordinates are defined as (x, y, z, w) = (x/w, y/w, z/w, 1), all coordinates are effectively being clipped against -1 and 1. Clipping against w before the division allows vertices at infinity (w=0) to be clipped correctly.
Color and texture coordinates are not clipped. They are modified according to the clipping of the vertex position.
Are they modified linearly ?
04-23-2006, 06:19 AM
Yes. You can read the exact specification in the OpenGL Specification, Section 2.12 "Clipping" and 2.14.8 "Color and Associated Data Clipping".
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.