cellNoiseAt

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

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

NameTypeNotes
pExpr

Example

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

See also

  • fdSlope — The value and slope of any field at a point: value, dx and dy.
  • surfaceNoiseAt — surfaceNoise at a 2D point you already hold.
  • pointStars — A plane of sparse glinting points: stars, glitter, dust.

Used by

Crystal