Skip to content

NormalBump = "alpha" | "luminance" | "red" | "green" | "blue" | "none"

Defined in: packages/normals/src/descriptor.ts:113

Per-texel bump source inside a region. Each non-‘none’ mode runs a central-difference gradient on the named channel; the result is treated as a height field where high values are raised and low values are sunken. Negative strength inverts (dark = raised).

  • 'alpha' — gradient on the source alpha channel (default). Preserves sprite silhouette edges — the classic path for transparent sprites. Solid opaque regions produce no bump.
  • 'luminance' — gradient on Rec. 709 luminance (0.2126·R + 0.7152·G + 0.0722·B). Brick faces read as raised; dark mortar lines read as sunken grooves. Right mode for solid opaque tilesets.
  • 'red' / 'green' / 'blue' — gradient on a single color channel. Use when your art treats one channel as a height map (e.g., packing height into the red channel of a data texture).
  • 'none' — flat fill at the region’s tilt direction. No per-texel variation; cheapest and useful for uniform surfaces.