Skip to content

blurMotionVelocity

blurMotionVelocity(tex, uv, velocity, scale, samples): Node<"vec4">

Defined in: packages/nodes/src/blur/blurMotion.ts:57

Velocity-based motion blur. Blur strength and direction based on velocity vector.

Parameters

tex

Texture

Source texture

uv

Node<"vec2">

UV coordinates

velocity

Vec2Input

Velocity vector (direction and magnitude)

scale

FloatInput = 1

Velocity to blur scale (default: 1)

samples

number = 8

Number of samples

Returns

Node<"vec4">

Velocity-blurred color

Example

const blurred = blurMotionVelocity(texture, uv, velocityTexture.rg)