Fact-checked by Grok 2 weeks ago

DirectX Raytracing

DirectX Raytracing (DXR) is a hardware-accelerated ray tracing extension to 12 graphics platform, enabling developers to simulate realistic light interactions in real-time for effects such as , reflections, shadows, and refractions in and applications. It treats ray tracing as a peer to traditional rasterization and compute shaders, allowing flexible integration into existing rendering pipelines without requiring a complete overhaul. Announced by on March 19, 2018, DXR was initially developed in collaboration with to leverage specialized ray tracing cores in GPUs, with subsequent support from vendors like , marking a significant advancement in accessible real-time ray tracing for Windows-based development. The core of DXR revolves around acceleration structures—hierarchical data representations of 3D scenes that optimize -scene intersections for performance—and specialized HLSL shader types, including ray generation, closest hit, any hit, and miss shaders, which handle launching and intersection responses. Developers dispatch tracing workloads using the DispatchRays command, which supports both CPU-initiated and GPU-initiated execution via indirect calls, enabling scalable parallelism across . Key optimizations include watertight triangle intersections to prevent artifacts, procedural geometry support, and flags for non-essential tests, all contributing to efficient traversal of complex scenes. DXR's hardware support is tiered to accommodate varying GPU capabilities, starting with Tier 1.0 for basic ray tracing on compatible hardware like series or architectures, progressing to Tier 1.1 with features like inline ray querying (via RayQuery) for hybrid rasterization-ray tracing, and Tier 1.2 introducing shader execution reordering (SER) and opacity micromaps for enhanced transparency handling and performance. Integration with 12 occurs through state objects that bundle s, root signatures, and configurations, allowing dynamic binding via shader tables during execution. A fallback layer was initially provided for non-hardware-accelerated systems but has been deprecated as native support proliferated. Since its debut, DXR has powered notable implementations in engines like and , fostering advancements in photorealistic rendering while maintaining compatibility with broader ecosystems. Ongoing updates, as detailed in the DXR functional specification (version 1.34, updated June 30, 2025), continue to refine features like recursion limits (up to 31 levels) and build optimizations for acceleration structures, ensuring DXR remains a cornerstone for future graphics innovations.

History and Development

Announcement and Initial Release

DirectX Raytracing (DXR) was announced on March 19, 2018, at the Game Developers Conference (GDC) in by and , as a new extension to the 12 designed to provide hardware-accelerated ray tracing capabilities for real-time rendering in games and applications. The announcement positioned DXR as an that integrates seamlessly with existing 12 workflows, allowing developers to incorporate ray-traced effects without requiring major engine redesigns. The initial development of DXR involved close collaboration between and , who demonstrated early hardware support through NVIDIA's RTX technology on and Turing architectures. At the GDC announcement, showcased real-time ray tracing demos built with DXR, including photorealistic scenes in Unreal Engine 4 that highlighted hybrid rendering techniques combining rasterization and ray tracing. These demonstrations emphasized DXR's potential to deliver advanced visual fidelity on consumer GPUs, marking the first public reveal of ray tracing acceleration in a major graphics API. DXR officially launched to the public on October 2, 2018, as part of the October 2018 Update (version 1809), enabling out-of-the-box support on compatible hardware without additional installations. The feature requires a 12-compatible with hardware ray tracing support, such as NVIDIA's RTX 20-series GPUs paired with the corresponding Game Ready Driver (version 416.16 or later). Key motivations for DXR's introduction included facilitating real-time ray tracing for effects like , realistic reflections, soft shadows, and refractions, thereby enhancing graphical realism in games while leveraging existing ecosystems.

Early Adoption and Milestones

Following the initial release of DirectX Raytracing (DXR), the technology saw its first major game integration with in November 2018, marking it as the inaugural title to leverage DXR for real-time ray-traced reflections. This implementation demonstrated DXR's potential for enhancing visual fidelity in large-scale multiplayer environments, though it required NVIDIA's RTX 20-series GPUs for optimal performance. Building on this momentum, followed in February 2019, utilizing DXR to achieve advanced effects in its post-apocalyptic settings, further showcasing the API's versatility in single-player narratives. arrived in August 2019 as another early adopter, employing DXR for intricate ray-traced reflections, shadows, and indirect lighting that integrated seamlessly with its surreal architectural designs. Hardware accessibility expanded significantly in 2020 with AMD's architecture in the , which introduced hardware-accelerated ray tracing support for DXR, allowing broader adoption beyond NVIDIA's ecosystem. This shift democratized DXR implementation for developers targeting cross-vendor compatibility. Further broadening support, Intel's GPUs launched in 2022 with native DXR acceleration via their Xe-HPG architecture, enabling ray tracing on and reducing dependency on specific vendors. Key milestones in DXR's early years included its integration into major game engines, accelerating developer adoption. Unreal Engine 4.22, released in April 2019, introduced beta support for DXR, enabling real-time ray tracing and features that simplified implementation for creators. followed suit with ray tracing in its High Definition Render Pipeline (HDRP) starting in late 2019 and stabilizing in 2020, providing tools for ray-traced reflections, shadows, and in projects. In November 2020, introduced DXR 1.1 with features like inline ray querying, enhancing hybrid rendering efficiency and adopted in subsequent engine updates. By 2020, dozens of games supported DXR, reflecting rapid industry uptake as titles across genres incorporated the technology for enhanced realism. Early adoption faced notable challenges, including the high cost of compatible hardware—such as NVIDIA's initial RTX GPUs priced over $1,000—which limited accessibility to enthusiasts and professionals. Additionally, DXR's performance overhead, often reducing frame rates by 30-50% in initial implementations like , prompted developers to adopt hybrid approaches combining rasterization with selective ray tracing to balance visual gains and playability. These hurdles underscored the need for ongoing optimizations in both software and hardware to make DXR viable for mainstream .

