From c15a74d39f87c73a35ca420450e2876db2c37deb Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 19:09:31 +0100 Subject: Chams: use the model solid shader for flat, drop vgui/white vgui/white is an UnlitGeneric with $vertexcolor/$vertexalpha, no basetexture and no $model, so it renders nothing on model vertices; Flat was invisible on the viewmodel and would be invisible on NPCs too. Flat now uses the solid model shader with the FLAT flag. Remove the vgui/white probe. --- src/studio.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/studio.cpp b/src/studio.cpp index 301e781..4941142 100644 --- a/src/studio.cpp +++ b/src/studio.cpp @@ -208,8 +208,8 @@ const char *chams_material_name(int idx) { case 3: case 4: case 5: - case 6: return "debug/debugtranslucentsinglecolor"; - default: return "vgui/white"; // models/debug/debugwhite is EP2-only + case 6: + default: return "debug/debugtranslucentsinglecolor"; } } @@ -300,10 +300,6 @@ void hkdModelExecute(void *self, const void *state, const void *info, if (style < 0) style = 0; if (style > 6) style = 6; void *mat = style_material(style); - // vgui/white (Flat) does not draw skinned models, so the viewmodel - // uses the solid model shader with the same FLAT flag. - if (is_vm && style == 0) - mat = viewmodel_material(); if (!mat) return false; bool white = style == 4; @@ -367,16 +363,10 @@ static double chams_now() { // the style VMTs. The render hook only reads the cached pointers. void chams_preload() { static double last = 0.0; - static bool probed = false; double now = chams_now(); if (now - last < 1.5) return; last = now; - if (!probed) { - probed = true; - void *probe = world_find_material("vgui/white"); - logf("chams: probe vgui/white = %p", probe); - } for (int i = 0; i < 7; i++) { if (g_style_mats[i]) continue; -- cgit v1.2.3