Pass:setColorWrite
EditSets 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
Name | Type | Description |
enable | boolean | Whether all color components should be affected by draws. |
Returns
Nothing
Arguments
Name | Type | Description |
r | boolean | Whether the red component should be affected by draws. |
g | boolean | Whether the green component should be affected by draws. |
b | boolean | Whether the blue component should be affected by draws. |
a | boolean | Whether the alpha component should be affected by draws. |
Returns
Nothing
Arguments
Name | Type | Description |
index | number | The index of the canvas texture to update. |
enable | boolean | Whether all color components should be affected by draws. |
Returns
Nothing
Arguments
Name | Type | Description |
index | number | The index of the canvas texture to update. |
r | boolean | Whether the red component should be affected by draws. |
g | boolean | Whether the green component should be affected by draws. |
b | boolean | Whether the blue component should be affected by draws. |
a | boolean | Whether the alpha component should be affected by draws. |
Returns
Nothing
Notes
By default, color writes are enabled for all channels.