Built-in Variable Descriptions
The descriptions of each of the declared variables above are given below in alphabetical order.
This provides the mechanism for controlling user clipping. The element gl_ClipDistance[i] specifies a clip distance for each plane [i]. A distance of 0 means the vertex is on the plane, a positive distance means the vertex is inside the clip plane, and a negative distance means the point is outside the clip plane. The output clip distances will be linearly interpolated across the primitive, and the portion of the primitive with interpolated distances less than 0 will be clipped.
The gl_ClipDistance array is predeclared as unsized and must be sized by the shader either redeclaring it with a size or ...