Class ImageComparisonSettings | Graphics Tests Framework | 7.7.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class ImageComparisonSettings

    Settings to control how image comparison is performed by ImageAssert.

    Inheritance
    Object
    ImageComparisonSettings
    Namespace: UnityEngine.TestTools.Graphics
    Syntax
    [Serializable]
    public class ImageComparisonSettings

    Fields

    ActiveImageTests

    Determines which tests are active when comparing the images.

    Declaration
    [Tooltip("Determines which tests are active when comparing the images.")]
    public ImageComparisonSettings.ImageTests ActiveImageTests
    Field Value
    Type Description
    ImageComparisonSettings.ImageTests

    ActivePixelTests

    Determines which tests are active when determining whether an individual pixel is correct or not. An incorrect pixel will increase the counter associated with the IncorrectPixelsCount image test. This is only relevant when ActiveImageTests has the IncorrectPixelsCount flag set.

    Declaration
    [Tooltip("Determines which tests affect the counter used by the IncorrectPixelsCount image test.")]
    public ImageComparisonSettings.PixelTests ActivePixelTests
    Field Value
    Type Description
    ImageComparisonSettings.PixelTests

    AverageCorrectnessThreshold

    The maximum permitted average error value across the entire image. If the average per-pixel difference across the image is above this value, the images are considered not to be equal.

    Declaration
    [Tooltip("The maximum permitted average error value across the entire image.")]
    public float AverageCorrectnessThreshold
    Field Value
    Type Description
    Single

    ImageResolution

    If using Back Buffer, reference images need to be 16:9 aspect ratio

    Declaration
    [Tooltip("If using Back Buffer, reference images need to be in one of these resolutions.")]
    public ImageComparisonSettings.Resolution ImageResolution
    Field Value
    Type Description
    ImageComparisonSettings.Resolution

    IncorrectPixelsThreshold

    The maximum ratio of pixels allowed to be incorrect across the image. A pixel is incorrect if it exceeds the specified per-pixel thresholds.

    Declaration
    [Tooltip("The maximum ratio of pixels allowed to be incorrect across the image.")]
    public float IncorrectPixelsThreshold
    Field Value
    Type Description
    Single

    PerPixelAlphaThreshold

    The permitted difference between the alpha component of individual pixels of the images.

    Declaration
    [Tooltip("The permitted difference between the alpha component of individual pixels of the images.")]
    public float PerPixelAlphaThreshold
    Field Value
    Type Description
    Single

    PerPixelCorrectnessThreshold

    The permitted perceptual difference between individual pixels of the images.

    The deltaE for each pixel of the image is compared and any differences below this threshold are ignored.

    Declaration
    [Tooltip("The permitted perceptual difference between individual pixels of the images.")]
    public float PerPixelCorrectnessThreshold
    Field Value
    Type Description
    Single

    PerPixelGammaThreshold

    The permitted difference between the RGB components (in gamma) of individual pixels of the images.

    Declaration
    [Tooltip("The permitted difference between the RGB components (in gamma) of individual pixels of the images.")]
    public float PerPixelGammaThreshold
    Field Value
    Type Description
    Single

    TargetHeight

    The height to use for the rendered image. If a reference image already exists for this test and has a different size the test will fail.

    Declaration
    [Tooltip("The height to use for the rendered image.")]
    public int TargetHeight
    Field Value
    Type Description
    Int32

    TargetWidth

    The width to use for the rendered image. If a reference image already exists for this test and has a different size the test will fail.

    Declaration
    [Tooltip("The width to use for the rendered image.")]
    public int TargetWidth
    Field Value
    Type Description
    Int32

    UseBackBuffer

    Use back buffer capture

    Declaration
    [Tooltip("If enabled, tests will use the back buffer, as opposed to a render texture.")]
    public bool UseBackBuffer
    Field Value
    Type Description
    Boolean

    UseHDR

    Use HDR rendering

    Declaration
    [Tooltip("If enabled, render textures will be created with DefaultHDR format.")]
    public bool UseHDR
    Field Value
    Type Description
    Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023