min
Returns the lesser of two or more input values. For vectors, it performs a component-wise comparison. It's a fundamental tool for color blending, mask combination, and shape merging.
Core Advantages
Provides a more concise, readable, and performant way to find the minimum value than conditional expressions (`a < b ? a : b`). Its support for more than two arguments and vector operations greatly simplifies the logic for color blending and shape combination.
Common Uses
"Darken" blend mode
Combining masks
Procedural shape merging (SDF)
How to adjust
Control the result by changing the input nodes. For example, `min(uv().x, uv().y)` will merge the darkest parts of a horizontal and a vertical gradient, creating a diagonal gradient that spreads from the top-left corner (black) to the bottom-right.
Code Examples
1// "Darken" blend mode: takes the darker of the two colors, component-wise
2const darkenColor = min( colorA, colorB );