From 592b865ca5c98d1df2153ea5b77f67aa8a76db60 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 14:11:40 +0100 Subject: Add HDR tonemap brightness slider The engine applies mat_monitorgamma (SDL receives changing ramp midpoints), but Wayland/XWayland compositors discard the window gamma ramp, so the gamma slider has no visible effect there. Add an in-engine brightness control that does not depend on the window system: mat_force_tonemap_scale, exposed as "HDR brightness" (x10, 0 = automatic). Drop the temporary SDL gamma ramp diagnostic. --- CONTEXT.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index fc73214..e0af84a 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -241,14 +241,15 @@ vocabulary / decisions. `ClientCmd` when their slider changes. Gamma is stored as x10 (`[view] gamma=22` = 2.2) and the slider stops at 26 because the engine clamps `mat_monitorgamma` at 2.6. The value is read back through - `ICvar::FindVar` on the next tick (ClientCmd is queued) and logged - (`view: gamma request ..., cvar reports ...`) to distinguish a rejected - command from an OS gamma ramp the compositor ignores. `SDL_SetWindowGammaRamp` - is also interposed (first 12 calls log `gamma: SDL_SetWindowGammaRamp - mid=...`) to see whether the engine ever pushes a ramp after the slider - moves; if it does and the screen does not change, the compositor is - discarding it. Both live in the always-on - `Camera / display` card (`[view] fov/vmfov/gamma`). + `ICvar::FindVar` on the next tick (ClientCmd is queued) and logged. The + engine does apply the ramp (`SDL_SetWindowGammaRamp` was called with + changing midpoints), but a Wayland/XWayland compositor discards it, so on + this setup the slider has no visible effect. +- `HDR brightness` (`[view] tonemap`, x10, 0 = automatic) sets + `mat_force_tonemap_scale`. This is in-engine tonemapping for HDR maps and + does not depend on the window system applying a gamma ramp; 10 = 1.0. + Both live in the always-on `Camera / display` card + (`[view] fov/vmfov/gamma/tonemap`). ## Map transitions -- cgit v1.2.3