NAME

clip - conditionally kill a pixel before output

SYNOPSIS

  void clip(float4 x);
 

PARAMETERS

x

Vector condition to clip on

DESCRIPTION

kills the current pixel output if any component of the given vector is negative

REFERENCE IMPLEMENTATION

clip is eqivalent to

  void clip(float4 x)
  {
    if (any(x < 0))
      discard;
  }

PROFILE SUPPORT

clip is supported in all pixel/fragment profiles.

SEE ALSO