- create a render pass for each blend setup
This commit is contained in:
parent
e472050f36
commit
7f3e473f56
5 changed files with 83 additions and 15 deletions
|
|
@ -189,6 +189,7 @@ public:
|
|||
|
||||
void setAdditiveBlendMode();
|
||||
void setAlphaBlendMode();
|
||||
void setBlendMode(VkBlendOp op, VkBlendFactor src, VkBlendFactor dst);
|
||||
void setSubpassColorAttachmentCount(int count);
|
||||
|
||||
void addVertexShader(VulkanShader *shader);
|
||||
|
|
@ -786,6 +787,17 @@ inline void GraphicsPipelineBuilder::setAlphaBlendMode()
|
|||
colorBlendAttachment.alphaBlendOp = VK_BLEND_OP_ADD;
|
||||
}
|
||||
|
||||
inline void GraphicsPipelineBuilder::setBlendMode(VkBlendOp op, VkBlendFactor src, VkBlendFactor dst)
|
||||
{
|
||||
colorBlendAttachment.blendEnable = VK_TRUE;
|
||||
colorBlendAttachment.srcColorBlendFactor = src;
|
||||
colorBlendAttachment.dstColorBlendFactor = dst;
|
||||
colorBlendAttachment.colorBlendOp = op;
|
||||
colorBlendAttachment.srcAlphaBlendFactor = src;
|
||||
colorBlendAttachment.dstAlphaBlendFactor = dst;
|
||||
colorBlendAttachment.alphaBlendOp = op;
|
||||
}
|
||||
|
||||
inline void GraphicsPipelineBuilder::setSubpassColorAttachmentCount(int count)
|
||||
{
|
||||
colorBlendAttachments.resize(count, colorBlendAttachment);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue