From 86093c9052db0aec19f9d993dc59dc5259d085bb Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 19:39:27 +0100 Subject: Chams: make Fullbright a white-hot additive glow Fullbright was additive with the chosen colour lifted only 25% toward white, which on a dark scene looked almost identical to Solid/Flat. Force white for the Fullbright colour so the additive pass reads as a distinctly brighter, white-hot glow; the faint translucent base still gives it a silhouette on bright backgrounds. --- CONTEXT.md | 3 ++- src/studio.cpp | 12 +----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/CONTEXT.md b/CONTEXT.md index 1bb0a6a..bfb0d8e 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -304,7 +304,8 @@ vocabulary / decisions. `$color`) and material flags: 0 Flat (solid + FLAT), 1 Wireframe (`debug/debugwireframe`), 2 Additive (+ ADDITIVE), 3 Solid, 4 White (colour forced white), 5 Fullbright - (ADDITIVE|SELFILLUM with the colour lifted toward white), 6 Glow outline + (ADDITIVE|SELFILLUM, colour forced white so it reads as a white-hot glow + instead of matching Solid), 6 Glow outline (solid plus a `debug/debugwireframe` contour pass drawn with ZNEARER (1 << 10) and a brightened colour so the base cannot bury it). `vgui/white` is vertex-colour based and has no `$model`/`$basetexture`, so it diff --git a/src/studio.cpp b/src/studio.cpp index 07ebec3..086d213 100644 --- a/src/studio.cpp +++ b/src/studio.cpp @@ -315,18 +315,8 @@ void hkdModelExecute(void *self, const void *state, const void *info, void *mat = style_material(style); if (!mat) return false; - bool white = style == 4; - // Fullbright is an additive, self-illuminated version of the - // chosen colour: lift it toward white so it reads brighter than - // the plain additive style. - int brgb[4]; + bool white = style == 4 || style == 5; const int *use_rgb = rgb; - if (style == 5) { - for (int i = 0; i < 3; i++) - brgb[i] = rgb[i] + (255 - rgb[i]) / 4; - brgb[3] = rgb[3]; - use_rgb = brgb; - } // Additive blending vanishes against bright backgrounds (sky, // white walls, strong fog), which made the viewmodel disappear in // some places. Lay down a faint translucent base so the first-person -- cgit v1.2.3