Pass:setColorWrite

Sets the color channels affected by drawing, on a per-channel basis. Disabling color writes is often used to render to the depth or stencil buffer without affecting existing pixel colors.


Pass:setColorWrite(enable)

Arguments

NameTypeDescription
enableboolean Whether all color components should be affected by draws.

Returns

Nothing


Pass:setColorWrite(r, g, b, a)

Arguments

NameTypeDescription
rboolean Whether the red component should be affected by draws.
gboolean Whether the green component should be affected by draws.
bboolean Whether the blue component should be affected by draws.
aboolean Whether the alpha component should be affected by draws.

Returns

Nothing

Notes

By default, color writes are enabled for all channels.

See also