pcurve
A powerful curve-shaping function that uses two parameters, `a` and `b`, to asymmetrically reshape an input in the [0, 1] range, ideal for creating custom easing curves and light falloffs.
Core Advantages
Allows independent control over the 'ease-in' and 'ease-out' behavior of a curve via two parameters, `a` and `b`, making it easy to create a wide variety of symmetric or asymmetric S-curves for highly customized easing, falloffs, and gradient shaping.
Common Uses
Custom light falloff
Advanced alpha blending and shaping
Procedural animation easing functions
How to adjust
Shape the curve by adjusting parameters `a` and `b`. `a` controls the 'ease-in' (higher values mean a slower start), while `b` controls the 'ease-out' or skew. `a=b` creates a symmetric curve (like an S-curve), while `a != b` creates an asymmetric one.
Code Examples
1// Create an asymmetric curve with a "slow start, fast end"
2const customEase = pcurve( uv().x, 8.0, 2.0 );