Pass:setBlendState
EditSets the raw blend states. This is a lower-level alternative to Pass:setBlendMode. When a pixel is drawn, the blend state controls how it is mixed with the color and alpha of the pixel underneath it.
Arguments
| Name | Type | Description |
| op | BlendOp | The blend operation to use for color and alpha. |
| src | BlendFactor | The source factor to use for color and alpha. |
| dst | BlendFactor | The destination factor to use for color and alpha. |
Returns
Nothing
Arguments
| Name | Type | Description |
| opColor | BlendOp | The blend operation to use for color. |
| opAlpha | BlendOp | The blend operation to use for alpha. |
| srcColor | BlendFactor | The source factor to use for color. |
| srcAlpha | BlendFactor | The source factor to use for alpha. |
| dstColor | BlendFactor | The destination factor to use for color. |
| dstAlpha | BlendFactor | The destination factor to use for 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 state for a single canvas texture.
Arguments
| Name | Type | Description |
| index | number | The index of the canvas texture that will use the new blend state. |
| op | BlendOp | The blend operation to use for color and alpha. |
| src | BlendFactor | The source factor to use for color and alpha. |
| dst | BlendFactor | The destination factor to use for color and alpha. |
Returns
Nothing
Sets the blend state for a single canvas texture.
Arguments
| Name | Type | Description |
| index | number | The index of the canvas texture that will use the new blend state. |
| opColor | BlendOp | The blend operation to use for color. |
| opAlpha | BlendOp | The blend operation to use for alpha. |
| srcColor | BlendFactor | The source factor to use for color. |
| srcAlpha | BlendFactor | The source factor to use for alpha. |
| dstColor | BlendFactor | The destination factor to use for color. |
| dstAlpha | BlendFactor | The destination factor to use for 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 state. |
Returns
Nothing
Notes
This tool can help visualize blend states.