docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SuperSamplingUtility

    A utility for downscaling render textures to support super resolution anti-aliasing.

    Inheritance
    object
    SuperSamplingUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.GroundTruth.Utilities
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [MovedFrom("UnityEngine.Perception.GroundTruth")]
    public static class SuperSamplingUtility

    Methods

    Downscale(CommandBuffer, RenderTargetIdentifier, RenderTargetIdentifier, int, int, SuperSamplingFactor)

    Down samples a super resolution texture using pixel averaging where the sample kernel size is determined by the input super resolution scale factor.

    Declaration
    public static void Downscale(CommandBuffer cmd, RenderTargetIdentifier superResTexture, RenderTargetIdentifier outputTexture, int outputWidth, int outputHeight, SuperSamplingFactor scaleFactor)
    Parameters
    Type Name Description
    CommandBuffer cmd

    The command buffer to enqueue to down scaling graphics commands to.

    RenderTargetIdentifier superResTexture

    The input super resolution texture.

    RenderTargetIdentifier outputTexture

    The output downscaled texture.

    int outputWidth

    The width of the output downscaled texture.

    int outputHeight

    The height of the output downscaled texture.

    SuperSamplingFactor scaleFactor

    The scale factor between the super resolution texture and the output downscaled texture (scale factor == super res texture width / down scale texture width).

    Examples

    Downscaling a texture using a 4X scale factor would create a new downscaled texture that has dimensions one quarter of the magnitude of the input texture or 1/16th the total resolution. During the actual down sampling process, each pixel in the down scaled texture would correspond to a 4x4 block of pixels in the input super resolution texture that are averaged together into a single output pixel.

    In This Article
    Back to top
    Copyright © 2024 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)