floor
Rounds the input floating-point number (or each component of a vector) down to the largest integer less than or equal to it. It is the core tool for converting smooth, continuous signals (like UVs or time) into discrete, stepped values.
Core Advantages
Its core value is "discretization": converting continuous inputs (like UV coordinates or time) into discrete, stable regions or states. This is the most direct and efficient tool for creating grids, pixelation, and stepped animations.
Common Uses
Creating Grids/Tiles
Color Quantization/Posterization
Stepped Animation
How to adjust
Control the "granularity" of the quantization by multiplying its input by a factor. For example, when creating a grid, `floor(uv().mul(10))` produces a 10x10 grid, while `floor(uv().mul(50))` creates a finer 50x50 grid.
Code Examples
1// Quantize continuous UV coordinates into a 10x10 grid ID
2const gridID = floor( uv().mul( 10.0 ) );