---
title: "frameSway"
description: "A slight drifting shift and rotation of where the child is read from, like film in an unsteady projector gate."
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#L1728"
---

# frameSway

A slight drifting shift and rotation of where the child is read from, like film in an unsteady projector gate.

```ts
frameSway(slots: {amount: PropRef; field: string}): (params: GpuFragmentParams) => Expr
```

Import `effects` from `shaders/std` and use `effects.blurs.frameSway`.

`amount` is a prop from 0 to 1. `field` names an entry you declare in the definition's `extraFields` as `{schema: schema.f32, initial: 0}`; the sway's clock lives there. Returns a function of the fragment params that gives the uv to sample the child at. When `amount` drops to 0 the motion freezes in place rather than snapping back.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{amount: PropRef; field: string}` |  |

## Example

```ts
const weave = frameSway({amount: p('weave'), field: 'weaveTime'})
```

> **Tip.** Build it once at module level and call it inside `gpu.fragment`; it registers its own per-frame clock.

## See also

- [`screenedBloom`](/docs/primitives/effects-blurs/screenedbloom) — A tinted glow of the child's bright parts, screened over a color you have already graded: film halation, phosphor bloom.

## Used by

[FilmStock](/docs/components/filmstock)