N E W
Premultiplies the RGB channels of a color by its alpha channel.
This function is useful for converting a non-premultiplied alpha color into a premultiplied alpha format, where the RGB values are scaled by the alpha value. Premultiplied alpha is often used in graphics rendering for certain operations, such as compositing and image processing.
| Parameter | Type | Default Value |
|---|---|---|
| color | Node<vec4> | — |
Returns
Node<vec4>N E W
Unpremultiplies the RGB channels of a color by its alpha channel.
This function is useful for converting a premultiplied alpha color back into a non-premultiplied alpha format, where the RGB values are divided by the alpha value. Unpremultiplied alpha is often used in graphics rendering for certain operations, such as compositing and image processing.
| Parameter | Type | Default Value |
|---|---|---|
| color | Node<vec4> | — |
Returns
Node<vec4>