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
public float AverageCorrectnessThreshold
Field Value
| Type | Description |
|---|---|
| Single |
ImageResolution
If using Back Buffer, reference images need to be 16:9 aspect ratio
Declaration
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
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
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
public int TargetWidth
Field Value
| Type | Description |
|---|---|
| Int32 |
UseBackBuffer
Use back buffer capture
Declaration
public bool UseBackBuffer
Field Value
| Type | Description |
|---|---|
| Boolean |
UseHDR
Use HDR rendering
Declaration
public bool UseHDR
Field Value
| Type | Description |
|---|---|
| Boolean |