The Framebuffer


Blending

typedef struct VkPipelineColorBlendStateCreateInfo { VkStructureType const void* VkPipelineColorBlendStateCreateFlags VkBool32 VkLogicOp uint32_t const VkPipelineColorBlendAttachmentState* float } VkPipelineColorBlendStateCreateInfo; sType; pNext; flags; logicOpEnable; logicOp; attachmentCount; pAttachments; blendConstants[4];

typedef struct VkPipelineColorBlendAttachmentState { VkBool32 VkBlendFactor VkBlendFactor VkBlendOp VkBlendFactor VkBlendFactor VkBlendOp VkColorComponentFlags blendEnable; srcColorBlendFactor; dstColorBlendFactor; colorBlendOp; srcAlphaBlendFactor; dstAlphaBlendFactor; alphaBlendOp; colorWriteMask; } VkPipelineColorBlendAttachmentState;

typedef enum VkBlendFactor { VK_BLEND_FACTOR_ZERO = 0, VK_BLEND_FACTOR_ONE = 1, VK_BLEND_FACTOR_SRC_COLOR = 2, VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, VK_BLEND_FACTOR_DST_COLOR = 4, VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, VK_BLEND_FACTOR_SRC_ALPHA = 6, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, VK_BLEND_FACTOR_DST_ALPHA = 8, VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, VK_BLEND_FACTOR_CONSTANT_COLOR = 10, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, VK_BLEND_FACTOR_SRC1_COLOR = 15, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, VK_BLEND_FACTOR_SRC1_ALPHA = 17, VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, } VkBlendFactor;

void vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4]);

This command sets blend constants for subsequent drawing commands when the graphics pipeline is created with VK_DYNAMIC_STATE_BLEND_CONSTANTS set in VkPipelineDynamicStateCreateInfo ::pDynamicStates. Otherwise, this state is specified by the VkPipelineColorBlendStateCreateInfo ::blendConstants values used to create the currently active pipeline.

Logical Operations

Color Write Mask

本节教程就到此结束,希望大家继续阅读我之后的教程。

谢谢大家,再见!


原创技术文章,撰写不易,转载请注明出处:电子设备中的画家|王烁 于 2021 年 5 月 10 日发表,原文链接(http://geekfaner.com/shineengine/blog20_Vulkanv1.2_6.html)