Transparent objects are very common in the environment we see every day around us. Such objects are also common in 3D applications. To simulate transparent materials and simplify operations that the hardware needs to perform to render transparent objects, blending was introduced. It mixes the color of a processed fragment with a color that is already stored in a framebuffer. Parameters for this operation are prepared through a graphics pipeline's blend state.
Specifying a pipeline blend state
How to do it...
- Create a variable of type VkPipelineColorBlendAttachmentState named attachment_blend_states.
- For each color attachment used in a subpass in which a given graphics pipeline is bound, add a new element to the attachment_blend_states vector. If the independentBlend...