posterizeGamma
posterizeGamma(
inputColor,bands,gamma):Node<"vec4">
Defined in: packages/nodes/src/retro/posterize.ts:52
Posterize with gamma correction for more perceptually uniform bands. Applies gamma before quantization and inverse gamma after.
Parameters
inputColor
Node<"vec4">
The input color (vec4 with alpha)
bands
Number of color bands (2-16 typical)
gamma
FloatInput = 2.2
Gamma value (default: 2.2 for sRGB)
Returns
Node<"vec4">
Posterized color with gamma correction
Examples
// Gamma-corrected posterizationposterizeGamma(color, 4)// Custom gammaposterizeGamma(color, 4, 1.8)