docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RenderTextureReader

    RenderTextureReader reads a RenderTexture from the GPU whenever Capture is called and passes the data back through a provided callback.

    Inheritance
    object
    RenderTextureReader
    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 RenderTextureReader

    Methods

    Capture<T>(CommandBuffer, RenderTexture, Action<int, NativeArray<T>, RenderTexture>)

    Reads a RenderTexture from the GPU passes the collected data back through a provided callback.

    Declaration
    public static void Capture<T>(CommandBuffer cmd, RenderTexture sourceTex, Action<int, NativeArray<T>, RenderTexture> imageReadCallback) where T : struct
    Parameters
    Type Name Description
    CommandBuffer cmd

    The CommandBuffer to enqueue the readback operation to.

    RenderTexture sourceTex

    The RenderTexture to readback.

    Action<int, NativeArray<T>, RenderTexture> imageReadCallback

    The callback method to execute once the texture has been readback.

    Type Parameters
    Name Description
    T

    The type of the raw texture data to be provided.

    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)