Overview and Core Concepts

Integration with DirectX 12

DirectX Raytracing (DXR) integrates seamlessly into the 12 architecture as a first-class peer to the existing rasterization and compute pipelines, preserving the low-level, low-overhead model that defines DX12. This design allows DXR workloads to leverage the same system, including heaps, descriptors, and barriers, without requiring developers to overhaul their existing DX12 applications. By treating ray tracing as an extension rather than a separate paradigm, DXR enables hybrid rendering scenarios where ray-traced effects can be combined with traditional rasterization and compute passes in a single frame. Command list compatibility is a cornerstone of this integration, permitting ray tracing commands to execute on graphics or compute queues alongside conventional draw and dispatch calls. The primary entry point for ray tracing is the DispatchRays() method, which submits ray generation shaders and initiates ray traversal using a D3D12_DISPATCH_RAYS_DESC structure to specify dispatch dimensions such as width, height, and depth. This approach ensures that DXR operations can be recorded into the same command lists and bundles as other DX12 workloads, facilitating efficient GPU utilization and minimal synchronization overhead. For instance, developers can interleave DispatchRays() with DrawInstanced() calls to blend ray-traced with rasterized geometry in real-time applications. State objects provide a flexible mechanism for configuring the tracing , created via the CreateStateObject() with a D3D12_STATE_OBJECT_DESC that bundles states, , and signatures. These objects support incremental construction through subobjects, allowing compiled into DXIL libraries to be associated at runtime, which promotes reusability and adaptability across different rendering scenarios. Once created, the state object is bound using SetPipelineState1(), ensuring compatibility with DX12's while enabling the definition of ray-specific configurations like shader tables for indexing generation, miss, hit, and closest hit . This bundled approach reduces overhead and aligns with DX12's emphasis on explicit control. DXR maintains with 12 feature level 12_0, building upon it through ray tracing tier support queries via CheckFeatureSupport() to determine hardware capabilities. Tiers such as 1.0 provide core functionality, while higher tiers unlock enhancements like additional vertex formats, ensuring that DXR can be progressively adopted without breaking existing DX12 baselines. This tiered system allows applications to query and fallback gracefully, supporting experimentation on a wide range of hardware.

Fundamental Ray Tracing Principles in DXR

Ray tracing is a rendering technique that simulates the physical paths of light rays to produce highly realistic images by modeling interactions such as reflections, refractions, shadows, and . In its fundamental form, rays are cast from the virtual camera through each of the into the scene, where they are tested for with geometric objects; the closest intersection determines the visible surface for that , and subsequent calculations account for material properties and lighting. This backward ray tracing approach, originating from early work on improved illumination models, contrasts with forward light simulation by efficiently focusing computations on viewer-dependent paths. In DirectX Raytracing (DXR), primary rays initiate the process by originating from the camera position, traversing the to establish initial and base color contributions for each . These rays intersect with , triggering shading decisions that may spawn secondary rays from the hit points to simulate indirect effects, such as specular reflections or diffuse bounces. Secondary rays extend the simulation through recursive calls, limited by a configurable maximum depth to prevent excessive computation, thereby capturing multi-bounce light transport while maintaining control over performance. This hierarchical ray enables DXR to approximate without fully tracing all possible light paths. DXR is designed for hybrid rendering pipelines, where ray tracing augments traditional rasterization to leverage the strengths of both methods: rasterization efficiently handles primary visibility and large-scale geometry , while ray tracing adds accurate secondary effects like soft shadows and realistic reflections on demand. This integration allows developers to selectively apply ray tracing to specific scene elements or passes, optimizing for constraints in games and applications. By dispatching rays alongside rasterized draws in the same command list, DXR facilitates seamless blending of techniques for enhanced visual fidelity without overhauling existing rendering systems. A core advantage of DXR lies in its , which dramatically lowers the computational overhead of ray-scene tests compared to pure software implementations, making tracing viable on modern GPUs. Specialized fixed-function traverses structures to quickly identify potential hits, exploiting spatial and reducing the branching costs inherent in software tracing. This enables frame rates suitable for interactive applications, with performance gains scaling to complex scenes where traditional methods falter. DXR briefly references structures for these efficient , though their construction is handled separately.

Technical Implementation

Acceleration Structures

