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
Section titled “Parameters”inputColor
Section titled “inputColor”Node <"vec4">
The input color (vec4 with alpha)
Number of color bands (2-16 typical)
gamma?
Section titled “gamma?”FloatInput = 2.2
Gamma value (default: 2.2 for sRGB)
Returns
Section titled “Returns”Node <"vec4">
Posterized color with gamma correction
Examples
Section titled “Examples”// Gamma-corrected posterizationposterizeGamma(color, 4)// Custom gammaposterizeGamma(color, 4, 1.8)