Skip to content

fix(lut): preserve HDR highlights at full brightness (1.9.1) - #6

Merged
davidtorcivia merged 2 commits into
mainfrom
fix/hdr-highlight-headroom
Sep 10, 2026
Merged

davidtorcivia merged 2 commits into
mainfrom
fix/hdr-highlight-headroom

Conversation

@davidtorcivia

Copy link
Copy Markdown
Collaborator

What this changes

Gamma 2.2 and 2.4 compressed HDR highlights at 100% brightness because the headroom blend started from a clamped SDR-white value. At 200-nit SDR white, the old math mapped a 1,000-nit input to approximately 364 nits.

Preserve the headroom target's full signal range and fade only the correction at SDR white. Gamma alone now passes through every HDR LUT sample above SDR white; brightness alone follows the requested dimming curve. Apply the same correction to the measured-response LUT path. Update the comparison renderer, whitepaper equation, release notes, and version to 1.9.1.

Checklist

  • dotnet test src/Gloam.sln -c Release passes: 1,351 tests.
  • dotnet build src/Gloam.sln -c Release -p:GloamStrictBuild=true is warning-free.
  • No existing test was weakened, skipped, or deleted to make this pass.
  • Changes under src/Gloam.Core have tests.

Calibration math

  • Pinning tests were added before the behavioral change and committed separately. All 12 new cases failed before the fix and passed afterward.
  • The whitepaper HTML and equation source are updated; Markdown was regenerated.
  • The golden fixtures pass without baseline changes.

Regression coverage includes gamma 2.2/2.4, SDR white levels from 80 to 1,000 nits, measured-response LUTs, linear and perceptual dimming, shadow-only controls, and exact identity entries after 256-entry/16-bit hardware-ramp conversion. Existing night-mode boost and continuity tests pass.

What was measured? Generated LUT signals and the hardware-ramp conversion were checked numerically. No new physical display/colorimeter measurements were performed. The 1,000-to-364-nit example describes the computed old transform, not a measured panel output.

@davidtorcivia
davidtorcivia merged commit 51a1cf6 into main Sep 10, 2026
2 checks passed
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