diff options
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 33 |
1 files changed, 19 insertions, 14 deletions
| @@ -358,20 +358,25 @@ vocabulary / decisions. | |||
| 358 | - End is clamped above Start. Re-applied on level change via | 358 | - End is clamped above Start. Re-applied on level change via |
| 359 | `fog_invalidate()`. Saved as `[fog] active/bind/r/g/b/start/end/skybox/disable`. | 359 | `fog_invalidate()`. Saved as `[fog] active/bind/r/g/b/start/end/skybox/disable`. |
| 360 | 360 | ||
| 361 | ### Skybox changer | 361 | ### Skybox image |
| 362 | 362 | ||
| 363 | - `sv_skyname <name>` through `ClientCmd`, the same mechanism the stock | 363 | - Replaces the map skybox with `<config dir>/skybox.png` (same directory as |
| 364 | `skybox_swapper` entity uses. Choice list is the HL2 skybox set from the | 364 | the INI). Not `sv_skyname`: that did not take effect at runtime in this |
| 365 | game's VPK (no episode-only skies, so a selected sky always exists). | 365 | build, so the skybox card now works on materials instead. |
| 366 | - Before the first override of a map, the map's own sky is captured by | 366 | - PNG is decoded with libpng16's simplified API (`dlopen`ed, no link |
| 367 | scanning loaded materials in the `SkyBox textures` group and parsing | 367 | dependency); the RGBA pixels become an `ITexture` via |
| 368 | `skybox/<name>(_hdr|_ldr)?(rt|bk|lf|ft|up|dn)`. Disabling the feature (or | 368 | `IMaterialSystem::CreateTextureFromBits` (RGBA8888, one mip). |
| 369 | choosing "Map default") restores that name; a level change also restores it | 369 | - The texture is assigned with `IMaterialVar::SetTextureValue` to |
| 370 | naturally, so `skybox_invalidate()` just drops the captured state. | 370 | `$basetexture`, plus `$hdrbasetexture` / `$hdrcompressedtexture` when those |
| 371 | - Changing the sky invalidates the world tint so the freshly loaded sky | 371 | vars exist, on every material in the `SkyBox textures` group or named |
| 372 | materials get the sky colour. | 372 | `skybox/*`. The same image is mapped onto all six faces. |
| 373 | - Saved as `[skybox] active/bind/choice`. The GUI uses a `CK_CHOICE` | 373 | - Original textures are recorded per material/var (texture pointer plus the |
| 374 | control (value box with `<`/`>` hit zones). | 374 | string as a fallback) and restored when the feature is disabled. Records |
| 375 | survive level changes so a reused sky material can still be restored; the | ||
| 376 | override is re-applied to the new map automatically. | ||
| 377 | - The card shows the image path and has a Reload image button. A missing or | ||
| 378 | unreadable PNG raises an error toast; the image is only re-read on Reload. | ||
| 379 | - Saved as `[skybox] active/bind`. | ||
| 375 | 380 | ||
| 376 | ## Logging | 381 | ## Logging |
| 377 | 382 | ||
