From 8e6efa22610be51391459238a2c5e16d1ff1a060 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 18:37:04 +0100 Subject: 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. --- CONTEXT.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index ce79800..72559ac 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -296,20 +296,17 @@ vocabulary / decisions. vars (IMaterialVar slot 11, SetVecValue 3-float slot 11), because some forced materials ignore ColorModulate. The shared material's flag and colour are restored to (false, white) after the draw. -- Material lookup walks the `IMaterialSystem` list (`world_find_material`), with - `FindMaterial` (slot 71) as the fallback. The **exact requested style** is - tried first (resident, then loaded on demand), and only if that fails does it - fall back to `debug/debugtranslucentsinglecolor`/debugwhite/vgui white. - Styles: 0 Flat (`models/debug/debugwhite`), 1 Wireframe - (`debug/debugwireframe`), 2 Additive (`debug/additivevertexcolorvertexalpha`), - 3 Solid (`debug/debugtranslucentsinglecolor`), 4 White - (`debug/debugtranslucentvertexcolor`), 5 Fullbright - (`debug/debugmrmfullbright2`). The chosen material name is logged. +- The base game does not have the other debug VMTs resident and `FindMaterial` + does not make them available reliably, so all styles use the resident + `debug/debugtranslucentsinglecolor` and differ by material flags: + 0 Flat (`FLAT`), 1 Wireframe (`WIREFRAME`), 2 Additive (`ADDITIVE`), + 3 Solid (none), 4 White (colour forced to white), 5 Fullbright + (`FLAT|SELFILLUM`). Flags are reset after the draw. - `Viewmodel (hands/weapon)` applies the override to entities whose class contains `viewmodel` or whose model path is `.../v_...`. Viewmodels always - use the model-safe solid material (`debug/debugtranslucentsinglecolor`); - VGUI/white materials do not draw skinned models and made the hands/weapon - disappear. Only the normal-depth pass is used. + use the solid style (no style flags) with the selected colour; VGUI/white + materials do not draw skinned models and made the hands/weapon disappear. + Only the normal-depth pass is used. - Feature is off by default; `[chams] active/bind/walls/viewmodel/material/r/g/b`, with Through walls, Viewmodel, a Material dropdown and colour in the Visuals card. -- cgit v1.2.3