Skip to content

ghost(tex, uv, offsets, baseOpacity?, fadeWithDistance?): Node <"vec4">

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

Multiple ghost/clone effect at offset positions. Creates several semi-transparent copies at fixed offsets.

Texture 

Source texture

Node <"vec2">

UV coordinates

[number, number][]

Array of offset positions for ghosts

FloatInput = 0.3

Opacity of each ghost (default: 0.3)

boolean = true

Fade ghosts based on offset distance

Node <"vec4">

Color with ghost clones

const ghosts = ghost(texture, uv, [[0.02, 0], [0.04, 0], [0.06, 0]], 0.3)