distortBarrel
distortBarrel(
uv,strength,zoom):Node<"vec2">
Defined in: packages/nodes/src/distortion/distort.ts:124
Barrel distortion - simulates lens distortion. Commonly used for CRT screen curvature simulation.
Parameters
uv
Node<"vec2">
Input UV coordinates (should be 0-1)
strength
FloatInput = 0.1
Distortion strength (positive = barrel, negative = pincushion)
zoom
FloatInput = 1
Zoom adjustment to compensate for distortion (default: 1)
Returns
Node<"vec2">
Distorted UV coordinates
Example
// CRT-like barrel distortionconst curved = distortBarrel(uv, 0.2)