Subsampled layout
Subsampled layout is an optimization technique that can improve Foveated rendering performance by optimizing eye texture sampling.
Prerequisites
To enable subsampled layout, your project must meet the following requirements:
- Unity 6.0 or newer.
- Use the Vulkan API. This feature isn't available on other graphics APIs. To understand how to choose your graphics API, refer to Configure graphics APIs.
Feature compatibility
- Using subsampled layout with Application SpaceWarp might introduce additional compositor GPU cost, but can still improve overall performance.
Enable Subsampled Layout
To enable subsampled layout in the Unity Editor:
- Open the OpenXR section of XR Plug-in Management (menu: Edit > Project Settings > XR Plug-in Management > OpenXR).
- Under All Features, enable Foveated Rendering.
- Use the Gear icon to open Foveated Rendering settings.
- Under Feature Settings, enable Subsampled Layout (Vulkan).
Enable the Subsampled Layout setting.
Enable at runtime
You can also enable subsampled layout at runtime through the foveated rendering feature. To enable subsampled layout at runtime, use the TrySetSubsampledLayoutEnabled API:
using UnityEngine;
using UnityEngine.XR.OpenXR.Features;
public class SubsampledLayoutEnabler : MonoBehaviour
{
void Start()
{
FoveatedRenderingFeature.TrySetSubsampledLayoutEnabled(true);
}
}