This sample demonstrates the implementation of Opacity Micro-Maps in Vulkan for efficient ray tracing.
- Encodes visibility for triangle sub-regions
- Triangle classification: opaque (blue), transparent unknown (red), transparent (invisible)
- Selective AnyHit shader invocation based on opacity state
4^subdivision
triangles per subdivision level- Barycentric coordinate mapping using
BirdCurveHelper::micro2bary
- World position projection for radius-based classification
- Value Buffer: 2-state (1-bit) or 4-state (2-bit) opacity encoding
VkMicromapTriangleEXT
Buffer: Maps triangles to value buffer data- Index Buffer: Continuous array for
VkMicromapTriangleEXT
indexing VkMicromapEXT
: Constructed from above data
VkAccelerationStructureTrianglesOpacityMicromapEXT
attachment- Linked via
pNext
ofVkAccelerationStructureGeometryTrianglesDataKHR
- Automated asset conversion for ray tracing optimization
- Texture and geometry analysis
- Runtime or offline processing capabilities
- CPU and GPU conversion options
- Compatible with various ray tracing applications
- Flexible API for pipeline integration
- Supports diverse hardware and software configurations