step
A hard edge: 0 when x is below edge, 1 from edge on.
step(edge: Val, x: Val): Expr
Import math from shaders/std and use math.step.
Parameters
| Name | Type | Notes |
|---|---|---|
edge | Val | |
x | Val |
Example
const lit = step(params.uniforms.threshold, brightness)
See also
smoothstep— A soft edge: 0 belowe0, 1 abovee1, an S-curve between.