sub
The first value minus the second.
sub(a: Val, b: Val): Expr
Import math from shaders/std and use math.sub.
Parameters
| Name | Type | Notes |
|---|---|---|
a | Val | |
b | Val |
Example
const outside = sub(1, coverage) // flip a 0..1 mask
See also
Used by
Aurora, BrushedMetal, CarbonFiber, Chrome, Crystal, FlowingGradient, Frost, Goo, Heatmap, Hologram, Holographic, Irradiance, LiquidMetal, MeshGradient, Nebula, Obsidian, PixelThrow, Plastic, Prism, ReactionDiffusion, StudioBackground, Voxels, Water, Waveform