Pass:setBlendState

Edit

Sets 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

NameTypeDescription
opBlendOp The blend operation to use for color and alpha.
srcBlendFactor The source factor to use for color and alpha.
dstBlendFactor The destination factor to use for color and alpha.

Returns

Nothing

Arguments

NameTypeDescription
opColorBlendOp The blend operation to use for color.
opAlphaBlendOp The blend operation to use for alpha.
srcColorBlendFactor The source factor to use for color.
srcAlphaBlendFactor The source factor to use for alpha.
dstColorBlendFactor The destination factor to use for color.
dstAlphaBlendFactor 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

NameTypeDescription
indexnumber The index of the canvas texture that will use the new blend state.
opBlendOp The blend operation to use for color and alpha.
srcBlendFactor The source factor to use for color and alpha.
dstBlendFactor The destination factor to use for color and alpha.

Returns

Nothing

Sets the blend state for a single canvas texture.

Arguments

NameTypeDescription
indexnumber The index of the canvas texture that will use the new blend state.
opColorBlendOp The blend operation to use for color.
opAlphaBlendOp The blend operation to use for alpha.
srcColorBlendFactor The source factor to use for color.
srcAlphaBlendFactor The source factor to use for alpha.
dstColorBlendFactor The destination factor to use for color.
dstAlphaBlendFactor The destination factor to use for alpha.

Returns

Nothing

Disables blending for a single canvas texture.

Arguments

NameTypeDescription
indexnumber The index of the canvas texture that will use the new blend state.

Returns

Nothing

Notes

This tool can help visualize blend states.

See also