In DirectX Raytracing (DXR), acceleration structures are hierarchical hierarchies (BVHs) that optimize -geometry intersection tests by organizing scene data for efficient traversal during tracing. These structures are essential for achieving performance, as they reduce the computational cost of checking intersections against potentially millions of . DXR supports two primary types: bottom-level acceleration structures (BLAS) for individual and top-level acceleration structures (TLAS) for instancing multiple BLAS in a scene. A bottom-level acceleration (BLAS) encapsulates the raw of a scene, such as meshes or procedural axis-aligned bounding boxes (AABBs), enabling fast queries at the level. Each BLAS is constructed using the D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC , which specifies an array of D3D12_RAYTRACING_GEOMETRY_DESC entries detailing the —either triangles via and buffers or AABBs as an array of bounding boxes. The build process is invoked via the BuildRaytracingAccelerationStructure call on a command list, requiring temporary for construction. Build flags influence the trade-offs: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_PREFER_FAST_TRACE prioritizes tracing performance, typically increasing build time by 2-3x compared to default settings, while D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_UPDATE enables incremental updates to like positions or AABBs without a full rebuild, though this may slightly degrade tracing efficiency. The top-level acceleration structure (TLAS) references multiple BLAS instances to represent the full scene, supporting transformations and visibility culling for dynamic environments. It is built similarly using BuildRaytracingAccelerationStructure, but with an array of D3D12_RAYTRACING_INSTANCE_DESC structures, each a 16-byte aligned descriptor containing a pointer to a BLAS, a 3x4 (also 16-byte aligned), an for shader identification, and an instance mask for ray filtering. This design allows up to 2^24 instances per TLAS, facilitating efficient instancing of repeated geometry like duplicated objects in a game world. Updates to the TLAS, such as redefining instance transforms or masks, can be performed incrementally if built with the ALLOW_UPDATE flag, but changes to the instance count require a complete rebuild. The construction of both BLAS and TLAS involves allocating output buffers in the default heap with D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS and a resource state of D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE. , sized via a pre-build query, handles temporary memory needs during construction. To optimize memory usage post-build, the D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_COMPACTION flag can be set, followed by a compaction step using CopyRaytracingAccelerationStructure in COMPACTED_SIZE mode; the resulting size is queried beforehand with EmitRaytracingAccelerationStructurePostbuildInfo. This process can significantly reduce the structure's footprint, though it adds an extra command list operation. between builds and ray tracing dispatches requires UAV barriers to manage read-write access. DXR imposes strict limits on acceleration structures to ensure and . A single BLAS supports a maximum of 2^24 and 2^29 primitives (including inactive or degenerate ones), while a TLAS is limited to 2^24 instances. All structures must be 256-byte aligned, with buffers using GPU addresses for data. These constraints, combined with implementation-dependent variations queried via capabilities, guide developers in partitioning complex scenes to avoid exceeding bounds.

Ray Tracing Pipeline and Dispatch

The ray tracing pipeline in DirectX Raytracing (DXR) begins with the DispatchRays method, which launches a three-dimensional grid of ray generation shader invocations to initiate ray tracing execution. This dispatch operates on graphics or compute command lists and requires a ray tracing pipeline state to be set beforehand, ensuring the shaders and resources are properly configured for the operation. The grid dimensions are defined by width, height, and depth parameters, each supporting values up to 2^16, allowing for a scalable launch of up to billions of rays depending on the specified extents. The dispatch is controlled through a D3D12_DISPATCH_RAYS_DESC structure, which specifies GPU virtual addresses for shader tables that bind ray generation shaders, miss shaders, hit group shaders, and callable shaders to corresponding regions of grid, along with associated resources such as buffers or textures. These shader tables must be in the D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE state, with alignments of 64 bytes for starting addresses and 32 bytes for strides, enabling flexible mapping of shaders and data to different types or spatial locations. In DXR 1.1, DispatchRays supports indirect invocation via the ExecuteIndirect method, permitting GPU-driven dispatches where grid dimensions and shader table parameters can be dynamically determined on the GPU without CPU intervention. Within the ray generation shaders invoked by DispatchRays, individual rays are defined using the RayDesc structure, which encapsulates the ray's origin as a float3 , direction as a normalized float3 , minimum parametric extent TMin (typically a small positive value like 0.001 to avoid self-intersections), and maximum extent TMax (often set to a large value like 1e30 for unbounded rays). The structure also includes a Flags field for controlling traversal behavior, such as RAY_FLAG_FORCE_OPAQUE to treat all primitive intersections as opaque and skip any hit shaders, thereby optimizing for scenarios like shadow rays where is irrelevant, or RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH to terminate traversal after the first valid hit and invoke the closest hit shader only if not skipped. Once defined, tracing a ray via the TraceRay intrinsic initiates the traversal process, where the is hardware-accelerated through the acceleration structure to perform tests against instances, efficiently non-intersecting nodes and to identify the closest hit along the ray path or determine a complete miss if no occurs within the TMin to TMax bounds. This traversal leverages dedicated units, such as RT cores in compatible GPUs, to accelerate (BVH) navigation and primitive computations, returning control to the calling with updated data reflecting the hit details or miss outcome. The process supports recursive tracing, limited by the 's configured maximum trace recursion depth of 0 to 31 levels, as defined by the constant D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH during state object creation to balance effect complexity with performance overhead. To accommodate recursion, the per-thread call stack size is configured using the SetPipelineStackSize method on the command list prior to dispatch, specifying the memory allocation in bytes for maintaining shader state and local variables across recursive TraceRay calls, with typical values ranging from 1024 to 4096 bytes depending on shader complexity and desired recursion depth.

Shaders and API Calls

DirectX Raytracing (DXR) employs a set of programmable shaders written in High-Level Shading Language (HLSL) to implement ray tracing logic, compiled to the library target model lib_6_3. These shaders are organized into the raytracing pipeline state object and invoked based on ray interactions with acceleration structures. Developers use shader attributes, such as [shader("raygeneration")], to designate shader types within the HLSL code. The primary shader types include the ray generation shader, which acts as the entry point for dispatching rays and typically calls the TraceRay intrinsic to initiate ray traversal. The closest hit shader processes the nearest intersection with geometry, enabling computations like material shading or reflection calculations using intersection data. The any hit shader handles per-primitive logic for transparent or alpha-tested surfaces, where developers can use functions like IgnoreHit to accept or reject hits. The miss shader executes when a ray does not intersect any geometry, often used for environment mapping or sky rendering. Additionally, the intersection shader supports procedural geometry by defining custom intersection tests against bounding volumes, while the callable shader functions as a subroutine, invoked via the CallShader intrinsic for reusable code across the pipeline. Key intrinsics facilitate ray tracing within these shaders. The TraceRay function, callable from ray generation, closest hit, and miss shaders, performs recursive into an acceleration structure, passing a user-defined for data exchange between shaders. In DXR 1.1, the RayQuery object enables inline, non-recursive queries, allowing developers to test rays against multiple structures without . Shaders access ray and hit information through intrinsics such as RayTCurrent, which returns the current along the ray; WorldRayDirection, providing the ray's direction in world space; and GeometryIndex (available in DXR 1.1 and later), which identifies the hit geometry instance. Hit groups bundle shaders relevant to specific geometry types, combining a closest hit shader with optional any hit and intersection shaders into a single unit defined via the D3D12_HIT_GROUP_DESC structure. This allows tailored handling for different materials or object classes during ray traversal. The D3D12_RAYTRACING_SHADER_CONFIG structure configures the pipeline by specifying maximum sizes for ray payloads and hit attributes, limited to 32 bytes each to balance flexibility and performance. Shader tables organize these shaders and hit groups for execution, serving as GPU-accessible buffers that map ray indices to appropriate shader entry points during dispatch.

