---
title: "share"
description: "Evaluates a field once and lets several words read the same result."
group: "paint"
groupTitle: "Painting"
categoryId: "paint"
categorySlug: "paint"
categoryTitle: "Fields, palettes & ramps"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/fields.ts#L460"
---

# share

Evaluates a field once and lets several words read the same result.

```ts
share(field: Field): Field
```

Import `paint` from `shaders/std` and use `paint.share`.

Wrap a field in `share` when it feeds two places, such as a `threshold` and a `pulse`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `field` | `Field` |  |

## Example

```ts
const pattern = share(flowField({detail: p('detail')}))
// then: threshold(pattern, ...) and pulse(pattern, ...)
```

> **Tip.** One result per layer, whatever coordinate it is asked for. Do not use it to sample the same field at two offsets.

## See also

- [`flowField`](/docs/primitives/paint/flowfield) — A swirling, animated wave pattern from −1 to 1.
- [`pulse`](/docs/primitives/paint/pulse) — A gentle brightness pulse that follows a pattern field, hovering around 1.

## Used by

[Swirl](/docs/components/swirl), [Voronoi](/docs/components/voronoi)