interleavedNoise
A 0–1 dither pattern over device pixels where neighbours differ as much as possible.
interleavedNoise(pixel: Expr, clock: Expr | number = 0): Expr
Import materials from shaders/std and use materials.interleavedNoise.
Better than hashNoise for jittering sample positions, which would otherwise clump into visible grain. pixel is the pixel coordinate (uv times the viewport size). clock shifts the pattern each frame.
Parameters
| Name | Type | Notes |
|---|---|---|
pixel | Expr | |
clock | Expr | number | Optional. Default 0. |
Example
const jitter = interleavedNoise(mul(uv, viewport), frame)
See also
hashNoise— Random 0–1 per point, with no smoothness between neighbours.sensorGrain— Adds a fine per-pixel brightness jitter, so rendered light reads as photographed.