---
title: "smearAlong"
description: "Blurs any 2D lookup along a direction, for streaked reflections and motion smear."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "materials"
categorySlug: "materials"
categoryTitle: "Materials & surfaces"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/materials.ts#L548"
---

# smearAlong

Blurs any 2D lookup along a direction, for streaked reflections and motion smear.

```ts
smearAlong(
  opts: {center: Expr; axis: Expr; spread: Expr; taps?: number; sigma?: number; hint?: string},
  sample: (x: Expr, y: Expr) =,
> Expr): Expr
```

Import `materials` from `shaders/std` and use `materials.smearAlong`.

Samples `taps` points (default 9) spread `spread` either side of `center` along the unit vector `axis`, weighted by a bell curve, and sums them. `sample` receives an x and a y.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `opts` | `{center: Expr; axis: Expr; spread: Expr; taps?: number; sigma?: number; hint?: string}` |  |
| `sample` | `(x: Expr, y: Expr) => Expr` |  |

## Example

```ts
const env = smearAlong({center: R, axis: brush.tangent, spread: 0.3}, (x, y) => studioSoftboxes(x, y, studio))
```

## See also

- [`studioSoftboxes`](/docs/primitives/materials/studiosoftboxes) — The brightness of a five-light studio seen in a reflected direction.
- [`grainNoise`](/docs/primitives/materials/grainnoise) — One octave of smooth signed noise along and across a direction, for grain.

## Used by

[BrushedMetal](/docs/components/brushedmetal)