---
title: "hashNoise"
description: "Random 0–1 per point, with no smoothness between neighbours."
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#L1057"
---

# hashNoise

Random 0–1 per point, with no smoothness between neighbours.

```ts
hashNoise(x: Expr | number, y: Expr | number): Expr
```

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

For grain, flicker and per-pixel jitter. Feed it large coordinates so every pixel differs.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `x` | `Expr \| number` |  |
| `y` | `Expr \| number` |  |

## Example

```ts
const grain = hashNoise(mul(uv.member('x'), 991.3), mul(uv.member('y'), 787.7))
```

## See also

- [`interleavedNoise`](/docs/primitives/materials/interleavednoise) — A 0–1 dither pattern over device pixels where neighbours differ as much as possible.
- [`valueNoise`](/docs/primitives/materials/valuenoise) — Smooth noise 0–1 at a 2D point, softer and blockier than `surfaceNoise`.
- [`sensorGrain`](/docs/primitives/materials/sensorgrain) — Adds a fine per-pixel brightness jitter, so rendered light reads as photographed.

## Used by

[Heatmap](/docs/components/heatmap), [Hologram](/docs/components/hologram), [Nebula](/docs/components/nebula)