scratchStreaks

Fine hairline scratches, like a scuffed surface, flickering on the layer's clock.

scratchStreaks(slots: {thickness: PropRef}): Field

Import noise from shaders/std and use noise.scratchStreaks.

thickness widens the bright core of each streak (0.2 to 5, default 1). The value is 0 off a streak and rises well past 1 on one, so send it through noiseTone, which clamps. Takes a 2D position. Works in a paint: only, not in a compute pass.

Parameters

NameTypeNotes
slots{thickness: PropRef}

Example

paint: rampOver(noiseTone(seededPlane(scratchStreaks({thickness: p('thickness')}), {scale: p('scale'), seed: p('seed')})), linearPair(p('colorA'), p('colorB')))

See also

  • noiseTone — The standard contrast and balance controls of a noise texture, turning a 0–1 field into the ramp position.
  • linearPair — A two-color palette mixed in linear RGB, for a definition with no color-space prop.

Used by

Scratches