diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 18:37:04 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 18:37:04 +0100 |
| commit | 8e6efa22610be51391459238a2c5e16d1ff1a060 (patch) | |
| tree | ba5c80fe079967fd93bcb270aeeb304e7e1da698 /CONTEXT.md | |
| parent | Chams: model-safe styles and a dedicated viewmodel material (diff) | |
| download | hl2h-8e6efa22610be51391459238a2c5e16d1ff1a060.tar.gz hl2h-8e6efa22610be51391459238a2c5e16d1ff1a060.zip | |
Chams: style flags on the resident debug material
The base game only has debug/debugtranslucentsinglecolor resident, so the
other debug VMTs silently fell back to it and every style looked flat. Use that
material for every style and apply material flags instead: FLAT, WIREFRAME,
ADDITIVE, and FLAT|SELFILLUM for fullbright; white forces the colour. Flags are
cleared after the draw.
Diffstat (limited to '')
| -rw-r--r-- | CONTEXT.md | 21 |
1 files changed, 9 insertions, 12 deletions
| @@ -296,20 +296,17 @@ vocabulary / decisions. | |||
| 296 | vars (IMaterialVar slot 11, SetVecValue 3-float slot 11), because some forced | 296 | vars (IMaterialVar slot 11, SetVecValue 3-float slot 11), because some forced |
| 297 | materials ignore ColorModulate. The shared material's flag and colour are | 297 | materials ignore ColorModulate. The shared material's flag and colour are |
| 298 | restored to (false, white) after the draw. | 298 | restored to (false, white) after the draw. |
| 299 | - Material lookup walks the `IMaterialSystem` list (`world_find_material`), with | 299 | - The base game does not have the other debug VMTs resident and `FindMaterial` |
| 300 | `FindMaterial` (slot 71) as the fallback. The **exact requested style** is | 300 | does not make them available reliably, so all styles use the resident |
| 301 | tried first (resident, then loaded on demand), and only if that fails does it | 301 | `debug/debugtranslucentsinglecolor` and differ by material flags: |
| 302 | fall back to `debug/debugtranslucentsinglecolor`/debugwhite/vgui white. | 302 | 0 Flat (`FLAT`), 1 Wireframe (`WIREFRAME`), 2 Additive (`ADDITIVE`), |
| 303 | Styles: 0 Flat (`models/debug/debugwhite`), 1 Wireframe | 303 | 3 Solid (none), 4 White (colour forced to white), 5 Fullbright |
| 304 | (`debug/debugwireframe`), 2 Additive (`debug/additivevertexcolorvertexalpha`), | 304 | (`FLAT|SELFILLUM`). Flags are reset after the draw. |
| 305 | 3 Solid (`debug/debugtranslucentsinglecolor`), 4 White | ||
| 306 | (`debug/debugtranslucentvertexcolor`), 5 Fullbright | ||
| 307 | (`debug/debugmrmfullbright2`). The chosen material name is logged. | ||
| 308 | - `Viewmodel (hands/weapon)` applies the override to entities whose class | 305 | - `Viewmodel (hands/weapon)` applies the override to entities whose class |
| 309 | contains `viewmodel` or whose model path is `.../v_...`. Viewmodels always | 306 | contains `viewmodel` or whose model path is `.../v_...`. Viewmodels always |
| 310 | use the model-safe solid material (`debug/debugtranslucentsinglecolor`); | 307 | use the solid style (no style flags) with the selected colour; VGUI/white |
| 311 | VGUI/white materials do not draw skinned models and made the hands/weapon | 308 | materials do not draw skinned models and made the hands/weapon disappear. |
| 312 | disappear. Only the normal-depth pass is used. | 309 | Only the normal-depth pass is used. |
| 313 | - Feature is off by default; `[chams] active/bind/walls/viewmodel/material/r/g/b`, | 310 | - Feature is off by default; `[chams] active/bind/walls/viewmodel/material/r/g/b`, |
| 314 | with Through walls, Viewmodel, a Material dropdown and colour in the Visuals | 311 | with Through walls, Viewmodel, a Material dropdown and colour in the Visuals |
| 315 | card. | 312 | card. |
