Name
clip - conditionally kill a pixel before output
Synopsis
void clip(float4 x);
void clip(float3 x);
void clip(float2 x);
void clip(float1 x);
void clip(float x);
Parameters
- x
-
Vector/scalar condition to clip on
Description
kills the current pixel output if any component of the given vector, or the given scalar, is negative
Reference Implementation
clip is equivalent to
void clip(float4 x)
{
if (any(x < 0))
discard;
}
Profile Support
clip is supported in all pixel/fragment profiles.
See Also
|