Hardware and System Requirements

Compatible Graphics Hardware

DirectX Raytracing (DXR) requires graphics hardware compatible with , featuring dedicated ray tracing acceleration units or equivalent capabilities to handle ray intersection and traversal efficiently. These include specialized RT cores in modern GPUs, enabling real-time ray tracing without prohibitive performance costs. Compatibility is determined by querying the device's feature support levels, ensuring developers can adapt applications to available hardware tiers. DXR hardware support is categorized into tiers, assessed via the ID3D12Device::CheckFeatureSupport with D3D12_FEATURE_D3D12_OPTIONS5 and the RaytracingTier member. Tier 1.0 offers foundational tracing, supporting generation shaders, closest hit shaders, any hit shaders, and miss shaders for basic scene intersection. Tier 1.1 extends this with inline querying using RayQuery objects, indirect dispatch via DispatchRays in compute shaders, additional flags like RAY_FLAG_SKIP_TRIANGLES, and expanded vertex formats such as DXGI_FORMAT_R16G16_UNORM. Tier 1.2 builds on prior tiers by adding Opacity Micromaps (OMM) for efficient alpha-tested geometry handling and Execution Reordering (SER) for dynamic optimization during traversal, requiring Shader Model 6.9.
VendorSupported Architectures and SeriesTiers Supported
NVIDIATuring (RTX 20-series, 2018); Ampere (RTX 30-series, 2020); Ada Lovelace (RTX 40-series, 2022); Blackwell (RTX 50-series, 2024+)Tier 1.0 (Turing+); Tier 1.1 (Turing+); Tier 1.2 (all RTX series, with SER acceleration on 40/50-series and OMM across all)
AMDRDNA 2 (RX 6000-series, 2020+); RDNA 3 (RX 7000-series, 2022+); RDNA 4 (RX 9000-series, 2024+)Tier 1.1 (RDNA 2+); Tier 1.2 (RDNA 4 with OMM/SER support)
IntelAlchemist (Arc A-series, 2022+); Xe2/Battlemage (Arc B-series, 2024+)Tier 1.1 (Alchemist+); Tier 1.2 (Battlemage with SER support and OMM evaluation)
NVIDIA GPUs introduced DXR support with the Turing architecture's RT cores, enabling Tier 1.0 from the launch in 2018, while later generations deliver comprehensive Tier 1.1 and 1.2 capabilities, including hardware-accelerated SER on for up to 2x ray tracing throughput gains. AMD's architecture debuted Tier 1.1 compatibility in the , with in maintaining parity and in adding optimized hardware for Tier 1.2 features like OMM and SER. Intel's discrete GPUs began with the Alchemist-based in 2022, providing Tier 1.1 via integrated ray tracing units, followed by the Battlemage in 2024 offering Tier 1.2 optimizations, including SER support in developer previews. Integrated graphics support is also available on select and processors. AMD processors with + integrated GPUs (e.g., 5000G/7000G series) offer Tier 1.1, while Ultra processors with graphics provide Tier 1.1+ capabilities, subject to driver updates.

Software and Driver Prerequisites

Raytracing (DXR) requires (October 2018 Update) or later to access the necessary runtime components. For comprehensive support of 12 Ultimate, including advanced DXR features like Tier 1.1, or is recommended, as these versions provide the full feature set through built-in updates. The development headers and libraries for DXR are integrated into the Windows SDK starting from version 10.0.17763.0, which aligns with the October 2018 Update. The DXR runtime itself is delivered via operating system updates, eliminating the need for separate installations beyond the base OS requirement. Compatible graphics drivers are essential for hardware-accelerated DXR. provides initial support through drivers version 416.16 WHQL and later, released in October 2018 to coincide with the update. introduced hardware-accelerated DXR support with Software Adrenalin Edition 20.11.2 and subsequent releases in November 2020, enabling Tier 1.1 on RX 6000 series GPUs ( architecture). added DXR support for graphics starting with driver version 31.0.101.3445 in October 2022, targeting discrete and integrated Arc-based hardware. DXR mandates 12 with shader model 6.3 or higher, as this version introduces the intrinsics and targets (e.g., lib_6_3) required for raytracing s. Applications must query raytracing tier support at runtime using D3D12_FEATURE_D3D12_OPTIONS6 to confirm hardware capabilities, such as Tier 1.0 for basic functionality or higher tiers for enhanced features. For development and debugging, PIX on Windows offers comprehensive tools for capturing, analyzing, and debugging DXR frames, including shader inspection and performance profiling. provides seamless integration for compiling HLSL shaders targeting model 6.3+ via the DirectX Shader Compiler (DXC), supporting DXR-specific extensions directly within the .

