public GraphicsPipelineBuilder AttachmentBlendOff(uint attachment, VkColorComponentFlag writeMask = VkColorComponentFlag.R | VkColorComponentFlag.G | VkColorComponentFlag.B | VkColorComponentFlag.A) { _blendAttachmentStates.Add(attachment, new VkPipelineColorBlendAttachmentState() { BlendEnable = false, ColorWriteMask = writeMask }); return(this); }
public GraphicsPipelineBuilder AttachmentBlendOn(uint attachment, VkBlendFactor srcColorFactor, VkBlendFactor dstColorFactor, VkBlendOp colorOp, VkBlendFactor?srcAlphaFactor = null, VkBlendFactor?dstAlphaFactor = null, VkBlendOp?alphaOp = null, VkColorComponentFlag writeMask = VkColorComponentFlag.R | VkColorComponentFlag.G | VkColorComponentFlag.B | VkColorComponentFlag.A) { if (!srcAlphaFactor.HasValue) { srcAlphaFactor = srcColorFactor; } if (!dstAlphaFactor.HasValue) { dstAlphaFactor = dstColorFactor; } if (!alphaOp.HasValue) { alphaOp = colorOp; } _blendAttachmentStates.Add(attachment, new VkPipelineColorBlendAttachmentState() { BlendEnable = true, SrcColorBlendFactor = srcColorFactor, DstColorBlendFactor = dstColorFactor, ColorBlendOp = colorOp, SrcAlphaBlendFactor = srcAlphaFactor.Value, DstAlphaBlendFactor = dstAlphaFactor.Value, AlphaBlendOp = alphaOp.Value, ColorWriteMask = writeMask }); return(this); }