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 rasterizationSamplesM = value of VkAttachmentDescription::samples for any color attachmentsR = 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.
coverageModulationTableEnable is TRUE, coverageModulationTableCount must be equal to the number of rasterization samples divided by the number of color samples in the subpasssType must be STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NVflags must be 0coverageModulationMode must be a valid VkCoverageModulationModeNV value
struct VkPipelineCoverageModulationStateCreateInfoNV {
VkStructureType sType;
void const * pNext;
VkPipelineCoverageModulationStateCreateFlagsNV flags;
VkCoverageModulationModeNV coverageModulationMode;
VkBool32 coverageModulationTableEnable;
uint32_t coverageModulationTableCount;
float const * pCoverageModulationTable;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | COVERAGEMODULATIONMODE
The struct member offsets. |
| public static final int | COVERAGEMODULATIONTABLECOUNT
The struct member offsets. |
| public static final int | COVERAGEMODULATIONTABLEENABLE
The struct member offsets. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | PCOVERAGEMODULATIONTABLE
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkPipelineCoverageModulationStateCreateInfoNV(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | |
| public int | coverageModulationMode()
a |
| public VkPipelineCoverageModulationStateCreateInfoNV | |
| public int | |
| public VkPipelineCoverageModulationStateCreateInfoNV | coverageModulationTableCount(int value)
Sets the specified value to the |
| public boolean | coverageModulationTableEnable()
controls whether the modulation factor is looked up from a table in |
| public VkPipelineCoverageModulationStateCreateInfoNV | coverageModulationTableEnable(boolean value)
Sets the specified value to the |
| protected VkPipelineCoverageModulationStateCreateInfoNV | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkPipelineCoverageModulationStateCreateInfoNV | create()
Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV | create(long address)
Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | create(int
the buffer capacity capacity)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | |
| public int | |
| public VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | |
| public static VkPipelineCoverageModulationStateCreateInfoNV. | |
| public static int | |
| public static void | |
| public static int | |
| public static void | ncoverageModulationTableCount(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | ncoverageModulationTableEnable(long struct, int value)
Unsafe version of |
| public static int | |
| public static void | |
| public static FloatBuffer | |
| public static void | npCoverageModulationTable(long struct, FloatBuffer value)
Unsafe version of |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public FloatBuffer | pCoverageModulationTable()
a table of modulation factors containing a value for each number of covered samples. |
| public VkPipelineCoverageModulationStateCreateInfoNV | pCoverageModulationTable(FloatBuffer value)
Sets the address of the specified |
| public long | |
| public VkPipelineCoverageModulationStateCreateInfoNV | |
| public VkPipelineCoverageModulationStateCreateInfoNV | set(int sType, long pNext, int flags, int coverageModulationMode, boolean coverageModulationTableEnable, int coverageModulationTableCount, FloatBuffer pCoverageModulationTable)
Initializes this struct with the specified values. |
| public VkPipelineCoverageModulationStateCreateInfoNV | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkPipelineCoverageModulationStateCreateInfoNV | |
| public VkPipelineCoverageModulationStateCreateInfoNV | sType$Default()
Sets the |