Skip to content

Conversation

@MajorPainTheCactus
Copy link
Contributor

Summary

  • Expand gamut changed from bool to multi-option: Replaces the simple on/off expand gamut toggle with four colour gamut modes — ACCURATE (standard Rec.709→Rec.2020), EXPANDED (Microsoft enhanced saturation), WIDE (Rec.709→Rec.2020→DCI-P3), and SUPER (direct passthrough with no colour space conversion)
  • HDR shader pipeline refactored: Separates colour space conversion (To2020), inverse tonemapping (HDR), and PQ encoding (HDR10) into distinct stages across D3D11, D3D12, and Vulkan shaders (both HLSL and GLSL), adding the DCI-P3 colour matrix (k2020toP3) for the new WIDE mode
  • Scanline processing reworked: Scanlines now operate in gamma 2.4 signal domain via a new LinearToSignal function, with tuned CRT scanline parameters (max increased from 0.70 to 0.90, attack from 0.30 to 0.60) and corrected sRGB decode gamma (2.2→2.22)
  • Type change propagated throughout: The expand_gamut field is changed from bool/float to unsigned int across the video driver interface, D3D11/D3D12/Vulkan drivers, shader reflection, thread wrapper, configuration, and menu system — with a new custom string representation function and enum values for the four modes
  • SPIR-V shader binaries rebuilt for both hdr.frag.inc and hdr_tonemap.frag.inc

Change the HDR expand gamut setting from a boolean on/off to a
multi-option uint supporting four colour gamut modes:

- ACCURATE (0): Standard Rec.709 to Rec.2020 conversion
- EXPANDED (1): Microsoft expanded gamut for enhanced saturation
- WIDE (2): Rec.709 to Rec.2020 then to DCI-P3
- SUPER (3): Direct passthrough (no colour space conversion)

Refactor HDR shader pipeline across D3D11, D3D12 and Vulkan to
separate colour space conversion (To2020) from inverse tonemapping
(HDR) and PQ encoding (HDR10), enabling each gamut mode to be
applied at the correct stage. Add DCI-P3 colour matrix (k2020toP3).

Rework scanline processing to operate in gamma 2.4 signal domain
with a dedicated LinearToSignal function, and tune CRT scanline
parameters (max 0.70->0.90, attack 0.30->0.60). Update gamma from
2.2 to 2.22 for more accurate sRGB decoding.

Update menu, configuration, msg_hash, video driver interface,
thread wrapper, and slang reflection to use unsigned type throughout.
Rebuild SPIR-V shader binaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant