---
id: "hdr-display-output-pq"
title: "HDR display output (PQ / BT.2100)"
aliases: [HDR10 output, PQ encoding, ST 2084, Rec.2100 PQ, scRGB output]
domain: "post"
stage: "post"
realtime: "realtime"
platforms: [desktop-gpu, webgpu, unity, unreal, godot]
year_introduced: 2014
inputs: [hdr-image]
outputs: [hdr-image]
style: "both"
dynamic: "both"
cost: "cheap"
authority: ""
url: "https://texelatlas.vercel.app/t/hdr-display-output-pq/"
sources_verified_at: "2026-11-29"
---
# 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.

## 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

## 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 use it

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](https://texelatlas.vercel.app/t/aces-tonemapping.md), [AgX](https://texelatlas.vercel.app/t/agx-tonemapping.md) or [Khronos PBR Neutral tone mapper](https://texelatlas.vercel.app/t/khronos-pbr-neutral.md) to compress the scene to the display's peak, [Linear-space rendering and gamma correction](https://texelatlas.vercel.app/t/linear-color-workflow.md) for the upstream linear pipeline, and [3D LUT color grading](https://texelatlas.vercel.app/t/lut-color-grading.md) for the creative look. Prefer plain sRGB output with [Reinhard photographic tone reproduction](https://texelatlas.vercel.app/t/reinhard-tonemapping.md) or [Hable filmic (Uncharted 2) tonemapping](https://texelatlas.vercel.app/t/hable-filmic-tonemapping.md) when the target is SDR, or scRGB float on Windows when the compositor handles encoding.

## Cost

cheap — A per-pixel colour matrix and PQ curve in the final pass; the real work is calibration and tone mapping design.
Measured GPU Weight: 1.83× baseline (feather) — 0.0602 ms median / 0.0619 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 1.43× baseline (feather) — 0.0227 ms median (2.65× faster on L4).
Ampere A100 scaling: 1.17× baseline (feather) — 0.0336 ms median (1.79× faster on A100).

## Failure modes

- 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

## Engine support

- babylonjs: builtin — `WebGPU canvas configuration exposes CanvasToneMappingMode.Extended for HDR display output` (evidence: https://github.com/BabylonJS/Babylon.js/blob/9.38.0/packages/dev/core/src/Engines/WebGPU/webgpuConstants.ts, checked 2026-12-01) — Requires a browser and display supporting WebGPU extended-range canvas presentation.
- blender: builtin — `Render Properties > Color Management (wide-gamut / HDR display output transforms)` (evidence: https://docs.blender.org/manual/en/5.2/render/color_management.html, checked 2026-12-01)
- godot: builtin — `Project Settings > Display > Window > HDR > Request HDR Output; Window.hdr_output_requested` (evidence: https://github.com/godotengine/godot/blob/4.7.2-stable/doc/classes/ProjectSettings.xml, checked 2026-12-01) — Platform support dependent.
- metal: builtin — `CAMetalLayer.wantsExtendedDynamicRangeContent = true + MTLPixelFormat.rgba16Float / CGColorSpace.itur_2100_PQ` (evidence: https://developer.apple.com/tutorials/data/documentation/quartzcore/cametallayer/wantsextendeddynamicrangecontent.json, checked 2026-12-01)
- unity: builtin — `HDRP Asset / Graphics Settings HDR Output; Volume > Tonemapping` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.high-definition/Documentation~/HDR-Output.md, checked 2026-12-01)
- unreal: builtin — `Enable HDR output with r.HDR.EnableHDROutput or GameUserSettings; ST-2084 (PQ) output device` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/high-dynamic-range-display-output-in-unreal-engine, checked 2026-12-01)
- webgpu: builtin — `context.configure({ format: "rgba16float", toneMapping: { mode: "extended" } })` (evidence: https://www.w3.org/TR/webgpu/, checked 2026-12-01) — Extended dynamic range canvas presentation in supported browsers/displays.

## Dataflow

- Inputs: hdr-image
- Outputs: hdr-image
- Platforms: desktop-gpu, webgpu, unity, unreal, godot

## Presets

### PQ inverse EOTF vs SDR gamma, log-nits plot (glsl-fragment; rendered 2026-11-29)

```json
{
  "m1": 0.1593017578125,
  "m2": 78.84375,
  "c1": 0.8359375,
  "c2": 18.8515625,
  "c3": 18.6875,
  "reference_white_nits": 203
}
```

```glsl
// 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

## Lineage

- extends [Linear-space rendering and gamma correction](https://texelatlas.vercel.app/t/linear-color-workflow.md)

## Combines with

- [AgX](https://texelatlas.vercel.app/t/agx-tonemapping.md): The tonemapper compresses scene light to the display's peak before PQ encodes absolute luminance.
- [Auto exposure from luminance histogram](https://texelatlas.vercel.app/t/auto-exposure-histogram.md): Exposure decides where scene mid-grey lands relative to the reference-white nit level before encoding.

## Sources

1. [primary] High Dynamic Range Electro-Optical Transfer Function of Mastering Reference Displays. IEEE. https://doi.org/10.5594/smpte.st2084.2014 (verified via crossref on 2026-11-29)
2. [primary] ITU-R ITU-R BT.2100. itu.int. https://www.itu.int/rec/R-REC-BT.2100 (verified via http on 2026-11-29)
3. [tutorial] Microsoft Using DirectX with High Dynamic Range displays and Advanced Color. learn.microsoft.com. https://learn.microsoft.com/en-us/windows/win32/direct3darticles/high-dynamic-range (verified via http on 2026-11-29)
4. [implementation] microsoft (2015) microsoft/DirectX-Graphics-Samples. https://github.com/microsoft/DirectX-Graphics-Samples License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "HDR display output (PQ / BT.2100)." https://texelatlas.vercel.app/t/hdr-display-output-pq/ (accessed 2026-12-01).
