From ccd5256bfacf27ed81fbf13087ba04978d6913f8 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 18:03:09 +0100 Subject: Chams: tint through $color/$color2 and log the chosen material ColorModulate alone left the forced material white. Also set the shader's $color and $color2 vars (IMaterialVar SetVecValue 3-float) and restore them to white after the draw. Log which fallback material was selected. --- src/world.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/world.cpp') diff --git a/src/world.cpp b/src/world.cpp index 15a93ec..284e64e 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -1038,8 +1038,10 @@ void *world_find_material(const char *name) { const char *n = mat_name(mat); if (n) { for (int c = 0; candidates[c]; c++) - if (strcmp(n, candidates[c]) == 0) + if (strcmp(n, candidates[c]) == 0) { + logf("chams: material %s = %p", n, mat); return mat; + } } } h = next(ms, h); -- cgit v1.2.3