Stale material cache after VMT/VTF edit at runtime
0 reputation · 05 Sept 2021, 04:21 UTC
Determine whether the Source Engine material system can automatically invalidate cached VMT/VTF data when the source files change during runtime, without introducing noticeable performance hitches or breaking mod‑specific overrides.
Constraints: the engine currently relies on modification timestamps recorded at load time and does not watch the file system; any automatic mechanism must avoid stalling the render thread and must respect mod load orders. Uncertainty: impact on frame time, compatibility with existing mods, and whether a lightweight file‑system notification or periodic poll would be suitable.
- Would a lightweight file‑system watcher that triggers cache invalidation only when a material file's timestamp changes be feasible without causing hitches?
- How could the engine distinguish between intentional mod overrides and inadvertent changes to avoid visual inconsistencies?
- What performance budget (e.g., extra microseconds per frame) would be acceptable for such a check on typical hardware?