PORT-PLAN: record real-time clocks and LOD mesh swap

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-12 17:56:56 +09:00
co-authored by Claude Opus 5.5
parent bfd42bd776
commit 7236edf747
+24 -1
View File
@@ -1069,7 +1069,7 @@ item:
(`CGrannyLODController::UpdateLODLevel` + `CGrannyModelInstance::Update`):
only models with a `_lod_01.gr2` sibling, more than 500 units from the camera
target, 30-120 FPS by camera distance over 5000 (25000 for models of 500+
units). The `_lod_` meshes are still not swapped in.
units). The `_lod_` meshes are now swapped in too; see the follow-up below.
GPU skinning limit reviewed, not changed: 36 of 3755 skinned models in pc*,
monster*, npc*, npc_mount and npc_pet exceed 128 bones (bosses, metin stones,
@@ -1081,3 +1081,26 @@ Verified: Debug macOS/Metal build, 50/50 CTests (new regressions for
`FlattenDraws`, scaled-scene compositing and LOD animation rate). Not verified:
in-game frame-time capture and 3D screenshots (no server in this session), and
any Vulkan/Android device run.
### 2026-10-12 FPS pass 2 follow-up: real-time clocks and LOD meshes
- Animation clocks follow real frame time: `main.cpp` sums the frame delta into
a game clock (still fixed at 0.033 s per frame under `--frames`) for water,
network actors, `FlyingManager` and weapon traces; the skybox,
`effect.Update`/`fly.Update` (`app.GetGameFrameDelta`) and `CRenderTarget`
previews (elapsed `SDL_GetTicksNS`, clamped to 0.25 s) use real deltas.
The SpeedTree `UpdateSystem(0.033f)` wind clock is unchanged (SDK work pending).
- Actor bodies swap to `_lod_01.._03` meshes (`CGrannyLODController`): queue
`{lod_03, lod_02, lod_01, main}`, lazy loading, the original distance bands
(including the BYTE wrap for a single LOD) and the building factor. Parts,
`.msm` skins and the current motion follow the drawn instance.
- 9 of 1739 shipped LODs drop an attaching bone (`lion2_lod_02/03` lose
`saddle`; `shaman_miyeom_lod_*`, `mutant_1/2`, `gold_monkey` and
`assassin_easter_day_2016` `_lod_01` lose `equip_*`). Such a level stays on
PART_MAIN while that bone is in use, and bone queries fall back to PART_MAIN.
- Not ported: weapon/item LOD models; helper attachments made outside the part
slots are still dropped on rebind (as before).
Verified: Debug macOS/Metal build, 50/50 CTests (`render_3d` covers the LOD
bands, the 30 FPS far pose rate on `_lod_03` and the `lion2` saddle fallback).
Not verified: in-game or device visuals (no server in this session).