This sample demonstrates how to expose Meta Quest performance settings through an in-VR UI, allowing developers to test and tune render quality, frame rate, CPU/GPU performance levels, and advanced features like Application SpaceWarp and Fixed Foveated Rendering. The sample provides a working implementation of performance controls using the OculusXR plugin for Unreal Engine, with reusable Blueprint widgets and a C++ API layer for runtime adjustments.
configure and toggle dynamic resolution, render scale, and pixel density at runtime
set CPU and GPU performance levels, target frame rates, and MSAA quality
enable and control Fixed Foveated Rendering and Application SpaceWarp
implement CPU and GPU stress testers for performance profiling
build an in-VR UI using Blueprint widgets that interact with OculusXR APIs
Requirements
Meta Quest 2, Quest 3, or Quest 3S device
Unreal Engine 5.4 or later with OculusXR plugin enabled
For detailed build prerequisites and platform setup, see the sample README.
Get started
Clone the repository from GitHub. Open the .uproject file in Unreal Engine 5.4 or later. The project is preconfigured to start in VR with the StartingLevel map. Build for Android and deploy to your Quest device.
Explore the sample
Component
Purpose
BP_PerfRenderScaleActor
Exposes render scale and dynamic resolution controls with min/max pixel density sliders
BP_PerfSettingsActor
Provides dropdowns and toggles for frame rate, FFR, MSAA, CPU/GPU levels, ASW, and passthrough
BPPerfMenuActor
Displays real-time performance metrics in a status panel
BP_PerfStressTestActor
Implements CPU and GPU stress testers with slider controls for load adjustment
UOUIBlueprintFunctionLibrary
C++ function library exposing 10 BlueprintCallable methods for OculusXR API access
FCPUStressTestWorker
Runnable thread class that simulates CPU load based on target utilization percentage
Runtime behavior
When you run the sample, you see four vertical panels arranged in VR space. The left panel controls render scale and dynamic resolution with interactive sliders. The center-left panel provides performance setting toggles, frame rate selection, and quality presets. The center-right panel shows live performance metrics. The right panel contains stress testing sliders that spawn CPU worker threads or GPU actor meshes on demand. All controls respond immediately.
Key concepts
Dynamic resolution with project settings validation
The sample checks whether dynamic resolution is enabled at the project level before exposing runtime controls. UOUIBlueprintFunctionLibrary::IsDynamicResolutionEnabled() reads from the OculusXR settings object, confirming that the feature requires project-level configuration in DefaultEngine.ini with bDynamicResolution=True.
CPU stress testing with frame-aware work distribution
The CPU stress tester uses a runnable thread that calculates work duration based on the current display refresh rate. FCPUStressTestWorker::Run() queries the headset refresh rate via UOculusXRFunctionLibrary::GetCurrentDisplayFrequency(), then computes work time per frame as (MsPerFrame * TargetUtilPercent) / 100.0. This ensures stress load scales correctly across 72 Hz, 90 Hz, and 120 Hz modes.
Fixed Foveated Rendering configuration
The sample sets FFR method and level through DefaultEngine.ini:
The performance settings panel includes a widget for adjusting FFR levels (Off, Low, Medium, High, HighTop) at runtime.
GPU stress testing with tagged actor spawning
The GPU stress tester spawns actors tagged with “StressTest” to enable batch destruction. CreateGPUStressTestObjects() spawns actor instances from a Blueprint class reference and applies the tag. The cleanup method uses UGameplayStatics::GetAllActorsWithTag() to find and destroy all stress test actors in a single call.
Performance level management
The sample configures suggested CPU and GPU performance levels in DefaultEngine.ini: