Pass:setColorWrite

Edit

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.





Arguments

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

Returns

Nothing

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

Arguments

NameTypeDescription
indexnumber The index of the canvas texture to update.
enableboolean Whether all color components should be affected by draws.

Returns

Nothing

Arguments

NameTypeDescription
indexnumber The index of the canvas texture to update.
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