feat: Performance overlay card
This PR adds a lightweight performance overlay card rendered in the Metal client. The card is anchored to the left wrist/forearm so it’s visible in-headset without opening a separate window. It displays real‑time device frame timing and stage metrics, letting you see the difference between the device framerate & timing vs. what the server reports.
## What’s Included
- A persistent, hand‑tracked performance card (left forearm) rendered via Metal.
- Time‑series graphs for frame timing and key pipeline stages.
- Runtime settings toggle
- Collapsed the Chroma Key settings when it isn't checked because the extra settings I've added pushed settings below the "connection info" block.
## Why
Debugging performance in visionOS requires in‑headset feedback. This card provides immediate signal without leaving immersive mode, and avoids adding extra windows or tools. I wanted to see if my chaperone branch was introducing any latency, but it's hard to see that in the server charts and running Xcode with logging introduces it's own latency
## How It Works
- A SwiftUI overlay view is rendered to a texture and drawn in the Metal render pass.
- Metrics are captured and aggregated off the critical render path.
- The card is positioned relative to the left wrist pose so it stays readable and stable.
One note: these stats are calculated fresh, so they probably don't match the ones reported to the server. Codex tells me it can expose those stats out of the ALVR submodule and then import them here, but that's a multi-PR undertaking, so I just kept it to this for now.
## Testing
- Verified the card renders over the Metal client view.
- Confirmed tracking behavior on both hand tracking and controllers.
## Screenshots
<img width="721" height="876" alt="Settings" src="https://github.com/user-attachments/assets/bc8cec16-4aa8-43f4-b00f-ec4c9bdc5ef2" />
<img width="675" height="865" alt="Card" src="https://github.com/user-attachments/assets/a29412de-2358-4955-a878-472428249038" />
Apologies for the foveated screenshots. I've had some issues with developer capture recently and haven't bothered to figure out why.
## This is AI Code
Code written by Codex 5.2, but I've tested it pretty extensively. Since it's gated behind a settings flag, I don't see how it could introduce performance issues if it's off, and I haven't noticed performance issues while it's one.
合并状态:未合并 1 条评论