---
title: "rgbSplit"
description: "The child with its red and blue pulled a little to either side, like a misaligned CRT."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.blurs"
categorySlug: "effects-blurs"
categoryTitle: "Blurs, glows & screens"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/blurs.ts#L118"
---

# rgbSplit

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

```ts
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

| Name | Type | Notes |
|---|---|---|
| `opts` | `{amount: ArgSpec}` |  |

## Example

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

## See also

- [`glitchRgbSplit`](/docs/primitives/effects-blurs/glitchrgbsplit) — The child sampled through a glitch frame, with red and blue pulled apart inside the active bands.
- [`scanlines`](/docs/primitives/effects-blurs/scanlines) — Horizontal scanlines darkening the child in a smooth wave.
- [`phosphorMask`](/docs/primitives/effects-blurs/phosphormask) — A faint red, green and blue phosphor stripe pattern across the child.
- [`opaque`](/docs/primitives/effects-blurs/opaque) — Closes a three-channel stack as a solid color with alpha 1.

## Used by

[CRTScreen](/docs/components/crtscreen)