Composition Layer Filtering
To improve the image quality of composition layers, enable composition layer filtering. Layer filtering methods support supersampling tuned to the Quest display-optics system.
Enabling supersampling (left) reduces flicker for high contrast edges (right) for layers that are undersampled by the compositor to match the display resolution.
Sharpening improves clarity of high contrast edges and can counteract blur when upsampling to meet display resolution.
By enabling auto filtering, the layer is rendered at peak visual quality while preventing adverse artifacts, like screen tears. In this mode, the runtime automatically applies the chosen supersampling and sharpening filters only when beneficial. Examples include:
- A sharpening filter is applied to mitigate layer blur.
- A supersampling filter is applied to mitigate flicker.
If the layer does not require any filtering then opting into auto filtering will result in no operation with no performace overhead.
Auto filtering accounts for dynamic and complex interaction with the layers, like layer resizing and player movement in 3D space. Additionally, it considers the following parameters before filtering the layers:
- Rendered pixels per degree of the layer.
- Hardware pixels per degree of the display.
- GPU utilization.
- Layer visibility.
The XR_FB_composition_layer_settings
OpenXR extension provides settings to enable composition layer supersampling and sharpening. The XrCompositionLayerSettingsFB
struct contains additional XrCompositionLayerSettingsFlagsFB
flags that control the layer filtering features. There are currently four bits available that enable two forms of supersampling and sharpening.
XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SUPER_SAMPLING_BIT_FB
- This bit enables an efficient two-tap filter which alters the sampling pattern every other frame to approximate a more computationally expensive four-tap filter. For most use cases, the quality is indistinguishable from the four-tap filter with reduced computation costs.XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SUPER_SAMPLING_BIT_FB
- This bit enables a more expensive four-tap filter which performs conventional supersampling with no temporal component.
If both bits are set, the compositor defaults to the normal supersampling method.
XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SHARPENING_BIT_FB
- This bit utilizes an efficient three-tap sharpening algorithm, which alters the sampling pattern every other frame to approximate a more computationally expensive five-tap filter..XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SHARPENING_BIT_FB
- This bit utilizes Meta Quest Super Resolution (MQSR) which is a single-pass spatial upscaling and sharpening technique optimized to run on Meta Quest devices.
If both bits are set, the compositor defaults to the normal sharpening method.
Note: In OpenXR, all these settings are suggestions and the compositor may enable or disable them, as it sees fit.
Important: Composition layer filtering requires more GPU resources. This is especially true for the sharpening and supersampling algorithms as these utilize larger kernel footprints. If used directly for composition layers, using these algorithms increases the GPU resources that are essential affecting composition timing. This may lead to frame drops and negatively impact the VR experience. The bottom line is that when applying composition layer filtering, you should weigh the increased visual fidelity against the additional GPU resources required to offer the best VR user experience.
Alternatively, you can use auto filtering mode to mitigate the risk of unnecessary filtering. Auto filtering will gracefully degrade the panel quality during instances of constrained GPU resources.