diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 18:03:09 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 18:03:09 +0100 |
| commit | ccd5256bfacf27ed81fbf13087ba04978d6913f8 (patch) | |
| tree | 8729b2e3e9bc7a43c1babb0376ea8b67fb5c9af5 /src/world.cpp | |
| parent | Chams: material fallbacks and FindMaterial diagnostics (diff) | |
| download | hl2h-ccd5256bfacf27ed81fbf13087ba04978d6913f8.tar.gz hl2h-ccd5256bfacf27ed81fbf13087ba04978d6913f8.zip | |
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.
Diffstat (limited to 'src/world.cpp')
| -rw-r--r-- | src/world.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) { | |||
| 1038 | const char *n = mat_name(mat); | 1038 | const char *n = mat_name(mat); |
| 1039 | if (n) { | 1039 | if (n) { |
| 1040 | for (int c = 0; candidates[c]; c++) | 1040 | for (int c = 0; candidates[c]; c++) |
| 1041 | if (strcmp(n, candidates[c]) == 0) | 1041 | if (strcmp(n, candidates[c]) == 0) { |
| 1042 | logf("chams: material %s = %p", n, mat); | ||
| 1042 | return mat; | 1043 | return mat; |
| 1044 | } | ||
| 1043 | } | 1045 | } |
| 1044 | } | 1046 | } |
| 1045 | h = next(ms, h); | 1047 | h = next(ms, h); |
