docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IUpscalerContext

    Represents a per-camera context for temporal upscalers. Each camera (and XR view) gets its own context to maintain separate temporal history. Spatial upscalers that don't need history can return null from CreateContext().

    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public interface IUpscalerContext

    Properties

    createdForDisplayResolution

    The display resolution this context was created for. Upscaler authors set this at creation time. The context manager reads it to detect resolution and options changes that require context recreation.

    Declaration
    Vector2Int createdForDisplayResolution { get; }
    Property Value
    Type Description
    Vector2Int

    lastUsedFrame

    The frame number when this context was last used. Set automatically by the context manager each frame to track when unused contexts should be cleaned up.

    Declaration
    int lastUsedFrame { get; set; }
    Property Value
    Type Description
    int

    Methods

    Cleanup(CommandBuffer)

    Releases native resources associated with this context. Called automatically by the context manager when the context expires, needs recreation, or the upscaling system is disposed.

    Declaration
    void Cleanup(CommandBuffer cmd)
    Parameters
    Type Name Description
    CommandBuffer cmd

    The command buffer used to record cleanup commands into. The caller executes it.

    Remarks

    A command buffer is taken rather than this being a plain managed Dispose because some upscalers own native resources that must be released on the render thread. Implementations may record a render-thread signal here instead of GPU work, and the release may complete asynchronously.

    IsValidForOptions(UpscalerOptions)

    Checks if this context is still valid for the given options. Upscaler authors implement the validation logic. The context manager calls this each frame to determine if the context needs recreation.

    Declaration
    bool IsValidForOptions(UpscalerOptions options)
    Parameters
    Type Name Description
    UpscalerOptions options

    The current upscaler options to validate against.

    Returns
    Type Description
    bool

    True if the context is still valid, false if it needs to be recreated.

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    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)