Skip to main content

Module hdr_output

Module hdr_output 

Source
Expand description

Backend-agnostic representation of the renderer’s swapchain colour-output mode. Built from the world’s PostProcessConfig.hdr_display request plus the active display’s measured EDR capability (the backend supplies the capability; this module is pure CPU). The result drives:

  1. the swapchain pixel format + colour space chosen at window setup (BGRA8Unorm for SDR; RGBA16Float + extendedLinearDisplayP3 for HDR);
  2. whether PostProcessParams.hdr_output ships to the shader as 1.0 so the composite pass skips ACES + gamma + FXAA + ColorLut and emits linear extended-range values directly.

Those two flags only ever enter PostProcessParams through HdrOutputMode::post_process_params, so nothing upstream of the display negotiation can set (or clear) them.

Enums§

HdrEncoding
HDR encoding the composite shader emits on the EDR path. Drives both the swapchain colour-space choice (CAMetalLayer on Metal, SetColorSpace1 on DirectX) and the shader’s per-pixel encode.
HdrOutputMode
Resolved swapchain colour-output mode. Threaded into Metal + DirectX at init (both honour Hdr end-to-end, including the PQ-encoded branch); Vulkan honours the ExtendedLinear Hdr arm but ignores the PQ encoding flag and falls back to SDR on a panel that reports no EDR headroom.