Class VkPipelineCoverageModulationStateCreateInfoNV

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class VkPipelineCoverageModulationStateCreateInfoNV extends Struct<VkPipelineCoverageModulationStateCreateInfoNV> implements NativeResource
Structure specifying parameters controlling coverage modulation.
Description

If coverageModulationTableEnable is FALSE, then for each color sample the associated bits of the pixel coverage are counted and divided by the number of associated bits to produce a modulation factor R in the range (0,1] (a value of zero would have been killed due to a color coverage of 0). Specifically:

  • N = value of rasterizationSamples
  • M = value of VkAttachmentDescription::samples for any color attachments
  • R = popcount(associated coverage bits) / (N / M)

If coverageModulationTableEnable is TRUE, the value R is computed using a programmable lookup table. The lookup table has N / M elements, and the element of the table is selected by:

  • R = pCoverageModulationTable[popcount(associated coverage bits)-1]

Note that the table does not have an entry for popcount(associated coverage bits) = 0, because such samples would have been killed.

The values of pCoverageModulationTable may be rounded to an implementation-dependent precision, which is at least as fine as 1 / N, and clamped to [0,1].

For each color attachment with a floating point or normalized color format, each fragment output color value is replicated to M values which can each be modulated (multiplied) by that color sample’s associated value of R. Which components are modulated is controlled by coverageModulationMode.

If this structure is not included in the pNext chain, it is as if coverageModulationMode is COVERAGE_MODULATION_MODE_NONE_NV.

If the coverage reduction mode is COVERAGE_REDUCTION_MODE_TRUNCATE_NV, each color sample is associated with only a single coverage sample. In this case, it is as if coverageModulationMode is COVERAGE_MODULATION_MODE_NONE_NV.

Valid Usage
  • If coverageModulationTableEnable is TRUE, coverageModulationTableCount must be equal to the number of rasterization samples divided by the number of color samples in the subpass
Valid Usage (Implicit)

Layout


 struct VkPipelineCoverageModulationStateCreateInfoNV {
     VkStructureType sType();
     void const * pNext();
     VkPipelineCoverageModulationStateCreateFlagsNV flags();
     VkCoverageModulationModeNV coverageModulationMode();
     VkBool32 coverageModulationTableEnable();
     uint32_t coverageModulationTableCount();
     float const * pCoverageModulationTable();
 }