Functions that build tileable PBR-material texture sets at runtime.
Each painter returns a MaterialMaps triple: a colour map, a
tangent-space normal map, and a metallic-roughness map. Each map is
a MaterialPixelBuffer ({ data: Uint8ClampedArray, width, height }) carrying RGBA8 pixels in row-major order.
Each painter takes a single size argument (the square texture's
pixel side). The output tiles seamlessly through use of the periodic
noise primitives exported from the same module.
Procedural PBR Materials
Functions that build tileable PBR-material texture sets at runtime. Each painter returns a MaterialMaps triple: a colour map, a tangent-space normal map, and a metallic-roughness map. Each map is a MaterialPixelBuffer (
{ data: Uint8ClampedArray, width, height }) carrying RGBA8 pixels in row-major order.Painters are grouped into four categories:
Each painter takes a single
sizeargument (the square texture's pixel side). The output tiles seamlessly through use of the periodic noise primitives exported from the same module.Usage