diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 14:11:40 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 14:11:40 +0100 |
| commit | 592b865ca5c98d1df2153ea5b77f67aa8a76db60 (patch) | |
| tree | 4fb957603dba3bc57d316168f074410bdef3e70f /CONTEXT.md | |
| parent | Gamma: clamp slider to the engine's 2.6 cap, defer readback (diff) | |
| download | hl2h-592b865ca5c98d1df2153ea5b77f67aa8a76db60.tar.gz hl2h-592b865ca5c98d1df2153ea5b77f67aa8a76db60.zip | |
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.
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 17 |
1 files changed, 9 insertions, 8 deletions
| @@ -241,14 +241,15 @@ vocabulary / decisions. | |||
| 241 | `ClientCmd` when their slider changes. Gamma is stored as x10 | 241 | `ClientCmd` when their slider changes. Gamma is stored as x10 |
| 242 | (`[view] gamma=22` = 2.2) and the slider stops at 26 because the engine | 242 | (`[view] gamma=22` = 2.2) and the slider stops at 26 because the engine |
| 243 | clamps `mat_monitorgamma` at 2.6. The value is read back through | 243 | clamps `mat_monitorgamma` at 2.6. The value is read back through |
| 244 | `ICvar::FindVar` on the next tick (ClientCmd is queued) and logged | 244 | `ICvar::FindVar` on the next tick (ClientCmd is queued) and logged. The |
| 245 | (`view: gamma request ..., cvar reports ...`) to distinguish a rejected | 245 | engine does apply the ramp (`SDL_SetWindowGammaRamp` was called with |
| 246 | command from an OS gamma ramp the compositor ignores. `SDL_SetWindowGammaRamp` | 246 | changing midpoints), but a Wayland/XWayland compositor discards it, so on |
| 247 | is also interposed (first 12 calls log `gamma: SDL_SetWindowGammaRamp | 247 | this setup the slider has no visible effect. |
| 248 | mid=...`) to see whether the engine ever pushes a ramp after the slider | 248 | - `HDR brightness` (`[view] tonemap`, x10, 0 = automatic) sets |
| 249 | moves; if it does and the screen does not change, the compositor is | 249 | `mat_force_tonemap_scale`. This is in-engine tonemapping for HDR maps and |
| 250 | discarding it. Both live in the always-on | 250 | does not depend on the window system applying a gamma ramp; 10 = 1.0. |
| 251 | `Camera / display` card (`[view] fov/vmfov/gamma`). | 251 | Both live in the always-on `Camera / display` card |
| 252 | (`[view] fov/vmfov/gamma/tonemap`). | ||
| 252 | 253 | ||
| 253 | ## Map transitions | 254 | ## Map transitions |
| 254 | 255 | ||
