docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LumaPipeline

    Measure the luma of two Texture2D using the Job System. This is used by the PSNR and SSIM algorithms.

    Inheritance
    object
    LumaPipeline
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.TestTools.Graphics
    Assembly: UnityEngine.TestTools.Graphics.dll
    Syntax
    public static class LumaPipeline

    Methods

    Schedule(Texture2D, Texture2D, LumaColorSpaceMode, int, Allocator)

    Schedule the job to compare the luma of an actual and expected image. Assumes images are in sRGB (gamma) space.

    Declaration
    public static LumaPipelineResult Schedule(Texture2D expected, Texture2D actual, LumaColorSpaceMode lumaColorSpaceMode = LumaColorSpaceMode.RejectLinearImages, int batchSize = 1024, Allocator allocator = Allocator.TempJob)
    Parameters
    Type Name Description
    Texture2D expected

    Expected image

    Texture2D actual

    Actual image

    LumaColorSpaceMode lumaColorSpaceMode

    Preferred handling of linear space images

    int batchSize

    The number of pixels per batch

    Allocator allocator

    Allocation type for the native arrays used by the job

    Returns
    Type Description
    LumaPipelineResult

    Results of the pipeline

    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)