directionalBlur

A source smeared along a direction: angle in degrees (0 points right, 90 down), length in canvas pixels. 32 weighted taps along the streak, at half resolution.

directionalBlur(
  source: InputSource,
  opts: {angle: ScalarArg; length: ScalarArg},
): DirectionalBlurInput

Import directionalBlur from shaders/std.

Parameters

NameTypeNotes
sourceInputSource
opts{angle: ScalarArg; length: ScalarArg}

Example

inputs: {streak: directionalBlur(child, {angle: p('angle'), length: 60})},

See also

  • blur — A blurred copy of a source, read in WGSL by the name you list it under.