The Mesh LOD proxy box rendered flat gray instead of the car's color. It was
being given a shared material tinted via Material.color (the legacy _Color
property), which URP ignores in favor of _BaseColor, and a single shared
material cannot match each car anyway. Reuse the car's own material so the box
matches its color again.
Also destroy the proxy box mesh when tearing down or refreshing a car's LOD
(the GameObject was destroyed but the Mesh leaked until scene unload), and
prune dead weak-refs from the tracked-car list periodically so it cannot grow
unbounded across a long session.
Fix a stale comment in PhysicsTimer that still referenced PhysicsOverlayGUI
after the overlay moved to the Profiler module.
Add a standalone Profiler module (S3.profiler.json, disabled by default)
that hosts the in-game frame-time overlay previously owned by Physics
Optimizer. The overlay now adapts to whichever modules are enabled:
- Always shows: render + physics frame-time graph, timing report.
- Physics Optimizer section (if enabled): LOD fast-path and auto-freeze
quick-toggles with live stats, debug car count line.
- Mesh LOD section (if enabled): total tracked cars, loco/freight split,
per-LOD-level counts refreshed once per second.
PhysicsOptimizerModule retains only the Harmony patches and
CarDebugVisualizer; ShowOverlay/OverlayOpacity removed from PhysicsSettings.
MeshLodInjector gains GetLodStats() and GetLodLevel() for the overlay.
BBox material shader search now tries URP/Lit before Standard.
/rpf overlay toggle redirected to ProfilerOverlayGUI.Instance.
- Rename all MeshLodSettings public fields to camelCase (consistency
with every other settings class in the project).
- Replace the proxy-box renderer's borrowed car material with a shared
matte Standard material tinted to the car body albedo; cheaper at
LOD3 distances and responds correctly to scene lighting at night.
- Expose GetTrackedCounts() and display loco/freight breakdown next to
the Refresh Now button in the settings panel.
Map: per-track industry labels rendered via Dear ImGui on both the popout
and in-game overlay. Three zoom stages - per-track labels, merged same-name
clusters, and one-per-industry labels at wider zoom. Settings: font size
(min/max with zoom scaling), leader lines, parallel rotation, collision
spread, utility track filters (repair/diesel/loader/interchange), zoom
thresholds per category. C# runs a world-space AABB solver at rebuild so
offsets are rotation-invariant; native runs a per-frame screen-space
fine-tuning pass and draws leader lines.
Mesh LOD: new module skeleton with 4-level LOD group injected on
HandleModelsLoaded - three progressive renderer cull tiers (sorted by
bounds volume) plus a 12-tri proxy box at max distance. lodBias-corrected
distance-to-screenHeight conversion. Debounced live refresh on settings
change. Disabled by default.