diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 14:07:49 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 14:07:49 +0100 |
| commit | 5bc97393aee4124b00db3ab4fbe8d6e26ba88069 (patch) | |
| tree | 7315ee842a071d30f5e035b9a11b0a8045e26588 /CONTEXT.md | |
| parent | Transitions: per-trigger targets and 3D wireframe; FOV range fixes (diff) | |
| download | hl2h-5bc97393aee4124b00db3ab4fbe8d6e26ba88069.tar.gz hl2h-5bc97393aee4124b00db3ab4fbe8d6e26ba88069.zip | |
Gamma: clamp slider to the engine's 2.6 cap, defer readback
The engine clamps mat_monitorgamma at 2.6, so the 2.8..3.0 end of the slider
did nothing. Read the value back one tick later (ClientCmd is queued) and
interpose SDL_SetWindowGammaRamp to see whether the engine pushes a ramp at
all.
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 15 |
1 files changed, 10 insertions, 5 deletions
| @@ -239,11 +239,16 @@ vocabulary / decisions. | |||
| 239 | migrate to the stock value). | 239 | migrate to the stock value). |
| 240 | - `viewmodel_fov` and `mat_monitorgamma` are client cvars; applied through | 240 | - `viewmodel_fov` and `mat_monitorgamma` are client cvars; applied through |
| 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). The gamma value is read back through | 242 | (`[view] gamma=22` = 2.2) and the slider stops at 26 because the engine |
| 243 | `ICvar::FindVar` and logged (`view: gamma request ..., cvar reports ...`) | 243 | clamps `mat_monitorgamma` at 2.6. The value is read back through |
| 244 | to distinguish a rejected command from an OS gamma ramp the compositor | 244 | `ICvar::FindVar` on the next tick (ClientCmd is queued) and logged |
| 245 | ignores. Both live in the always-on `Camera / display` card | 245 | (`view: gamma request ..., cvar reports ...`) to distinguish a rejected |
| 246 | (`[view] fov/vmfov/gamma`). | 246 | command from an OS gamma ramp the compositor ignores. `SDL_SetWindowGammaRamp` |
| 247 | is also interposed (first 12 calls log `gamma: SDL_SetWindowGammaRamp | ||
| 248 | mid=...`) to see whether the engine ever pushes a ramp after the slider | ||
| 249 | moves; if it does and the screen does not change, the compositor is | ||
| 250 | discarding it. Both live in the always-on | ||
| 251 | `Camera / display` card (`[view] fov/vmfov/gamma`). | ||
| 247 | 252 | ||
| 248 | ## Map transitions | 253 | ## Map transitions |
| 249 | 254 | ||
