---
title: "slowDrift"
description: "The slow breathing and drifting signals that keep a light leak alive."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "light"
categorySlug: "light"
categoryTitle: "Light"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/light.ts#L432"
---

# slowDrift

The slow breathing and drifting signals that keep a light leak alive.

```ts
slowDrift(slots: {seed: ArgSpec; flicker: ArgSpec}): (clock: Expr, params: GpuFragmentParams) => Expr
```

Import `light` from `shaders/std` and use `light.slowDrift`.

Call the result with a clock and the params. It returns four numbers: `.x` is a brightness gain to multiply your light by (1 with `flicker` at 0, breathing between 0.25 and 1.75 at 1), and the rest are the slow drifts `beamBloom` and `beamStreaks` read. Pass the whole value to them as `drift`. `seed` re-rolls the pattern.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{seed: ArgSpec; flicker: ArgSpec}` |  |

## Example

```ts
const drift = local(slowDrift({seed: p('seed'), flicker: p('flicker')})(animatedTime(params), params), 'leakDrift')
```

## See also

- [`beamBloom`](/docs/primitives/light/beambloom) — The soft pool of light at the start of a beam, with a wider faint shoulder around it.
- [`beamStreaks`](/docs/primitives/light/beamstreaks) — Two bright bands crossing a beam further along it, slowly drifting, like light bouncing inside a film camera.
- [`beamFrame`](/docs/primitives/light/beamframe) — The frame of a beam that starts at an anchor prop and points at the canvas center.

## Used by

[LightLeak](/docs/components/lightleak)