afterimage
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.
Parameters
currentColor
Node<"vec4">
Current frame color
previousTex
Previous frame texture
uv
Node<"vec2">
UV coordinates
persistence
FloatInput = 0.8
How much previous frame persists (0-1, default: 0.8)
Returns
Node<"vec4">
Blended color with afterimage
Example
// Render to texture, then use previous frameconst ghosted = afterimage(currentColor, previousFrameTexture, uv, 0.85)