docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ImageComparisonSettings

    Settings to control how image comparison is performed by ImageAssert.

    Inheritance
    object
    ImageComparisonSettings
    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
    [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
    float

    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
    float

    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
    float

    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
    float

    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
    float

    RMSEThreshold

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

    Declaration
    [Tooltip("The maximum permitted root mean squared error value across the entire image.")]
    public float RMSEThreshold
    Field Value
    Type Description
    float

    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
    int

    TargetMSAASamples

    The sample count needed for the test scene to be compared

    Declaration
    public int TargetMSAASamples
    Field Value
    Type Description
    int

    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
    int

    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
    bool

    UseHDR

    Use HDR rendering

    Declaration
    [Tooltip("If enabled, render textures will be created with DefaultHDR format.")]
    public bool UseHDR
    Field Value
    Type Description
    bool
    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)