Threshold

Function

The Threshold function cuts channels off at a certain value, and turns everything below that cut-off value to 0. Each channel can have its own separate cut value. By using the crush parameter, you can boost everything above that value 1..

 

Parameters
Type
Defaults
Function
red,green,blue,alpha
float
0 Anything below this value goes to black.
crush
int
0 If this is 1, everything above the cutoff values goes to 1.
softClip
float
0 Provides a rolloff value.


Synopsis

image Threshold( 
  image In,
  float red,
  float green,
  float blue,
  float alpha,
  int crush,
  float softClip

 );


Script

image = Threshold( 
  In,
  red,
  green,
  blue,
  alpha,
  crush,
  softClip
 );
       

Command Line

shake -threshold red green blue alpha crush softClip