Class ImageComparisonSettings
Settings to control how image comparison is performed by ImageAssert.
Namespace: UnityEngine.TestTools.Graphics
Syntax
[Serializable]
public class ImageComparisonSettings
Fields
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 |
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 |
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 |