Skip to content

sparkle(inputColor, uv, time, density?, intensity?, sparkleColor?, speed?, threshold?): Node <"vec4">

Defined in: packages/nodes/src/vfx/sparkle.ts:30

Add sparkle/glitter effect to a color. Creates randomly appearing bright spots that twinkle over time.

Node <"vec4">

Base color (vec4)

Node <"vec2">

UV coordinates

FloatInput

Animation time

FloatInput = 50

Sparkle density (higher = more sparkles, default: 50)

FloatInput = 2

Sparkle brightness (default: 2)

Vec3Input = ...

Color of sparkles (default: white)

FloatInput = 3

Animation speed (default: 3)

FloatInput = 0.97

Sparkle appearance threshold (default: 0.97)

Node <"vec4">

Color with sparkle effect

const sparkly = sparkle(inputColor, uv, time, 40, 2, [1, 1, 1])