summaryrefslogtreecommitdiffstats
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-03 23:21:13 +0100
committersalmonik <salmonik@tuta.io>2026-11-03 23:21:13 +0100
commit1f7c91905f69baba0aca8265c84deaba2ddac98a (patch)
tree9014a7e63e5531a05ff96c80a07ecccda927a533 /src/modules.cpp
parentRemove temporary crash-stage markers (diff)
downloadhl2h-1f7c91905f69baba0aca8265c84deaba2ddac98a.tar.gz
hl2h-1f7c91905f69baba0aca8265c84deaba2ddac98a.zip
World: add world/sky material colour modulation
Port Amalgam's modulation approach: obtain IMaterialSystem from the already loaded materialsystem.so (VMaterialSystem080) and walk materials with FirstMaterial/NextMaterial/GetMaterial. ColorModulate the "World textures" group (sky names excluded) and the "SkyBox textures"/sky-named group. The walk runs only when the enabled groups or colours change, restores white when disabled, and re-applies after level changes. Before touching materials, GetNumMaterials() and the first material's name/group are sanity-checked so a wrong vtable slot logs and aborts instead of walking garbage. GUI: "World tint" card with world/sky toggles and RGB sliders; config section [worldtint].
Diffstat (limited to 'src/modules.cpp')
0 files changed, 0 insertions, 0 deletions