RDPipelineColorBlendStateAttachment
Pipeline color blend state attachment (used by RenderingDevice).
Pipeline color blend state attachment (used by RenderingDevice).
Controls how blending between source and destination fragments is performed when using RenderingDevice.
For reference, this is how common user-facing blend modes are implemented in Reckfell's 2D renderer:
Mix:
Add:
Subtract:
Multiply:
Pre-multiplied alpha:
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
RDPipelineColorBlendStateAttachmentConstructor
public RDPipelineColorBlendStateAttachment();Properties11
AlphaBlendOpProperty
public RenderingDevice.BlendOperation AlphaBlendOp { get; set; }The blend mode to use for the alpha channel.
ColorBlendOpProperty
public RenderingDevice.BlendOperation ColorBlendOp { get; set; }The blend mode to use for the red/green/blue color channels.
DstAlphaBlendFactorProperty
public RenderingDevice.BlendFactor DstAlphaBlendFactor { get; set; }Controls how the blend factor for the alpha channel is determined based on the destination's fragments.
DstColorBlendFactorProperty
public RenderingDevice.BlendFactor DstColorBlendFactor { get; set; }Controls how the blend factor for the color channels is determined based on the destination's fragments.
EnableBlendProperty
public bool EnableBlend { get; set; }If true, performs blending between the source and destination according to the factors defined in RDPipelineColorBlendStateAttachment.SrcColorBlendFactor, RDPipelineColorBlendStateAttachment.DstColorBlendFactor, RDPipelineColorBlendStateAttachment.SrcAlphaBlendFactor and RDPipelineColorBlendStateAttachment.DstAlphaBlendFactor. The blend modes RDPipelineColorBlendStateAttachment.ColorBlendOp and RDPipelineColorBlendStateAttachment.AlphaBlendOp are also taken into account, with RDPipelineColorBlendStateAttachment.WriteR, RDPipelineColorBlendStateAttachment.WriteG, RDPipelineColorBlendStateAttachment.WriteB and RDPipelineColorBlendStateAttachment.WriteA controlling the output.
SrcAlphaBlendFactorProperty
public RenderingDevice.BlendFactor SrcAlphaBlendFactor { get; set; }Controls how the blend factor for the alpha channel is determined based on the source's fragments.
SrcColorBlendFactorProperty
public RenderingDevice.BlendFactor SrcColorBlendFactor { get; set; }Controls how the blend factor for the color channels is determined based on the source's fragments.
WriteAProperty
public bool WriteA { get; set; }If true, writes the new alpha channel to the final result.
WriteBProperty
public bool WriteB { get; set; }If true, writes the new blue color channel to the final result.
WriteGProperty
public bool WriteG { get; set; }If true, writes the new green color channel to the final result.
WriteRProperty
public bool WriteR { get; set; }If true, writes the new red color channel to the final result.
Methods23
GetAlphaBlendOpRenderingDevice.BlendOperation
public RenderingDevice.BlendOperation GetAlphaBlendOp();RenderingDevice.BlendOperationGetColorBlendOpRenderingDevice.BlendOperation
public RenderingDevice.BlendOperation GetColorBlendOp();RenderingDevice.BlendOperationGetDstAlphaBlendFactorRenderingDevice.BlendFactor
public RenderingDevice.BlendFactor GetDstAlphaBlendFactor();RenderingDevice.BlendFactorGetDstColorBlendFactorRenderingDevice.BlendFactor
public RenderingDevice.BlendFactor GetDstColorBlendFactor();RenderingDevice.BlendFactorGetEnableBlendbool
public bool GetEnableBlend();boolGetSrcAlphaBlendFactorRenderingDevice.BlendFactor
public RenderingDevice.BlendFactor GetSrcAlphaBlendFactor();RenderingDevice.BlendFactorGetSrcColorBlendFactorRenderingDevice.BlendFactor
public RenderingDevice.BlendFactor GetSrcColorBlendFactor();RenderingDevice.BlendFactorGetWriteAbool
public bool GetWriteA();boolGetWriteBbool
public bool GetWriteB();boolGetWriteGbool
public bool GetWriteG();boolGetWriteRbool
public bool GetWriteR();boolSetAlphaBlendOpvoid
public void SetAlphaBlendOp(RenderingDevice.BlendOperation pMember);| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.BlendOperation | — |
SetAsMixvoid
public void SetAsMix();Convenience method to perform standard mix blending with straight (non-premultiplied) alpha. This sets RDPipelineColorBlendStateAttachment.EnableBlend to true, RDPipelineColorBlendStateAttachment.SrcColorBlendFactor to RenderingDevice.BlendFactor.SrcAlpha, RDPipelineColorBlendStateAttachment.DstColorBlendFactor to RenderingDevice.BlendFactor.OneMinusSrcAlpha, RDPipelineColorBlendStateAttachment.SrcAlphaBlendFactor to RenderingDevice.BlendFactor.SrcAlpha and RDPipelineColorBlendStateAttachment.DstAlphaBlendFactor to RenderingDevice.BlendFactor.OneMinusSrcAlpha.
SetColorBlendOpvoid
public void SetColorBlendOp(RenderingDevice.BlendOperation pMember);| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.BlendOperation | — |
SetDstAlphaBlendFactorvoid
public void SetDstAlphaBlendFactor(RenderingDevice.BlendFactor pMember);| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.BlendFactor | — |
SetDstColorBlendFactorvoid
public void SetDstColorBlendFactor(RenderingDevice.BlendFactor pMember);| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.BlendFactor | — |
SetEnableBlendvoid
public void SetEnableBlend(bool pMember);| Name | Type | Default |
|---|---|---|
pMember | bool | — |
SetSrcAlphaBlendFactorvoid
public void SetSrcAlphaBlendFactor(RenderingDevice.BlendFactor pMember);| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.BlendFactor | — |
SetSrcColorBlendFactorvoid
public void SetSrcColorBlendFactor(RenderingDevice.BlendFactor pMember);| Name | Type | Default |
|---|---|---|
pMember | RenderingDevice.BlendFactor | — |
SetWriteAvoid
public void SetWriteA(bool pMember);| Name | Type | Default |
|---|---|---|
pMember | bool | — |
SetWriteBvoid
public void SetWriteB(bool pMember);| Name | Type | Default |
|---|---|---|
pMember | bool | — |
SetWriteGvoid
public void SetWriteG(bool pMember);| Name | Type | Default |
|---|---|---|
pMember | bool | — |
SetWriteRvoid
public void SetWriteR(bool pMember);| Name | Type | Default |
|---|---|---|
pMember | bool | — |