surfaceNoise

Smooth signed noise at a 2D point, roughly −1 to 1, with features about one unit wide.

surfaceNoise(x: Expr | number, y: Expr | number): Expr

Import materials from shaders/std and use materials.surfaceNoise.

The basis for grain, crumple and frost. Scale the inputs to set the feature size.

Parameters

NameTypeNotes
xExpr | number
yExpr | number

Example

const grain = surfaceNoise(mul(pat.member('x'), 140), mul(pat.member('y'), 140))

See also

  • surfaceNoiseAt — surfaceNoise at a 2D point you already hold.
  • valueNoise — Smooth noise 0–1 at a 2D point, softer and blockier than surfaceNoise.
  • hashNoise — Random 0–1 per point, with no smoothness between neighbours.
  • grainNoise — One octave of smooth signed noise along and across a direction, for grain.

Used by

CarbonFiber, Frost, Hologram, Holographic, Plastic