VkAccelerationStructureTrianglesOpacityMicromapEXT(3)

# VkAccelerationStructureTrianglesOpacityMicromapEXT(3) Manual Page

## Name

VkAccelerationStructureTrianglesOpacityMicromapEXT - Structure specifying an opacity micromap in a bottom-level acceleration structure

Loading… please wait.

## C Specification

The `VkAccelerationStructureTrianglesOpacityMicromapEXT` structure is defined as:

    // Provided by VK_EXT_opacity_micromap
    typedef struct VkAccelerationStructureTrianglesOpacityMicromapEXT {
        VkStructureType                     sType;
        void*                               pNext;
        VkIndexType                         indexType;
        VkDeviceOrHostAddressConstKHR       indexBuffer;
        VkDeviceSize                        indexStride;
        uint32_t                            baseTriangle;
        uint32_t                            usageCountsCount;
        const VkMicromapUsageEXT*           pUsageCounts;
        const VkMicromapUsageEXT* const*    ppUsageCounts;
        VkMicromapEXT                       micromap;
    } VkAccelerationStructureTrianglesOpacityMicromapEXT;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `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 `VkAccelerationStructureTrianglesOpacityMicromapEXT` 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`. If that value is the unsigned cast of one of the values from VkOpacityMicromapSpecialIndexEXT then that triangle behaves as described for that special value in Ray Opacity Micromap. Otherwise that triangle uses the opacity 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 and special index handling must be equal to the sum of matching `count` provided.

If `micromap` is VK_NULL_HANDLE, then every value read from `indexBuffer` must be one of the values in `VkOpacityMicromapSpecialIndexEXT`.

Valid Usage

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-pUsageCounts-07335
  Only one of `pUsageCounts` or `ppUsageCounts` can be a valid pointer, the other must be `NULL`.

Valid Usage (Implicit)

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-sType-sType
  `sType` must be `VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT`

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-indexType-parameter
  `indexType` must be a valid VkIndexType value

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-pUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `pUsageCounts` is not `NULL`, `pUsageCounts` must be a valid pointer to an array of `usageCountsCount` VkMicromapUsageEXT structures

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-ppUsageCounts-parameter
  If `usageCountsCount` is not `0`, and `ppUsageCounts` is not `NULL`, `ppUsageCounts` must be a valid pointer to an array of `usageCountsCount` valid pointers to VkMicromapUsageEXT structures

- VUID-VkAccelerationStructureTrianglesOpacityMicromapEXT-micromap-parameter
  `micromap` must be a valid VkMicromapEXT handle

## See Also

VK_EXT_opacity_micromap, VkDeviceOrHostAddressConstKHR, `VkDeviceSize`, VkIndexType, VkMicromapEXT, VkMicromapUsageEXT, VkStructureType

## 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.

## Copyright

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0