pow
Performs a power operation (x^y) to create non-linear numerical transformations, crucial for controlling light falloff, color correction, and shaping visual effects.
Core Advantages
Easily transforms linear values (like gradients) into curves, enabling the creation of more organic and artistic visual effects, such as smooth fade-outs or focused highlights.
Common Uses
Controlling Specular Highlights
Gamma Correction
Fresnel Effect
Creating Vignettes or Radial Glows
How to adjust
The curve's shape is primarily controlled by adjusting the exponent `y`. When `y > 1`, the curve bends downwards (starts slow, ends fast), suitable for creating sharp highlights or steep falloffs. When `0 < y < 1`, the curve bends upwards (starts fast, ends slow), commonly used for gamma correction to make brightness transitions more perceptually natural.
Code Examples
1// Convert a linear gradient (uv.x) into a downward-bending curve
2const curve = pow( uv().x, 2.0 );