diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-03 23:32:16 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-03 23:32:16 +0100 |
| commit | edba65625dd5823705619a2e682a99d6ad91ae8b (patch) | |
| tree | cae03d46267469d1076937ad22c7b2aec63b068e /CONTEXT.md | |
| parent | GUI: add inline colour picker control (diff) | |
| download | hl2h-edba65625dd5823705619a2e682a99d6ad91ae8b.tar.gz hl2h-edba65625dd5823705619a2e682a99d6ad91ae8b.zip | |
World: add prop tint and fog override
- World tint now also colours prop materials (models/props*) with their own
colour, covering static props and prop_physics while leaving NPC, player and
weapon materials untouched.
- New Fog card: fog_override colour/start/end via ClientCmd, optional skybox
fog, and a Remove fog mode. Restores the map fog (fog_override 0) when
disabled and re-applies after level changes.
- Config sections [worldtint] prop/colour keys and [fog].
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 26 |
1 files changed, 23 insertions, 3 deletions
| @@ -316,8 +316,11 @@ vocabulary / decisions. | |||
| 316 | already-loaded `materialsystem.so` and walk every material with | 316 | already-loaded `materialsystem.so` and walk every material with |
| 317 | `FirstMaterial` / `NextMaterial` / `GetMaterial`. | 317 | `FirstMaterial` / `NextMaterial` / `GetMaterial`. |
| 318 | - `IMaterial::ColorModulate(r,g,b)` is applied to materials whose | 318 | - `IMaterial::ColorModulate(r,g,b)` is applied to materials whose |
| 319 | `GetTextureGroupName()` is `World textures` (sky names excluded) and to | 319 | `GetTextureGroupName()` is `World textures` (sky names excluded), to |
| 320 | `SkyBox textures` (or names containing `sky`). Lightmaps are not touched. | 320 | `SkyBox textures` (or names containing `sky`), and to prop materials whose |
| 321 | name starts with `models/props` (static props and prop_physics share those | ||
| 322 | model materials; NPC/player/weapon materials are excluded). Lightmaps are | ||
| 323 | not touched. | ||
| 321 | - Slot map (2013 SDK layout, registered under `VMaterialSystem080`): | 324 | - Slot map (2013 SDK layout, registered under `VMaterialSystem080`): |
| 322 | `IMaterialSystem` 73/74/75/76/77 = First/Next/Invalid/Get/GetNumMaterials; | 325 | `IMaterialSystem` 73/74/75/76/77 = First/Next/Invalid/Get/GetNumMaterials; |
| 323 | `IMaterial` 0/1/28 = GetName/GetTextureGroupName/ColorModulate. | 326 | `IMaterial` 0/1/28 = GetName/GetTextureGroupName/ColorModulate. |
| @@ -327,7 +330,24 @@ vocabulary / decisions. | |||
| 327 | - Validation before any walk: `GetNumMaterials()` must return 1..200000; the | 330 | - Validation before any walk: `GetNumMaterials()` must return 1..200000; the |
| 328 | first material's name/group must be printable strings. A mismatch logs and | 331 | first material's name/group must be printable strings. A mismatch logs and |
| 329 | toasts instead of poking garbage. | 332 | toasts instead of poking garbage. |
| 330 | - Saved as `[worldtint] active/bind/world/sky/wr..wb/sr..sb`. | 333 | - Saved as `[worldtint] active/bind/world/sky/prop/wr..pb`. |
| 334 | - Particle tint is deliberately not implemented: HL2's old particle manager | ||
| 335 | draws per-vertex coloured IMesh quads, and SpriteCard/TF2-style particles | ||
| 336 | take colour from per-particle vertex data, so `IMaterial::ColorModulate` | ||
| 337 | does nothing for them. It needs a hook in the client particle render path. | ||
| 338 | |||
| 339 | ### Fog | ||
| 340 | |||
| 341 | - `src/world.cpp` `fog_update()`, driven by the `fog_override` engine command | ||
| 342 | family through `IVEngineClient::ClientCmd` (same safe path as fullbright). | ||
| 343 | No render hooks. | ||
| 344 | - Enabled: `fog_override 1`, `fog_enable 1`, `fog_color`, `fog_start`, | ||
| 345 | `fog_end`, plus `fog_enableskybox` / `fog_colorskybox` / | ||
| 346 | `fog_startskybox` / `fog_endskybox` when skybox fog is on. | ||
| 347 | "Remove fog" issues `fog_enable 0` instead. | ||
| 348 | - Disabled: `fog_override 0` restores the map's own fog controller. | ||
| 349 | - End is clamped above Start. Re-applied on level change via | ||
| 350 | `fog_invalidate()`. Saved as `[fog] active/bind/r/g/b/start/end/skybox/disable`. | ||
| 331 | 351 | ||
| 332 | ## Logging | 352 | ## Logging |
| 333 | 353 | ||
