clip.3Cg

Langue: en

Version: 348888 (ubuntu - 24/10/10)

Section: 3 (Bibliothèques de fonctions)

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