C Specification
The VkAccelerationStructureTrianglesDisplacementMicromapNV
structure
is defined as:
// Provided by VK_NV_displacement_micromap
typedef struct VkAccelerationStructureTrianglesDisplacementMicromapNV {
VkStructureType sType;
void* pNext;
VkFormat displacementBiasAndScaleFormat;
VkFormat displacementVectorFormat;
VkDeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer;
VkDeviceSize displacementBiasAndScaleStride;
VkDeviceOrHostAddressConstKHR displacementVectorBuffer;
VkDeviceSize displacementVectorStride;
VkDeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags;
VkDeviceSize displacedMicromapPrimitiveFlagsStride;
VkIndexType indexType;
VkDeviceOrHostAddressConstKHR indexBuffer;
VkDeviceSize indexStride;
uint32_t baseTriangle;
uint32_t usageCountsCount;
const VkMicromapUsageEXT* pUsageCounts;
const VkMicromapUsageEXT* const* ppUsageCounts;
VkMicromapEXT micromap;
} VkAccelerationStructureTrianglesDisplacementMicromapNV;
Members
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
displacementBiasAndScaleFormat
is the format of displacement bias and scale used in this displacement micromap reference. -
displacementVectorFormat
is the format of displacement vector used in this displacement micromap reference. -
displacementBiasAndScaleBuffer
is the address containing the bias and scale. -
displacementBiasAndScaleStride
is the byte stride between bias and scale values. -
displacementVectorBuffer
is the address containing the displacement vector values. -
displacementVectorStride
is the byte stride between displacement vector values. -
displacedMicromapPrimitiveFlags
is the address containing the primitive flags. -
displacedMicromapPrimitiveFlagsStride
is the byte stride between primitive flag values. -
indexType
is the type of triangle indices used when indexing this micromap. -
indexBuffer
is the address containing the triangle indices. -
indexStride
is the byte stride between triangle indices. -
baseTriangle
is the base value added to the non-negative triangle indices. -
usageCountsCount
specifies the number of usage counts structures that will be used to determine the size of this micromap. -
pUsageCounts
is a pointer to an array of VkMicromapUsageEXT structures. -
ppUsageCounts
is a pointer to an array of pointers to VkMicromapUsageEXT structures. -
micromap
is the handle to the micromap object to include in this geometry.
Description
If VkAccelerationStructureTrianglesDisplacementMicromapNV
is included
in the pNext
chain of a
VkAccelerationStructureGeometryTrianglesDataKHR structure, that
geometry will reference that micromap.
For each triangle in the geometry, the acceleration structure build fetches
an index from indexBuffer
using indexType
and indexStride
.
That triangle uses the displacement micromap information from micromap
at that index plus baseTriangle
.
Only one of pUsageCounts
or ppUsageCounts
can be a valid
pointer, the other must be NULL
.
The elements of the non-NULL
array describe the total count used to build
this geometry.
For a given format
and subdivisionLevel
the number of triangles
in this geometry matching those values after indirection must be equal to
the sum of matching count
provided.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.