Skip to content

grayscale

grayscale(inputColor): Node<"vec4">

Defined in: packages/nodes/src/color/saturate.ts:49

Convert color to grayscale using luminance weights. Shorthand for saturate(color, 0).

Parameters

inputColor

Node<"vec4">

The input color (vec4 with alpha)

Returns

Node<"vec4">

Grayscale color

Example

grayscale(texture(tex, uv()))