Engine API Reference
    Preparing search index...

    Class BlendState

    BlendState is a descriptor that defines how output of fragment shader is written and blended into render target. A blend state can be set on a material using Material#blendState, or in some cases on the graphics device using GraphicsDevice#setBlendState.

    For the best performance, do not modify blend state after it has been created, but create multiple blend states and assign them to the material or graphics device as needed.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    ADDBLEND: BlendState = ...

    A blend state that does simple additive blending.

    ALPHABLEND: BlendState = ...

    A blend state that does simple translucency using alpha channel.

    NOBLEND: BlendState = ...

    A blend state that has blending disabled and writes to all color channels.

    NOWRITE: BlendState = ...

    A blend state that does not write to color channels.

    Accessors

    • get blend(): boolean

      Gets whether blending is enabled.

      Returns boolean

    • set blend(value: boolean): void

      Sets whether blending is enabled.

      Parameters

      • value: boolean

      Returns void

    Methods

    • Returns an identical copy of the specified blend state.

      Returns BlendState

      The result of the cloning.

    • Reports whether two BlendStates are equal.

      Parameters

      Returns boolean

      True if the blend states are equal and false otherwise.