DirectX Raytracing (DXR) now supports Opacity Micromaps (OMMs), enabling hardware to handle alpha tested geometry more efficiently than relying only on costly AnyHit shader invocations.
At GDC 2025 DXR 1.2 was announced including OMMs, and you can see it discussed in this: GDC DirectX State Of The Union YouTube Recording. In the video, Remedy showed the performance wins they achieve using a synergistic combination of OMMs and Shader Execution Reordering in Alan Wake 2.
Out of the gate all NVIDIA raytracing capable hardware supports OMMs (currently developer preview drivers). Over time additional hardware vendor support for OMMs will appear.
The rest of this blog summarizes the feature, how to get bits, and highlights some sample code to help get started.
Parent blog for all other features in this release.
Motivation
Very high quality, high-definition opacity (alpha) content is usually very coherent, or locally similar.
Typically, there are larger regions that are completely transparent or opaque within meshes that do not necessarily coincide with triangle boundaries.
Furthermore, in DXR Tier 1.1, the opaque/non-opaque properties of triangles are geometry-wide, but it might be impractical to split up meshes into several geometry pieces. As a consequence, any-hit shaders are often invoked for ray-triangle hits that could be trivially categorized as a miss or a hit.
Overview
To reduce the overhead of redundant and potentially expensive any-hit shaders, Opacity Micromaps (OMMs) are added to triangle primitives as a part of DXR Tier 1.2 (D3D12_RAYTRACING_TIER_1_2).
The Opacity Micromap is defined on a sub-triangle detail level, encoded in a uniformly subdivided mesh of 4N micro-triangles, laid out on a 2N × 2N barycentric grid.
Here is a diagram of the first few levels of the subdivision scheme: