Pass:setBlendMode
EditSets the blend mode. When a pixel is drawn, the blend mode controls how it is mixed with the color and alpha of the pixel underneath it.
Sets the blend mode for all canvas textures.
Arguments
Name | Type | Description |
blend | BlendMode | The blend mode. |
alphaBlend | BlendAlphaMode | The alpha blend mode, used to control premultiplied alpha. |
Returns
Nothing
Disables blending. When something is drawn, its pixel colors will replace any existing color in the target texture. This can work okay for opaque objects, but won't render text or transparency properly.
Arguments
None
Returns
Nothing
Sets the blend mode for a single canvas texture.
Arguments
Name | Type | Description |
index | number | The index of the canvas texture that will use the new blend mode. |
blend | BlendMode | The blend mode. |
alphaBlend | BlendAlphaMode | The alpha blend mode, used to control premultiplied alpha. |
Returns
Nothing
Disables blending for a single canvas texture.
Arguments
Name | Type | Description |
index | number | The index of the canvas texture that will use the new blend mode. |
Returns
Nothing
Notes
The default blend mode is alpha
with the alphamultiply
alpha mode.