Versions and Updates

DXR 1.1 Enhancements

DirectX Raytracing (DXR) 1.1, introduced in preview in November 2019 with Insider Preview builds for version 20H1 and fully released with version 20H1 on May 27, 2020, introduced several enhancements focused on improving developer usability and pipeline flexibility without requiring new hardware beyond existing DXR Tier 1.0 support, provided driver updates were available. These updates enable more efficient integration of ray tracing into broader rendering workflows, supporting Shader Model 6.5 and queried via D3D12_FEATURE_D3D12_OPTIONS5 for Tier 1.1 compatibility. A key addition is inline ray tracing, which allows ray queries to be performed directly within any stage, such as pixel or compute shaders, using the RayQuery object as a local state machine. This non-recursive approach, invoked via TraceRayInline(), eliminates the need for separate ray generation shaders or shader tables, simplifying scenarios like rasterization-ray tracing or compute-based denoising. Developers instantiate a RayQuery with flags (e.g., RAY_FLAG_CULL_NON_OPAQUE) and use methods like Proceed() to advance the query, querying hits or misses as needed, which contrasts with the recursive TraceRay() call from the core pipeline. GPU-driven dispatch further enhances flexibility by allowing the GPU to initiate ray tracing calls independently of the CPU, using ExecuteIndirect() with a command signature for DispatchRays(). This enables dynamic scenarios, such as adaptive ray generation based on or refinement passes, where thread counts and tables are computed on the GPU, reducing CPU-GPU synchronization overhead. Support for expanded vertex formats in acceleration structures broadens data compatibility, including DXGI_FORMAT_R16G16_UNORM for 16-bit per component positions (with the third component defaulting to 0) and similar formats like R16G16B16A16_UNORM (stride 6 bytes, ignoring alpha). These additions accommodate more compact or legacy buffers during bottom-level structure builds, improving usability for diverse asset pipelines without format . New ray flags and intrinsics provide finer control over intersection behavior; for instance, RAY_FLAG_SKIP_TRIANGLES skips triangle tests entirely (taking precedence over culling flags), while RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES targets box or AABB primitives. The GeometryIndex() intrinsic, available in hit s, returns the index of the geometry within a bottom-level acceleration structure, enabling shared shaders to differentiate geometries without duplicating shader table entries. Incremental state objects address pipeline management efficiency through AddToStateObject(), which appends shaders or components to an existing ray tracing pipeline state object (PSO) flagged with D3D12_STATE_OBJECT_FLAG_ALLOW_STATE_OBJECT_ADDITIONS. This avoids full PSO recreation—incurring proportional overhead based on additions, such as one shader—facilitating dynamic updates in scenarios with evolving shader libraries.

DXR 1.2 and Recent Advancements

DirectX Raytracing (DXR) 1.2 was announced by at the Game Developers Conference (GDC) on March 20, 2025, introducing key hardware-accelerated features aimed at addressing longstanding performance bottlenecks in real-time ray tracing. These advancements, including Opacity Micromaps (OMM) and Shader Execution Reordering (SER), deliver significant efficiency gains across , , and GPUs, with reported speedups of up to 2.3x for OMM in path-traced scenarios and up to 2x for SER in select workloads. When combined with neural rendering integrations, such as AI-accelerated denoising and upscaling via cooperative vectors in Shader Model 6.9, these features enable up to 10x overall performance improvements in targeted ray tracing applications. Opacity Micromaps (OMM) provide a hierarchical structure for encoding per-triangle opacity at the sub-triangle level, using a 4^N micro-triangle organized along a to represent fine-grained alpha-tested like foliage or fences. Supported in 2-state (opaque/transparent, 1-bit) or 4-state (adding known/unknown variants, 2-bit) formats, OMMs are defined via the D3D12_RAYTRACING_OPACITY_MICROMAP_ARRAY_DESC structure, which specifies input buffers, histogram entries, and linkages to bottom-level acceleration structures (BLAS) through D3D12_RAYTRACING_GEOMETRY_OMM_LINKAGE_DESC. This approach reduces any-hit shader invocations by culling rays in fully opaque or transparent regions, bypassing shaders entirely in 2-state mode and minimizing computational overhead for complex alpha . OMM arrays are stored as separate resources in the D3D12_RESOURCE_STATE_RAYTRACING_ACCELERATION_STRUCTURE state and can be reused across multiple BLAS instances, with 4-state OMMs operable in 2-state mode via the RAY_FLAG_FORCE_OMM_2_STATE ray flag or instance flags like D3D12_RAYTRACING_INSTANCE_FLAG_DISABLE_OMMS. Shader Execution Reordering (SER) enhances ray tracing efficiency by decoupling traversal phases (any-hit and intersection shaders) from shading (closest-hit and miss shaders), allowing dynamic reordering of GPU threads to improve coherence. Introduced in Shader Model 6.9, SER utilizes the HitObject API to process hit information from sources like RayQuery objects and enables RayGeneration shaders to dispatch closest-hit or miss shaders post-traversal. Developers invoke reordering via the MaybeReorderThread() HLSL intrinsic, providing a sort key (e.g., a bit indicating workload type) to guide hardware in grouping similar rays, which boosts and reduces divergent execution in incoherent ray patterns. This feature yields up to 2x faster rendering in scenarios with high ray divergence, as demonstrated on 40/50-series GPUs with 40% framerate gains and B-series with up to 90% improvements in complex scenes. Additional capabilities in DXR 1.2 include ray query support for OMM via the RAYQUERY_FLAG_ALLOW_OPACITY_MICROMAPS flag, enabling inline ray tracing to leverage these optimizations. As of specification version 1.34 (dated June 30, 2025), a proposed ALLOW_DATA_ACCESS flag is under consideration to enable geometry fetch intrinsics, such as TriangleObjectPosition, in shaders when paired with build flags like RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAG_ALLOW_DATA_ACCESS. DXR 1.2 maintains with prior tiers, supporting inline ray tracing from Tier 1.1 and triangle alongside OMM in BLAS builds, though full feature access requires Model 6.9 and / support for Tier 1.2.

