dotScreenMask

The dot coverage of one halftone screen: 1 inside a dot, 0 between, with the dot size set by an ink amount.

dotScreenMask(
  uv: Expr,
  aspect: Expr,
  angle: Expr,
  intensity: Expr,
  frequency: Expr,
): Expr

Import patterns from shaders/std and use patterns.dotScreenMask.

A raw building block for a custom press inside a gather build. uv is the pixel's uv and aspect the canvas aspect (ctx.uv, ctx.aspect). angle is the screen angle in degrees. intensity 0–1 is the ink amount at this pixel; 0 leaves no dot. frequency is the number of dots down the canvas height.

Parameters

NameTypeNotes
uvExpr
aspectExpr
angleExpr
intensityExpr
frequencyExpr

Example

const dots = dotScreenMask(ctx.uv, ctx.aspect, uniforms.angle, intensity, uniforms.frequency)

See also

  • inkTransmission — How much light passes one ink plate: white where the dot mask is 0, the ink color where it is 1.
  • cmykPress — A four-color print filter: the layer inside it separated into ink plates, each screened into dots at its own angle and laid down on paper in order.
  • dotScreen — A classic halftone filter: the layer inside it redrawn as a grid of dots that grow where it is bright.