How kanaicasual/vr-gaze-mirror works
VR Gaze Mirror produces a cropped, stabilized headset-eye image, optionally with a gaze indicator, for OBS or a capturable mirror window. OpenXR and SteamVR have separate capture producers that feed a shared frame pipeline and publication protocol; readers consume the finished image. The settings app configures live behavior and provides capture-based crop, edge-finding, profiles, status, and ring-preview tools. Edges reflect the excerpted source and README; some settings-app and runtime internals are unsampled, so documented capabilities are represented without asserting their internal call paths.
Main entry points: pipeline.cpp Frame pipeline · MainWindow.xaml.cs Settings app · main.cpp SteamVR helper · gaze_mirror_protocol.h Shared frame protocol
Components 28
Game producers
- OpenXR layer
v2/layer/layer.cpp - SteamVR helper
v2/openvr-helper/main.cpp
Image pipeline
- Frame pipeline
v2/core/pipeline.cpp - Crop and render
v2/core/renderer.cpp - Crop framing
v2/core/framing.cpp - Gaze ring
v2/core/ring.cpp - Runtime settings
v2/core/settings.cpp - Frame publisher
v2/core/publisher.cpp - Shared frame protocol
v2/protocol/gaze_mirror_protocol.h
Picture readers
- OBS source
v2/obs-plugin/gaze-mirror-capture.cpp - Mirror window
v2/mirror-window/main.cpp - Developer viewer
v2/viewer/main.cpp
Settings and framing
- Settings app
GazeOverlayApp/MainWindow.xaml.cs - Settings storage
GazeOverlayApp/ConfigFile.cs - Capture and edge tools
GazeOverlayApp/MainWindow.Capture.cs - Crop controls
GazeOverlayApp/MainWindow.Crop.cs - Game crop profiles
GazeOverlayApp/MainWindow.Profiles.cs - Mirror controls
GazeOverlayApp/MirrorWindowControl.cs - Layer status
GazeOverlayApp/LayerStatus.cs
Gaze sources
- OpenXR gaze input
v2/layer/gaze_input.cpp - SteamVR gaze
v2/openvr-helper/runtime_gaze.cpp - Raw gaze feed
v2/openvr-helper/raw_gaze.cpp - VRChat eye fallback
v2/openvr-helper/vrchat_osc.cpp - Gaze calibration
v2/openvr-helper/calibration.cpp
Other components
- Streamer
- VR game
- OBS
- Window capture app
Connections 31
- VR game → OpenXR layer: loads layer
- OpenXR layer → Frame pipeline: submits frames
v2/layer/layer.cpp - VR game → SteamVR helper: SteamVR session
- SteamVR helper → Frame pipeline: submits frames
v2/openvr-helper/main.cpp - Frame pipeline → Crop and render: renders image
- Frame pipeline → Crop framing: applies framing
- Frame pipeline → Gaze ring: draws gaze ring
- Frame pipeline → Runtime settings: reads settings
v2/core/pipeline.cpp - Frame pipeline → Frame publisher: publishes frame
v2/core/pipeline.cpp - Frame publisher → Shared frame protocol: writes shared frames
v2/protocol/gaze_mirror_protocol.h - OBS source → Shared frame protocol: reads shared frames
v2/protocol/gaze_mirror_protocol.h - Mirror window → Shared frame protocol: reads shared frames
v2/mirror-window/main.cpp - Developer viewer → Shared frame protocol: reads shared frames
v2/viewer/main.cpp - OBS → OBS source: captures source
- Window capture app → Mirror window: captures window
- Streamer → Settings app: configures mirror
- Settings app → Settings storage: loads and saves
GazeOverlayApp/ConfigFile.cs - Settings app → Capture and edge tools: offers capture tools
- Settings app → Crop controls: offers crop controls
GazeOverlayApp/MainWindow.xaml.cs - Settings app → Game crop profiles: offers profiles
- Settings app → Mirror controls: controls window
GazeOverlayApp/MainWindow.xaml.cs - Settings app → Layer status: checks layer status
GazeOverlayApp/MainWindow.xaml.cs - Settings app → Gaze ring: previews ring
- OpenXR layer → OpenXR gaze input: gets eye gaze
v2/layer/layer.cpp - SteamVR helper → SteamVR gaze: starts gaze source
v2/openvr-helper/main.cpp - SteamVR helper → Raw gaze feed: starts gaze feed
v2/openvr-helper/main.cpp - SteamVR helper → VRChat eye fallback: starts OSC fallback
v2/openvr-helper/main.cpp - SteamVR helper → Gaze calibration: uses calibration
v2/openvr-helper/main.cpp - SteamVR gaze → Frame pipeline: supplies gaze
- Raw gaze feed → Frame pipeline: supplies gaze
- VRChat eye fallback → Frame pipeline: supplies gaze