div
Represents the fundamental mathematical division operation (/), allowing one value to be divided by another or multiple values within the node graph.
Core Advantages
Abstracts the low-level GLSL / operator into a clean, readable, and composable node, greatly simplifying the construction of complex shader logic and elegantly supporting chained division.
Common Uses
Adjusting color or light intensity (e.g., dimming effects)
Scaling or tiling texture coordinates (UVs) for zooming or repetition
Correcting aspect ratio for screen-space effects
Calculating distance-based falloff
How to adjust
Adjust the effect by changing the divisor (the second and subsequent parameters). For example, dividing UV coordinates by a value that increases over time creates a continuous 'magnifying glass' or zoom-in animation on a texture.
Code Examples
1material.colorNode = div( baseColorNode, 2.0 ); // Halves the color brightness