Commit graph

41 commits

Author SHA1 Message Date
MiTHRAL
36b5169e27 ghost multiplayer: cloth on ghosts + player nameplates
Phase 4:

- Cloth: remote ghosts now wear this player's cloth garments (tee/pants).
  The local player's rigid character.cloth_ropa items (CPU-sim deformed
  root-local VB) are cloned per ghost and drawn with the REMOTE entity world
  from the pose, so each ghost is draped in its own root frame. No mesh or
  cloth data is transmitted; the shader already applies item.world to the
  rigid cloth path (zero blend weights). Sim-inactive (skinned) garments and
  garments not near the local body are skipped.

- Nameplates: display names ride the wire. JOIN carries a display name
  (skate3_ghost_name cvar, default the OS user name); the relay stores it
  per client and echoes {session_id, name} pairs in the HELLO roster
  (RosterEntry). Clients re-JOIN every 5 s so the roster/names stay current
  as members join and leave. A GhostNameplateOverlay (always registered,
  draws only while enabled) projects each ghost's entity origin +1.75 m
  through the published camera and draws a colored name label above it.

  Uses skate3::native_scene::GetPublishedCamera (new thread-safe snapshot of
  the published view-proj/cam) so the UI thread can project world points.

- GhostDialog gains a display-name field. Protocol version bumped to 3.
2026-08-26 21:17:43 -04:00
MiTHRAL
bfb504db7d ghost multiplayer: full skater skeleton pose + character-model ghosts
Phase 2: replace the placeholder-cube ghost rendering with real character
models driven by the remote player's skeleton.

- Wire: POSE now carries the sender's skater skeleton (up to 64 bones, 3
  float4 rows each, index-ordered exactly like DrawItem::bones), padded with
  identity rows so every mesh's referenced bones stay in range. The relay
  forwards POSE payloads verbatim (re-stamping only the sender session id),
  so the protocol can grow without a relay update.
- Capture: OnFrameSceneBuilt (called from BuildFrameScene pre-publish)
  snapshots the local player's body item bone palette (highest-bone-count
  skinned non-ropa non-LivingWorld char item near the camera) as the
  broadcast pose; defaults the broadcast rate to 15 Hz.
- Render: in RenderScene, each remote ghost is drawn by cloning this
  player's own character pieces (body + nearby skinned char items) and
  substituting the remote skeleton into the bone ring - same meshes,
  textures and cached GPU decodes, no mesh transfer. Ghosts without a pose
  (older peers / capture not ready) fall back to the solid-color cube, which
  skate3_ghost_draw_local still uses for the self-check.

Known Phase-2 limitations (documented in code): ghosts render with this
player's own character model/outfit, cloth (ropa) garments are skipped (no
remote cloth sim), and hair/alpha pieces render opaque. All confined to
src/native and the hand-written scene hooks.
2026-08-26 20:16:42 -04:00
MiTHRAL
269fbcee32 Add ghost multiplayer: UDP relay + pose broadcasting + placeholder cubes
Bolt-on multiplayer layer confined to src/native and hand-written code (no
codegen output touched):

- GhostRelay core (src/native/skate3_native_ghost_relay.*): small UDP relay
  matching clients into rooms by a shareable code; forwards each client's
  pose to the other room members. Used by both the standalone binary and
  the in-game LAN host fallback.
- Standalone server (tools/ghost_relay_main.cpp, ghost_relay target): runs
  on a public VPS or behind a free tunnel; clients connect OUTBOUND, so no
  port forwarding is needed on any client.
- In-game module (skate3_native_ghost.*): captures the local player's world
  transform at Sk8::UpdateBoneTransforms exit (pack-owner entity +416,
  verified layout) and broadcasts it at a fixed rate; auto-connects to the
  default public relay, falls back to LAN auto-host + UDP broadcast
  discovery when unreachable.
- Renderer: draws a solid-color cube per remote player in RenderScene via
  the existing scene PSO tint.a>0 branch (no new shader/SPIR-V).
- UI: GhostDialog (M key) with enable toggle, room code, relay override,
  status readout. Off by default.

Wire protocol in skate3_native_ghost_proto.h (JOIN/HELLO/POSE/PING/LEAVE).
2026-08-26 20:12:45 -04:00
mchughalex
f6e0ae87fd render: declare copy-source usage on the readback source textures 2026-07-24 21:49:05 +01:00
mchughalex
ebe14fcd1f render: recover streaming-revoked guest read faults on linux and macos 2026-07-24 19:03:31 +01:00
mchughalex
186c7de6f4 render: stand the static sun shadows down in venues with no sane world lighting capture 2026-07-24 13:38:02 +01:00
mchughalex
7b0d690cf3 render: skip rebuilding occlusion-culled statics on most frames 2026-07-24 13:38:01 +01:00
mchughalex
8f8642aec2 render: time the submit-record loop and pre-size per-frame bookkeeping 2026-07-24 13:38:01 +01:00
mchughalex
2aef1222a0 render: skip guest draw-list dispatch for occlusion-culled statics 2026-07-24 13:38:01 +01:00
mchughalex
73c19c8cd3 render: occlusion-cull statics hidden behind rendered geometry 2026-07-24 13:38:01 +01:00
mchughalex
13447a041f render: profile the per-item CPU pipeline with occlusion-grid visibility attribution 2026-07-24 13:38:01 +01:00
mchughalex
c0ba909c86 render: accumulate the static world-shadow map incrementally (SDK bump) 2026-07-24 13:38:01 +01:00
mchughalex
4d616e4d45 render: mark the native scene passes for GPU-time attribution (SDK bump) 2026-07-24 13:38:01 +01:00
mchughalex
9fb6e5505f render: widen the content-store count caps now that byte budgets bound VRAM 2026-07-21 10:34:23 +01:00
mchughalex
0224fdf74e render: budget the content stores by GPU bytes and LRU-evict the cube cache 2026-07-21 10:21:37 +01:00
mchughalex
7fa9585285 render: compile the showcase gates out of the standard shader variants 2026-07-21 09:50:17 +01:00
mchughalex
137d97c190 render: keep showcase staging fully inert while no showcase frame is live 2026-07-21 09:31:00 +01:00
mchughalex
f47de1e596 render: record the captured cascade rows in the scene ring 2026-07-21 08:35:36 +01:00
mchughalex
bb5d99ed10 render: record the shadow-atlas outcome in the scene ring 2026-07-21 08:18:41 +01:00
mchughalex
5218b5f94c render: hold the static sun axis and cached map through single-frame capture outliers 2026-07-21 08:02:37 +01:00
mchughalex
b6d9442b45 render: add a Vulkan-only static sun receiver bias margin for toolchain rounding differences 2026-07-21 07:57:12 +01:00
mchughalex
d3f230b064 render: double the texture store cap now that entries carry no staging 2026-07-21 06:19:40 +01:00
mchughalex
3d09c764f8 render: stamp the texture-store LRU clock at commit so fresh decodes survive the eviction latch 2026-07-21 06:06:18 +01:00
mchughalex
2f803421e7 render: scale store-eviction idle guards to wall clock and log LRU latch transitions 2026-07-21 05:51:31 +01:00
mchughalex
270f99bb24 render: release texture staging at commit, LRU-evict the mesh cache, pool dynamic-mesh buffers 2026-07-21 05:24:40 +01:00
mchughalex
b8a8180475 render: drop the static sun forced-failure debug hook 2026-07-21 03:33:42 +01:00
mchughalex
77283fe3fb render: surface the sticky-failure fallback (EMULATED readout, F5 retry, forced-failure debug hook) 2026-07-21 03:31:11 +01:00
mchughalex
33b7465d2e render: showcase decals/dyn layers, blackout bookends, and hot-rebuild fixes 2026-07-21 02:40:19 +01:00
mchughalex
32eb60337a render: true ultrawide through the native renderer 2026-07-20 00:36:16 +01:00
mchughalex
cb14799e47 render: apply MSAA and shadow map resolution changes live 2026-07-19 23:50:32 +01:00
mchughalex
404cec3378 app: gate diagnostic captures and logging behind debug cvars, native renderer on by default 2026-07-19 22:45:33 +01:00
mchughalex
275fa431c3 render: character normal maps and specular lighting 2026-07-19 21:59:58 +01:00
mchughalex
ccf84fade3 render: graphics build-up showcase mode 2026-07-19 19:58:30 +01:00
mchughalex
a5f54b4827 render: fingerprint DXT alpha blocks by their color half (stale menu art) 2026-07-19 18:51:25 +01:00
mchughalex
cbc492a407 render: exact scrollincandescent port - the LED chyron scrolls and glows 2026-07-19 18:49:29 +01:00
mchughalex
f11aa9ece4 render: cascaded static sun-shadow map with contact-hardening soft shadows 2026-07-19 16:55:36 +01:00
mchughalex
9088059ed5 render: keep character smoothing coherent at very high frame rates 2026-07-19 14:42:29 +01:00
mchughalex
f2aaf4081e render: volumetric sun shafts, directional haze, and a movable-sun lighting lab 2026-07-19 14:05:10 +01:00
mchughalex
75c8487ee6 render: port the water and ocean shaders to exact native branches 2026-07-19 13:02:10 +01:00
mchughalex
13669fe589 render: peel the post-process passes into their own translation unit 2026-07-19 10:28:14 +01:00
mchughalex
e591f76f21 render: split the scene renderer into capture and GPU translation units 2026-07-19 10:19:22 +01:00