HDR display output (PQ / BT.2100)
Convert scene-linear HDR rendering to an absolute-luminance signal for HDR TVs and monitors: Rec.2020 primaries plus the PQ curve, with paper white, peak and UI levels managed deliberately.
Also known as HDR10 output, PQ encoding, ST 2084, Rec.2100 PQ, scRGB output
In the family Post-processing, color & imaging, display encoding
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | Built in | WebGPU canvas configuration exposes CanvasToneMappingMode.Extended for HDR display output docs Requires a browser and display supporting WebGPU extended-range canvas presentation. |
| Godot 4.7 | Built in | Project Settings > Display > Window > HDR > Request HDR Output; Window.hdr_output_requested docs Platform support dependent. |
| Unity | Built in | HDRP Asset / Graphics Settings HDR Output; Volume > Tonemapping docs |
| Unreal 5.7 | Built in | Enable HDR output with r.HDR.EnableHDROutput or GameUserSettings; ST-2084 (PQ) output device docs |
| Blender 5.2 | Built in | Render Properties > Color Management (wide-gamut / HDR display output transforms) docs |
| WebGPU W3C | Built in | context.configure({ format: "rgba16float", toneMapping: { mode: "extended" } }) docs Extended dynamic range canvas presentation in supported browsers/displays. |
| Metal | Built in | CAMetalLayer.wantsExtendedDynamicRangeContent = true + MTLPixelFormat.rgba16Float / CGColorSpace.itur_2100_PQ docs |
How it works
HDR10 and Dolby Vision-class output encode luminance in absolute nits with the perceptual quantizer (PQ, SMPTE ST 2084): linear luminance divided by 10 000 nits goes through a fixed rational power function so that 10-bit code values are spaced to match the eye's contrast sensitivity from near black to 10 000 nits. A game or viewer first renders in scene-linear colour, tone maps to a target peak (the display's reported or user-calibrated maximum) while keeping mid-grey and diffuse white mapped to a chosen reference white level (commonly around 200 nits, ITU-R BT.2408), converts from the working gamut (Rec.709/P3) to Rec.2020 with a matrix, multiplies by the reference-white scale to get nits, applies the PQ inverse EOTF, and writes to a 10-bit or float swap chain flagged as HDR10 (ST 2084 + BT.2020) or as linear scRGB. Interface elements are composited at a separately tuned brightness. Metadata like MaxCLL may be passed along. SDR fallbacks reuse the same tonemapper with a lower peak.
When to choose it
Reach for it when
- image looks washed out on an hdr monitor
- need to output hdr10 from my renderer
- highlights clip on hdr television despite high peak brightness
- ui is far too bright when hdr is enabled
- how to encode scene light values into nits for display
Use it when shipping to HDR10 displays, consoles or OS compositors with HDR enabled; choose it for the encoding stage after tone mapping, not instead of it. Use ACES filmic tonemapping, AgX or Khronos PBR Neutral tone mapper to compress the scene to the display's peak, Linear-space rendering and gamma correction for the upstream linear pipeline, and 3D LUT color grading for the creative look. Prefer plain sRGB output with Reinhard photographic tone reproduction or Hable filmic (Uncharted 2) tonemapping when the target is SDR, or scRGB float on Windows when the compositor handles encoding.
Field marks
- Washed-out or too-dark image when PQ is written to an SDR swap chain, or an sRGB image is sent flagged as HDR
- Banding in dark gradients when the framebuffer is 8-bit instead of 10-bit or float
- Eye-searing UI and bloom because paper-white scaling was not applied to overlays
- Highlight clipping or wrong tone when the tonemapper's peak does not match the display's reported peak
- Out-of-gamut colours turning negative after Rec.709 to Rec.2020 conversion and not clamped
Presets
PQ inverse EOTF vs SDR gamma, log-nits plot
{
"m1": 0.1593017578125,
"m2": 78.84375,
"c1": 0.8359375,
"c2": 18.8515625,
"c3": 18.6875,
"reference_white_nits": 203
}Show GLSL (40 lines)
// GLSL ES 3.0, Shadertoy-style. Plots signal value vs luminance (log axis, 0.01 .. 10000 nits):
// cyan = PQ (SMPTE ST 2084) inverse EOTF, orange = SDR gamma 2.4 referenced to 100 nits (clips above 100).
const float M1 = 0.1593017578125;
const float M2 = 78.84375;
const float C1 = 0.8359375;
const float C2 = 18.8515625;
const float C3 = 18.6875;
const float REF_WHITE = 203.0; // BT.2408 HDR reference white in nits
float pqEncode(float nits) {
float y = clamp(nits / 10000.0, 0.0, 1.0);
float ym = pow(y, M1);
return pow((C1 + C2 * ym) / (1.0 + C3 * ym), M2);
}
float line(float d, float w) { return 1.0 - smoothstep(w, w * 1.8, d); }
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
float lg = mix(-2.0, 4.0, uv.x); // log10(nits)
float nits = pow(10.0, lg);
vec3 col = vec3(0.07, 0.08, 0.10);
// decade grid
float gx = abs(fract(lg + 0.5) - 0.5) / 6.0;
col += vec3(0.10) * line(gx, 0.0015);
float gy = abs(fract(uv.y * 10.0 + 0.5) - 0.5) / 10.0;
col += vec3(0.06) * line(gy, 0.0015);
// reference-white marker
float markerDist = abs(uv.x - (log(REF_WHITE) / log(10.0) + 2.0) / 6.0);
col += vec3(0.5, 0.5, 0.2) * line(markerDist, 0.002);
// curves: pixel distance in y to each curve
float pq = pqEncode(nits);
float sdr = pow(clamp(nits / 100.0, 0.0, 1.0), 1.0 / 2.4);
float pxy = 1.0 / iResolution.y;
col = mix(col, vec3(0.25, 0.85, 1.0), line(abs(uv.y - pq), 2.0 * pxy));
col = mix(col, vec3(1.0, 0.6, 0.2), line(abs(uv.y - sdr), 2.0 * pxy));
// filled gradient bar along the bottom showing PQ code value as grey
if (uv.y < 0.04) col = vec3(pq);
fragColor = vec4(col, 1.0);
}
Attribution: written for this index; constants are those published in SMPTE ST 2084 · basis: 0
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| pq-curve-vs-sdr-gamma-plot | Tesla T4 1920x1080 | 1.83× baseline (feather) · 0.060 ms / 0.062 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| pq-curve-vs-sdr-gamma-plot | NVIDIA L4 1920x1080 | 1.43× baseline (feather) · 0.023 ms / 0.023 ms · 2.6× faster on L4 | opengl-timer-query · Cross-architecture validation |
| pq-curve-vs-sdr-gamma-plot | NVIDIA A100-SXM4-40GB 1920x1080 | 1.17× baseline (feather) · 0.034 ms / 0.034 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- AgX: The tonemapper compresses scene light to the display's peak before PQ encodes absolute luminance.
- Auto exposure from luminance histogram: Exposure decides where scene mid-grey lands relative to the reference-white nit level before encoding.
Sources
- primary. High Dynamic Range Electro-Optical Transfer Function of Mastering Reference Displays. IEEE.Verified via crossref · 2026-11-29doi:10.5594/smpte.st2084.2014
- tutorialMicrosoft. Using DirectX with High Dynamic Range displays and Advanced Color. learn.microsoft.com.Verified via live page · 2026-11-29
- implementationmicrosoft (2015). microsoft/DirectX-Graphics-Samples. This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.GitHub API · license MIT · 2026-11-29