I create graphic pipeline with blend (VkGraphicsPipelineCreateInfo pipeline.pColorBlendState = &cb)
Vulkan have next blend parameters:
[b]
VkPipelineColorBlendStateCreateInfo cb
cb.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
VkPipelineColorBlendAttachmentState att_state0
att_state0.colorWriteMask = 0xf
att_state0.blendEnable = VK_TRUE
att_state0.alphaBlendOp = VK_BLEND_OP_ADD
att_state0.colorBlendOp = VK_BLEND_OP_ADD
att_state0.srcColorBlendFactor = VK_BLEND_FACTOR_SRC_COLOR
att_state0.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
att_state0.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE
att_state0.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO
cb.attachmentCount = 1
cb.pAttachments = &att_state0
cb.logicOpEnable = 0
cb.logicOp = VK_LOGIC_OP_NO_OP
Ejj = 1.0
cb.blendConstants0 = Ejj
cb.blendConstants1 = Ejj
cb.blendConstants2 = Ejj
cb.blendConstants3 = Ejj
[/b]
Where is read about all this parameters and what his do ?
-
-
- Updated - - -
-
I changed next parameters, but not see on screen changes :
att_state0.alphaBlendOp = VK_BLEND_OP_ADD
att_state0.colorBlendOp = VK_BLEND_OP_ADD
att_state0.srcColorBlendFactor = VK_BLEND_FACTOR_SRC_COLOR
att_state0.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
att_state0.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE
att_state0.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO
I try this but nothing changed on screen :
cb.logicOpEnable = VK_TRUE
cb.logicOp = VK_LOGIC_OP_AND
cb.blendConstants0 = 0.7
cb.blendConstants1 = 0.1
cb.blendConstants2 = 0.2
cb.blendConstants3 = 0.5
att_state0.alphaBlendOp = VK_BLEND_OP_MIN
att_state0.colorBlendOp = VK_BLEND_OP_ADD
att_state0.srcColorBlendFactor = VK_BLEND_FACTOR_SRC_COLOR
att_state0.dstColorBlendFactor = VK_BLEND_FACTOR_ONE
att_state0.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE
att_state0.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO