perf(paint): stronger X-ray hit flash + kill spawn/respawn freeze

X-ray hit flash: drive a dedicated flash mode instead of the normal
reveal - pulse off (steady), intensity boost (xrayFlashBoost, default 3x),
snap-on, then restore authored color/pulse exactly. Fixes the weak/dark
flicker where the 0.35s hit window often caught only the pulse's near-off
plateau.

Spawn/respawn freeze: pool GPU RenderTextures across despawn->respawn
(TeardownGpu recycles, CreateRT pops) so a hider->hunter conversion no
longer churns ~70MB of RT alloc/free on every observer; reuse staging
textures to cut per-map GC. Defer the blank base-seed on reveal-gated
remote replicas (DeferInitialSeed) - the real pixels arrive with the
snapshot apply anyway; gate the FurShellRenderer alongside the body so a
deferred replica never shows the pooled RT's stale fur; EnsureBackendSeeded
+ TryCaptureSnapshot guard against capture-before-reseed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 4.8 committed 2026-07-04 15:14:20 +02:00
1 parent 4ceaf85c8f
commit 48975c0f20
9 files changed
+196 -24

No files matched your search

@@ -158,6 +158,12 @@ public class PlayerPaintSync : NetworkBehaviour
// Remote replica: never paint from this machine's mouse; paint only from replicated data.
_painter.PaintingEnabled = false;
// Skip the wasted base seed on the initial backend build: this reveal-gated body stays hidden
// until the painting snapshot is applied (which re-seeds the backend), so seeding grey/white at
// Start only stalls this observer's spawn frame. Set BEFORE the painter's Start (OnNetworkSpawn
// runs first), so the deferral takes effect.
_painter.DeferInitialSeed = true;
// Track the owner's emission intensity; seed the current (late-join) value right away.
_emissionIntensity.OnValueChanged += OnEmissionChanged;
_painter.emissionIntensity = _emissionIntensity.Value;