Applications and Performance

Usage in Games and Software

DirectX Raytracing (DXR) has been integrated into numerous to enhance visual fidelity through realistic , reflections, and shadows. Cyberpunk 2077, released in 2020, employs DXR for ray-traced reflections, , and shadows, enabling immersive modes that simulate complex light interactions across its open-world environment. Minecraft RTX, launched in 2020, utilizes DXR to deliver ray-traced and reflections, transforming the blocky world into a more photorealistic experience with dynamic on procedurally generated terrains. Forza Motorsport (2023) incorporates DXR for real-time ray-traced reflections on vehicle surfaces and environmental elements, contributing to heightened realism in racing simulations. Major game engines have adopted DXR to facilitate ray tracing in development workflows. Unreal Engine 5 provides full for DXR through its hardware ray tracing features, which can integrate with the global illumination system for hybrid software and hardware-accelerated rendering of reflections and . Unity has offered DXR since 2021 via its High Definition Render Pipeline (HDRP), enabling real-time ray-traced effects like reflections and for high-fidelity applications in engineering and automotive visualization. Godot includes experimental ray tracing capabilities, with ongoing for DXR integration to advanced in open-source projects. Beyond gaming, DXR finds application in non-gaming software for precise rendering needs. Blender's Cycles renderer supports hardware-accelerated ray tracing via NVIDIA's OptiX backend, integrated in 2019 for RTX GPUs, with DXR fallback on compatible hardware, allowing for accelerated ray tracing in and workflows. In CAD and visualization tools, products like Inventor leverage DXR for GPU-accelerated ray tracing modes, aiding in photorealistic previews of designs. DXR also supports VFX previews by enabling ray-traced lighting in 's viewport systems, streamlining iteration in production pipelines. Additionally, scientific simulations benefit from DXR's accurate lighting simulations, such as in models for environmental and physical renderings. Adoption trends indicate widespread integration by 2025, with over 700 games and applications utilizing DXR for ray-traced effects. This growth aligns with the shift to dedicated in consoles, exemplified by the Series X launched in 2020, which includes RT cores for efficient DXR execution.

Optimization and Performance Features

DirectX Raytracing (DXR) employs hybrid rendering techniques to balance computational demands and visual quality, particularly by integrating denoising methods to mitigate noise from limited ray samples. Technologies such as NVIDIA's (DLSS) and AMD's (FSR) serve as AI-driven upscalers that not only reconstruct higher-resolution images but also apply denoising to ray-traced outputs, enabling playable frame rates with fewer rays per pixel. For instance, in games like , DLSS and FSR enhance ray-traced reflections and shadows by reducing noise artifacts while upscaling from lower internal resolutions. Variable rate shading (VRS), a 12 feature, further optimizes performance by allowing developers to vary shading resolution across the screen, applying coarser rates to peripheral areas during ray tracing passes to conserve GPU resources without noticeable quality loss in foveated regions. Optimization during acceleration structure construction involves trade-offs via build flags in the D3D12_RAYTRACING_ACCELERATION_STRUCTURE_BUILD_FLAGS enumeration. The PREFER_FAST_TRACE flag prioritizes runtime ray intersection speed by generating more efficient structures, though it extends build times by 2-3 times compared to default settings. Conversely, PREFER_FAST_BUILD minimizes upfront CPU or GPU build duration to one-half or one-third of the default, at the cost of slightly reduced tracing efficiency. Compaction, enabled by the ALLOW_COMPACTION flag, initially requires additional temporary memory but subsequently reduces the final structure size by 30-50% or more in typical scenarios, reclaiming space through GPU post-processing after the initial build. At runtime, developers can apply several techniques to curb overhead and enhance . Limiting ray recursion depth via the MaxRecursionDepth parameter in DispatchRays prevents excessive shader invocations, capping trace complexity for effects like reflections. Setting the D3D12_RAYTRACING_GEOMETRY_FLAG_OPAQUE on descriptions skips invocation of any-hit s for fully opaque surfaces, avoiding unnecessary hit testing and potentially halving traversal costs in dense scenes. In DXR 1.2, Shader Execution Reordering (SER) improves by dynamically reordering executions, yielding 2-5x gains in traversal for incoherent patterns. Performance metrics for DXR typically show a 20-50% overhead when utilizing dedicated RT cores for ray tracing compared to rasterization alone, depending on scene complexity and ray count. DXR 1.2 introduces advancements like Opacity Micromaps (OMM) for up to 2.3x performance in path-traced scenes and neural rendering features offering up to 10x speedup in texture compression, as announced at GDC 2025. Tools such as GPUView facilitate by capturing and analyzing ray tracing timelines to identify bottlenecks in dispatch and execution. Additionally, queries via ID3D12GraphicsCommandList::GetRaytracingAccelerationStructurePrebuildInfo and related provide statistics on RT utilization, including ray counts and hit rates, aiding iterative tuning.

