How it works...

The blending state is optional and is not required if rasterization is disabled or when there are no color attachments in a subpass, in which a given graphics pipeline is used.

The blending state is used mainly to define the parameters of a blending operation. But it also serves other purposes. In it we specify a color mask which selects which color components are updated (written to) during rendering. It also controls the state of a logical operation. When enabled, one of the specified logical operations is performed between a fragment's color and a color already written in a framebuffer.

A logical operation is performed only for attachments with integer and normalized integer formats.

Supported logical operations include: ...

Get Vulkan Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.