Skip to content

afterimage(currentColor, previousTex, uv, persistence?): Node <"vec4">

Defined in: packages/nodes/src/vfx/afterimage.ts:20

Create afterimage/ghost effect by blending with a previous frame. Requires a texture containing the previous frame.

Node <"vec4">

Current frame color

Texture 

Previous frame texture

Node <"vec2">

UV coordinates

FloatInput = 0.8

How much previous frame persists (0-1, default: 0.8)

Node <"vec4">

Blended color with afterimage

// Render to texture, then use previous frame
const ghosted = afterimage(currentColor, previousFrameTexture, uv, 0.85)