---
title: "cellNoiseAt"
description: "Cellular noise at a 2D point: 0 at each cell's seed point, rising toward the cell walls."
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#L978"
---

# cellNoiseAt

Cellular noise at a 2D point: 0 at each cell's seed point, rising toward the cell walls.

```ts
cellNoiseAt(p: Expr): Expr
```

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

The value is a squared distance in cell units. Use it for facets and cracks, or as the field `fdSlope` differentiates for faceted relief.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `p` | `Expr` |  |

## Example

```ts
const facet = fdSlope(cellNoiseAt, mul(pat, 6), 0.002)
```

## See also

- [`fdSlope`](/docs/primitives/materials/fdslope) — The value and slope of any field at a point: `value`, `dx` and `dy`.
- [`surfaceNoiseAt`](/docs/primitives/materials/surfacenoiseat) — `surfaceNoise` at a 2D point you already hold.
- [`pointStars`](/docs/primitives/materials/pointstars) — A plane of sparse glinting points: stars, glitter, dust.

## Used by

[Crystal](/docs/components/crystal)