References

  1. [1]
    DirectX Raytracing (DXR) Functional Spec - Microsoft Open Source
    Jun 30, 2025 · This document describes raytracing support in D3D12 as a first class peer to compute and graphics (rasterization).
  2. [2]
    Announcing Microsoft DirectX Raytracing!
    Mar 19, 2018 · The great news is that PIX for Windows will support the DirectX Raytracing API from day 1 of the API's release.
  3. [3]
    Introduction to NVIDIA RTX and DirectX Ray Tracing
    Mar 19, 2018 · The API that Microsoft announced, DirectX Raytracing (DXR), is a natural extension of DirectX 12. It fully integrates ray tracing into DirectX, ...
  4. [4]
    DirectX Raytracing and the Windows 10 October 2018 Update
    Oct 2, 2018 · Today, once you update to the next release of Windows 10, DirectX Raytracing will work out-of-box on supported hardware. And speaking of ...
  5. [5]
    https://www.nvidia.com/en-us/geforce/news/windows-...
    # Game Ready Driver Released For Windows 10 October 2018 Update, Featuring The Release Of DirectX Ray Tracing By Andrew Burnes on October 04, 2018 ...
  6. [6]
    Battlefield V DXR Real-Time Ray Tracing Available Now - NVIDIA
    Nov 14, 2018 · The Battlefield V GeForce Game Ready driver, version 416.94, released November 13th, or a newer version, which can be downloaded from GeForce ...
  7. [7]
    Metro Exodus: A beautiful, brutal single-player game—with insane ...
    Feb 13, 2019 · Release Date: Feb. 14, 2019. ESRB Rating: M for Mature Price: $50 ... Metro Exodus spends its entire ray tracing budget on lighting ...<|control11|><|separator|>
  8. [8]
    Review: Control is Remedy's best game yet—and a ray tracing ...
    Aug 26, 2019 · Release Date: August 27, 2019. ESRB Rating: M for Mature Price: $60 ... If you own a PC GPU that supports DirectX 12 ray tracing, buy this ...
  9. [9]
    AMD Unveils Next-Generation PC Gaming with AMD Radeon™ RX ...
    Oct 28, 2020 · DirectX® 12 Ultimate Support – Provides a powerful blend of raytracing, compute, and rasterized effects, such as DirectX® Raytracing (DXR) ...
  10. [10]
    Intel® Arc™ Graphics Developer Guide for Real-Time Ray Tracing in...
    The new Intel® Arc™ GPUs (formerly code named Alchemist) fully support the DirectX* 12 Ultimate feature set including variable-rate shading (VRS), ...
  11. [11]
    Unreal Engine 4.22 released
    Apr 2, 2019 · With this release, we're excited to announce beta support for Ray Tracing and Path Tracing using Windows 10 RS5 update that takes full advantage ...
  12. [12]
    NVIDIA DLSS & GeForce RTX: List Of All Games, Engines And ...
    Jan 30, 2025 · Over 860 games and applications feature RTX support, including best selling games, the most popular apps, and the most used game engines. NVIDIA ...
  13. [13]
    Battlefield 5 performance analysis: ray tracing is demanding, and ...
    Jan 18, 2019 · Nvidia announced its Turing architecture and its halo feature of real-time ray tracing hardware acceleration in August and it sounded ...
  14. [14]
    An improved illumination model for shaded display
    The shader to accurately simulate true reflection, shadows, and refraction, as well as the effects simulated by conventional shaders.
  15. [15]
  16. [16]
  17. [17]
  18. [18]
  19. [19]
  20. [20]
    D3D12_RAYTRACING_ACCELE...
    Jan 30, 2022 · Construct a high quality acceleration structure that maximizes raytracing performance at the expense of additional build time. Typically, the ...
  21. [21]
  22. [22]
  23. [23]
  24. [24]
  25. [25]
  26. [26]
    Direct3D 12 Raytracing HLSL Shaders - Win32 apps | Microsoft Learn
    Dec 30, 2021 · A shader that is used to implement custom intersection primitives for rays intersecting an associated bounding volume (bounding box). Miss ...
  27. [27]
    Direct3D 12 raytracing HLSL reference - Win32 apps - Microsoft Learn
    Dec 30, 2021 · This section provides information on the HLSL constructs that support the Direct3D 12 raytracing pipeline.
  28. [28]
    TraceRay function - Win32 apps - Microsoft Learn
    Dec 30, 2021 · A RayDesc representing the ray to be traced. Payload. A user defined ray payload accessed both for both input and output by shaders invoked ...
  29. [29]
    Direct3D 12 raytracing samples - Microsoft Learn
    Aug 11, 2025 · This collection of samples act as an introduction to DirectX Raytracing (DXR). The samples are divided into tutorials and advanced samples.
  30. [30]
    DirectX 12 Ultimate Game Ready Driver Released - NVIDIA
    Jun 24, 2020 · With the release of today's new GeForce Game Ready driver, DirectX 12 Ultimate and its features are fully supported on GeForce RTX GPUs on Windows 10 operating ...
  31. [31]
    [PDF] Introduction to DirectX Raytracing - Chris Wyman
    Mar 4, 2019 · Similar to function signatures in C++, DirectX 12 root signatures define the parameters that are passed to shader programs. These parameters ...
  32. [32]
    Intel® 6th Gen Processor Graphics - Windows*
    Dec 29, 2022 · This download installs Intel® Graphics Driver 31.0.101.2115 for 6th-10th Gen Intel® Core™ Processor Graphics, and related Intel Atom®, ...Missing: DirectX Raytracing
  33. [33]
    Shader Model 6.3 · microsoft/DirectXShaderCompiler Wiki - GitHub
    Mar 11, 2019 · Shader model 6.3 adds support for DirectX12 Raytracing (DXR). This includes new intrinsics for casting rays into acceleration data structures, and processing ...
  34. [34]
    DirectX Raytracing - PIX on Windows - Microsoft Developer Blogs
    DirectX Raytracing. PIX on Windows includes support for the final DirectX Raytracing (DXR) that's part of the Windows 10 October 2018 Update (a.k.a. “RS5”).Missing: software | Show results with:software
  35. [35]
    DirectX Raytracing (DXR) Tier 1.1 - Microsoft Developer Blogs
    Nov 6, 2019 · The features that involve shaders require shader model 6.5 support which can be targeted by the latest DirectX Shader Compiler.Missing: requirement | Show results with:requirement
  36. [36]
  37. [37]
  38. [38]
  39. [39]
  40. [40]
  41. [41]
  42. [42]
  43. [43]
    Announcing DirectX Raytracing 1.2, PIX, Neural Rendering and ...
    Mar 20, 2025 · NVIDIA has committed driver support across GeForce RTX™ GPUs, and we're actively working with other hardware vendors, including AMD, Intel, and ...
  44. [44]
    Microsoft DirectX Raytracing 1.2 and Neural Rendering Brings up to ...
    Mar 21, 2025 · Microsoft's DirectX Raytracing (DXR) 1.2 announcement at GDC 2025 introduces two technical innovations that address fundamental ray tracing performance ...Missing: RAY_FLAG_FORCE_OMM_2_STATE | Show results with:RAY_FLAG_FORCE_OMM_2_STATE
  45. [45]
    D3D12 Opacity Micromaps - DirectX Developer Blog
    May 30, 2025 · DirectX Raytracing (DXR) now supports Opacity Micromaps (OMMs), enabling hardware to handle alpha tested geometry more efficiently than relying ...
  46. [46]
    D3D12 Shader Execution Reordering - DirectX Developer Blog
    May 30, 2025 · This allows developers to target all NVIDIA raytracing capable hardware with identical SER code.
  47. [47]
    Cyberpunk 2077: Ray-Traced Effects Revealed, DLSS 2.0 ... - NVIDIA
    Jun 25, 2020 · Ray-Traced Reflections - In Cyberpunk 2077, ray-traced reflections are used on all surfaces and can trace ranges for up to several kilometers, ...
  48. [48]
    Minecraft with RTX: The World's Best Selling Videogame Is Adding ...
    Mojang and NVIDIA are bringing jaw-dropping DXR ray tracing to Minecraft. See the first trailer and screenshots, and learn more.
  49. [49]
    Ray Tracing - FM 2023 Discussion - Official Forza Community Forums
    Jun 13, 2022 · The only raytracing during gameplay will be mirror-like reflections on car bodies. No ray-traced shadows, ambient occlusion or global ...Missing: DirectX Cyberpunk 2077 Minecraft
  50. [50]
    Hardware Ray Tracing in Unreal Engine - Epic Games Developers
    This standalone ray tracing feature is available when Lumen Global Illumination is disabled. Lumen has its own ambient occlusion. Ray Traced Ambient Occlusion ( ...Missing: DXR | Show results with:DXR
  51. [51]
    Unity real-time ray tracing for high fidelity reflections & global lighting
    Unity's ray tracing capabilities enable rendering of global illumination in real-time for photorealistic graphics with maximum visual fidelity.Missing: 2020 | Show results with:2020
  52. [52]
    Accelerating Cycles using NVIDIA RTX - Blender Developers Blog
    Jul 29, 2019 · Our approach was to implement a new backend to Cycles which uses the OptiX API to manage acceleration structures plus ray intersection with its ...
  53. [53]
  54. [54]
    Playlist | Rendering | NVIDIA On-Demand
    We'll describe the architecture and implementation of Autodesk's next-generation viewport system and how we leverage DXR and Vulkan Ray Tracing to radically …
  55. [55]
    RTX Global Illumination Part I | NVIDIA Technical Blog
    Jun 3, 2019 · RTX GI is compatible with various APIs, including DXR, VulkanRT, OptiX, Unreal Engine, and Unity, and can be used with different light types, ...
  56. [56]
    DLSS Multi Frame Generation & New RTX Technologies ... - NVIDIA
    Jan 6, 2025 · Such is the pace of RTX adoption, there are now over 700 #RTXON games and apps. To begin 2025 with a bang, we're announcing that 75 games ...
  57. [57]
    Getting Started with Ray Tracing | Microsoft Learn
    Jun 10, 2025 · Requirements · Operating System (OS): Windows 64-bit · GPU: DirectX hardware ray tracing capable GPU like NVIDIA GeForce® RTX 20 Series and higher ...Missing: basics | Show results with:basics<|control11|><|separator|>
  58. [58]
    NVIDIA DLSS, AMD FSR and DirectX Ray Tracing ... - Forza Support
    Nov 9, 2022 · Boost your Forza Horizon 5 framerates on PC whilst maximising image quality by enabling NVIDIA DLSS Super Resolution or AMD FSR 2.2.
  59. [59]
    Variable Rate Shading: a scalpel in a world of sledgehammers
    Mar 18, 2019 · Variable Rate Shading: a scalpel in a world of sledgehammers ... New in D3D12 – DirectX Raytracing (DXR) now supports library subobjects.
  60. [60]
    Tips: Acceleration Structure Compaction | NVIDIA Technical Blog
    May 20, 2021 · Read Managing Memory for Acceleration Structures in DirectX Raytracing first and then come back. I assume that you already have your ...
  61. [61]
    Microsoft Unveils DirectX Raytracing 1.2 With Huge Performance ...
    Mar 20, 2025 · Microsoft has announced DirectX Raytracing (DXR) 1.2 update alongside next-gen Neural Rendering support across NVIDIA, Intel & AMD hardware.