DirectX 12 Mixed-Rate Rendering Across Render Targets
DirectX 12 enables mixed-rate rendering across different render targets in a single pass through a combination of Variable Rate Shading (VRS), relaxed Render Target View (RTV) dimension requirements, and programmable shading rate combiners. By decoupling the pixel shading frequency from the physical target resolution and permitting disparate render target geometries, developers can dynamically allocate GPU compute power to high-frequency visual elements while reducing update rates for auxiliary buffers in a unified draw call.
Variable Rate Shading (VRS) Architecture
At the core of mixed-rate execution is DirectX 12 Variable Rate Shading (Tier 1 and Tier 2). Rather than invoking a pixel shader once for every single pixel on every attached render target, the hardware can allocate a single pixel shader evaluation across a block of pixels—such as 1x1, 1x2, 2x1, 2x2, 2x4, or 4x4 coarse pixel regions.
In a standard Multiple Render Target (MRT) setup, the pixel shader executes at the rate determined by the runtime and hardware combiners. Once computed, the generated output values are broadcast to the corresponding coarse samples across all simultaneously bound render targets, effectively altering the rate of calculation while preserving rasterization coverage.
Relaxed Render Target Rules
DirectX 12 removes the legacy DirectX requirement that all simultaneously bound RTVs must share the same pixel dimensions, bit depths, and sample counts. This capability, known as relaxed render target sizing, allows a single graphics pipeline state object (PSO) to bind multiple targets of varying physical sizes.
When mixed-rate rendering is deployed:
- A full-resolution buffer (such as primary albedo or normal targets) can be bound alongside lower-resolution auxiliary buffers (such as ambient occlusion, indirect lighting, or subsurface scattering targets).
- The rasterizer relies on the viewport and scissor configurations to govern pixel generation.
- Pixel shaders output to lower-resolution targets via scaled viewports or coordinate transformation in shader code, enabling distinct update frequencies within a unified pass.
Tier 2 Shading Rate Combiners
DirectX 12 Tier 2 VRS introduces screen-space shading rate images and
per-primitive shading rate selection (SV_ShadingRate in
HLSL). Developers can control shading rates on a per-surface or per-draw
basis using configurable combiner states
(D3D12_SHADING_RATE_COMBINER):
- Per-Draw Call (Tier 1): Specifies a coarse shading rate for the entire draw call.
- Per-Primitive (Tier 2): Mesh or geometry shaders select coarse rates per-triangle, allowing detailed foreground geometry to evaluate at 1x1 while background geometry renders at 2x2 or 4x4.
- Screen-Space Shading Rate Image (Tier 2): A low-resolution texture governs the shading frequency across the screen based on content, motion vectors, or gaze tracking in VR applications.
When these combiners merge, the pipeline determines an effective shading rate for the pass, reducing unnecessary computations on targets that do not require high-frequency sampling.
SV_RenderTargetArrayIndex and Geometry Multiplexing
To achieve true spatial mixed-rate rendering where different targets
actively receive geometry rendered at different sampling densities,
developers use SV_RenderTargetArrayIndex or
SV_ViewportArrayIndex inside Amplification, Mesh, or
Geometry Shaders.
A single pass can route primitives to distinct render targets:
- High-detail primitives can be routed to Target 0 with an unscaled viewport.
- Primitives requiring lower update frequency can be redirected to Target 1, coupled to a half-resolution viewport.
This allows the engine to output to multiple targets of differing granularities without issuing separate draw calls, bypassing pipeline reconfiguration penalties and CPU overhead.