docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FoveatedRenderingFeature

    This OpenXRFeature enables the use of foveated rendering in OpenXR.

    Inheritance
    object
    Object
    ScriptableObject
    OpenXRFeature
    FoveatedRenderingFeature
    Inherited Members
    OpenXRFeature.enabled
    OpenXRFeature.GetExtensions()
    OpenXRFeature.xrGetInstanceProcAddr
    OpenXRFeature.OnSubsystemStart()
    OpenXRFeature.OnSubsystemStop()
    OpenXRFeature.OnSubsystemDestroy()
    OpenXRFeature.OnExtensionsReady(ulong)
    OpenXRFeature.OnSystemChange(ulong)
    OpenXRFeature.OnAppSpaceChange(ulong)
    OpenXRFeature.OnSessionStateChange(int, int)
    OpenXRFeature.OnSessionBegin(ulong)
    OpenXRFeature.OnSessionEnd(ulong)
    OpenXRFeature.OnSessionExiting(ulong)
    OpenXRFeature.OnInstanceDestroy(ulong)
    OpenXRFeature.OnSessionLossPending(ulong)
    OpenXRFeature.OnInstanceLossPending(ulong)
    OpenXRFeature.OnFormFactorChange(int)
    OpenXRFeature.OnViewConfigurationTypeChange(int)
    OpenXRFeature.OnEnvironmentBlendModeChange(XrEnvironmentBlendMode)
    OpenXRFeature.OnEnabledChange()
    OpenXRFeature.PathToString(ulong)
    OpenXRFeature.StringToPath(string)
    OpenXRFeature.GetCurrentInteractionProfile(ulong)
    OpenXRFeature.GetCurrentInteractionProfile(string)
    OpenXRFeature.GetCurrentAppSpace()
    OpenXRFeature.GetViewConfigurationTypeForRenderPass(int)
    OpenXRFeature.SetEnvironmentBlendMode(XrEnvironmentBlendMode)
    OpenXRFeature.GetEnvironmentBlendMode()
    OpenXRFeature.CreateSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string)
    OpenXRFeature.StartSubsystem<T>()
    OpenXRFeature.StopSubsystem<T>()
    OpenXRFeature.DestroySubsystem<T>()
    OpenXRFeature.OnEnable()
    OpenXRFeature.OnDisable()
    OpenXRFeature.Awake()
    OpenXRFeature.GetAction(InputAction)
    OpenXRFeature.GetAction(InputDevice, InputFeatureUsage)
    OpenXRFeature.GetAction(InputDevice, string)
    OpenXRFeature.RegisterStatsDescriptor(string, OpenXRFeature.StatFlags)
    OpenXRFeature.SetStatAsFloat(ulong, float)
    OpenXRFeature.SetStatAsUInt(ulong, uint)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.Features
    Assembly: Unity.XR.OpenXR.dll
    Syntax
    public class FoveatedRenderingFeature : OpenXRFeature

    Fields

    featureId

    The feature id string. This is used to give the feature a well known id for reference.

    Declaration
    public const string featureId = "com.unity.openxr.feature.foveatedrendering"
    Field Value
    Type Description
    string

    Properties

    DynamicFoveationEnabled

    Gets or sets whether the OpenXR runtime is allowed to vary the amount of foveation it applies, up to the foveation level your application sets.

    Declaration
    public bool DynamicFoveationEnabled { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    The foveation level itself is not controlled by this property. Set it with foveatedRenderingLevel. When dynamic foveation is disabled, the runtime applies that level constantly. When it is enabled, the level becomes a maximum and the runtime applies less foveation when there is GPU headroom to spare.

    Because the level acts as a maximum, dynamic foveation has no effect while the foveation level is 0, which is the default.

    Dynamic foveation requires the Vulkan graphics API, an OpenXR runtime that supports it, and the Foveated Rendering Method set to Foveated rendering (SRP API). It has no effect with the Legacy API or Quad Views.

    UseEyeTracking

    Gets or sets whether eye tracking is used for foveated rendering. When false, the eye tracking extension is not requested and eye tracking android permissions are not added to the manifest.

    Declaration
    public bool UseEyeTracking { get; }
    Property Value
    Type Description
    bool

    isSubsampledLayoutEnabled

    Get whether Vulkan subsampled layout is currently enabled.

    Declaration
    public static bool isSubsampledLayoutEnabled { get; }
    Property Value
    Type Description
    bool

    skipFDMForFinalPassesSRP

    Controls whether a Fragment Density Map (FDM) is attached to final render passes such as URP's FinalBlit and UberPost, when using the SRP Foveation API. This has no effect on the Legacy foveated rendering API or on Quad Views.

    Declaration
    public bool skipFDMForFinalPassesSRP { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    On Meta Quest, attaching an FDM to a render pass forces the driver into binning mode, which has a lot of setup overhead regardless of how complex the pass actually is. Skipping it lets the driver use direct rendering mode for those passes instead. AndroidXR has its own approach to foveating the UberPost pass and wants FDM kept attached there, so unless explicitly set via script, this defaults to true only when the Meta Quest build profile is the confirmed active build profile, and false otherwise - including for AndroidXR, Standalone, and the generic Android build profile, since there is no reliable way to confirm a Meta device is in use in that last case. Set this via script if you need to override the default. Setting this immediately forwards the value to the XR Display Subsystem if it has already been created; if it has not (for example, if this is set before the OpenXR loader has started), the native call safely no-ops and the value is (re)applied once the subsystem is created, so it still takes effect for that run. Note that Meta Quest's driver may still use binning mode for these passes regardless of this setting if MSAA is enabled.

    Methods

    GetValidationChecks(List<ValidationRule>, BuildTargetGroup)

    Allows a feature to add to a list of validation rules which your feature will evaluate at build time. Details of the validation results can be found in OpenXRProjectValidation.

    Declaration
    protected override void GetValidationChecks(List<OpenXRFeature.ValidationRule> rules, BuildTargetGroup targetGroup)
    Parameters
    Type Name Description
    List<OpenXRFeature.ValidationRule> rules

    Your feature will check the rules in this list at build time. Add rules that you want your feature to check, and remove rules that you want your feature to ignore.

    BuildTargetGroup targetGroup

    Build target group these validation rules will be evaluated for.

    Overrides
    OpenXRFeature.GetValidationChecks(List<OpenXRFeature.ValidationRule>, BuildTargetGroup)

    HookGetInstanceProcAddr(IntPtr)

    Called to hook xrGetInstanceProcAddr. Returning a different function pointer allows intercepting any OpenXR method.

    Declaration
    protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
    Parameters
    Type Name Description
    IntPtr func

    xrGetInstanceProcAddr native function pointer

    Returns
    Type Description
    IntPtr

    Function pointer that Unity will use to look up OpenXR native functions.

    Overrides
    OpenXRFeature.HookGetInstanceProcAddr(IntPtr)

    OnInstanceCreate(ulong)

    Called after xrCreateInstance. Override this method to validate that any necessary OpenXR extensions were successfully enabled (OpenXRRuntime.IsExtensionEnabled) and that any required system properties are supported. If this method returns false, the feature's enabled property is set to false.

    Declaration
    protected override bool OnInstanceCreate(ulong instance)
    Parameters
    Type Name Description
    ulong instance
    Returns
    Type Description
    bool

    true if this feature successfully initialized. Otherwise, false.

    Overrides
    OpenXRFeature.OnInstanceCreate(ulong)
    Remarks

    If this feature is a required feature of an enabled feature set, returning false here causes the OpenXRLoader to fail, and XR Plug-in Management will fall back to another loader if enabled.

    See Also
    Enabling OpenXR spec extension strings

    OnSessionCreate(ulong)

    Called after xrCreateSession.

    Declaration
    protected override void OnSessionCreate(ulong xrSession)
    Parameters
    Type Name Description
    ulong xrSession

    Handle of the xrSession

    Overrides
    OpenXRFeature.OnSessionCreate(ulong)

    OnSessionDestroy(ulong)

    Called before xrDestroySession.

    Declaration
    protected override void OnSessionDestroy(ulong xrSession)
    Parameters
    Type Name Description
    ulong xrSession

    Handle of the xrSession

    Overrides
    OpenXRFeature.OnSessionDestroy(ulong)

    OnSubsystemCreate()

    Called after the OpenXR Loader is initialized and has created its subsystems.

    Declaration
    protected override void OnSubsystemCreate()
    Overrides
    OpenXRFeature.OnSubsystemCreate()

    ShouldUseExtension(string)

    Returns whether the given OpenXR extension string should be requested at runtime. Called once per extension declared in OpenXRFeatureAttributeOpenxrExtensionStrings. Override to conditionally suppress individual extensions.

    Declaration
    protected override bool ShouldUseExtension(string ext)
    Parameters
    Type Name Description
    string ext

    The extension name string to evaluate.

    Returns
    Type Description
    bool

    true to request the extension; false to skip it.

    Overrides
    OpenXRFeature.ShouldUseExtension(string)

    TrySetSubsampledLayoutEnabled(bool)

    Attempts to set whether subsampled layout is enabled.

    Declaration
    public static bool TrySetSubsampledLayoutEnabled(bool enableSubsampling)
    Parameters
    Type Name Description
    bool enableSubsampling

    Indicates whether to enable subsampling.

    Returns
    Type Description
    bool

    Returns true if subsampling state was updated and returns false otherwise.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)