rgbSplit

The child with its red and blue pulled a little to either side, like a misaligned CRT.

rgbSplit(opts: {amount: ArgSpec}): SampleStage

Import effects from shaders/std and use effects.blurs.rgbSplit.

amount is the shift; 1 moves red and blue each by 0.002 of the canvas width, 0–10 is the usual range. Returns a three-channel color, so finish the stack with opaque.

Parameters

NameTypeNotes
opts{amount: ArgSpec}

Example

effect: gatherStack(rgbSplit({amount: p('colorShift')}), [opaque()])

See also

  • glitchRgbSplit — The child sampled through a glitch frame, with red and blue pulled apart inside the active bands.
  • scanlines — Horizontal scanlines darkening the child in a smooth wave.
  • phosphorMask — A faint red, green and blue phosphor stripe pattern across the child.
  • opaque — Closes a three-channel stack as a solid color with alpha 1.

Used by

CRTScreen