How mbucchia/quad-views-foveated works
Quad Views Foveated is an implicit OpenXR API layer that adapts quad-view rendering for platforms that do not natively support Varjo quad views. The principal workflow intercepts an application’s OpenXR frame submission, uses eye-tracking input to position the focus views, and composes the views into stereo output; optional foveated rendering and sharpening are additional capabilities. The README establishes the product workflow, while sampled source confirms layer dispatch, input handling, and graphics swapchain/fence support. Some internal call wiring is omitted because the layer implementation excerpt is incomplete.
Main entry points: layer.cpp Frame interception · entry.cpp Layer entry · graphics.h Graphics abstraction · dispatch.cpp API dispatch
Components 14
OpenXR layer
- Layer entry
openxr-api-layer/framework/entry.cpp - API dispatch
openxr-api-layer/framework/dispatch.cpp - Frame interception
openxr-api-layer/layer.cpp
View and input
- Eye-tracking input
openxr-api-layer/utils/input.cpp - View geometry
openxr-api-layer/views.h
Graphics composition
- Layer composition
openxr-api-layer/utils/composition.cpp - Graphics abstraction
openxr-api-layer/utils/graphics.h - Direct3D 11
openxr-api-layer/utils/d3d11.cpp - Direct3D 12
openxr-api-layer/utils/d3d12.cpp - Projection shaders
openxr-api-layer/ProjectionPS.hlsl - CAS sharpening
openxr-api-layer/SharpeningCS.hlsl
Runtime support
- Logging
openxr-api-layer/framework/log.cpp
Other components
- OpenXR application
- OpenXR runtime
Connections 14
- OpenXR application → Layer entry: loads layer
- Layer entry → API dispatch: sets dispatch
- API dispatch → Frame interception: forwards calls
- Frame interception → OpenXR runtime: forwards OpenXR
- OpenXR application → Frame interception: submits frames
- Frame interception → Eye-tracking input: uses gaze input
- Frame interception → View geometry: computes view bounds
- Frame interception → Layer composition: composes projections
- Layer composition → Graphics abstraction: creates graphics resources
- Graphics abstraction → Direct3D 11: selects backend
- Graphics abstraction → Direct3D 12: selects backend
- Frame interception → Projection shaders: uses projection shader
- Frame interception → CAS sharpening: dispatches sharpening
- Layer entry → Logging: initializes logging