---
title: "pointerSplatField"
description: "A field the cursor smears: cells near the pointer move with it, then fade back to rest."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.pointerFields"
categorySlug: "effects-pointerfields"
categoryTitle: "Pointer fields"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/pointerFields.ts#L124"
---

# pointerSplatField

A field the cursor smears: cells near the pointer move with it, then fade back to rest.

```ts
pointerSplatField(slots: {
    gridSize: PropRef
    decay: PropRef
    intensity: PropRef
    radius: PropRef
    output: string
}): (params: GpuFragmentParams, root: GridRoot) => GridSimConfig
```

Import `effects` from `shaders/std` and use `effects.pointerFields.pointerSplatField`.

Spread it with `...sim.grids.gridSim(...)`. `gridSize` is the cells per side (8 to 128, see `clampSplatGridSize`). `decay` (about 0 to 10) is how fast the smear fades; `intensity` (about 0 to 5) how hard the cursor pushes; `radius` the brush size (1 is about 5% of the canvas). The field is published under `output` for a warp map such as `warps.gridCellDisplace`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{
    gridSize: PropRef
    decay: PropRef
    intensity: PropRef
    radius: PropRef
    output: string
}` |  |

## Example

```ts
...sim.grids.gridSim(pointerSplatField({gridSize: p('gridSize'), decay: p('decay'), intensity: p('intensity'), radius: p('radius'), output: 'displacement'}))
```

> **Tip.** Add `uvRemapIdentityWhen: ({computeOutputs}) => !computeOutputs?.displacement` so the warp is a no-op before the field exists.

## See also

- [`springLatticeField`](/docs/primitives/effects-pointerfields/springlatticefield) — A cloth of springs the cursor pushes: it stretches, rings and settles like fabric.
- [`clampSplatGridSize`](/docs/primitives/effects-pointerfields/clampsplatgridsize) — The grid size `pointerSplatField` really uses for a prop value: floored, then held to 8–128.

## Used by

[GridDistortion](/docs/components/griddistortion)