docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PeakSignalToNoiseRatioSettings

    The settings for the PSNR algorithm, including the threshold under which the Peak Signal to Noise Ratio (PSNR) is considered too low.

    Inheritance
    object
    PeakSignalToNoiseRatioSettings
    Implements
    ITextureComparisonSettings
    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 class PeakSignalToNoiseRatioSettings : ITextureComparisonSettings

    Constructors

    PeakSignalToNoiseRatioSettings(float)

    Creates a PSNR threshold and ensures Value is valid. Typical valid range is non-negative; 30 dB is a common perceptual threshold.

    Declaration
    public PeakSignalToNoiseRatioSettings(float value)
    Parameters
    Type Name Description
    float value

    PSNR threshold in dB.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when value is negative.

    Properties

    ColorSpaceHandling

    Specifies how luminance calculations should handle different color spaces.

    Declaration
    public LumaColorSpaceMode ColorSpaceHandling { get; init; }
    Property Value
    Type Description
    LumaColorSpaceMode
    Remarks

    This property controls whether linear color space images are accepted, and how color space conversions are applied during luminance computation.

    LumaCalculations

    List of Luma calculations to use when measuring PSNR. Each instance contains calculation for an actual and an expected. Provide this if you want to reuse luma calculations across different comparison algorithms (e.g. PSNR and SSIM).

    Declaration
    public List<LumaPipelineResult> LumaCalculations { get; init; }
    Property Value
    Type Description
    List<LumaPipelineResult>

    Value

    Value under which the test constraint fails. Typical values are between 20 and 40, with 30 being the human perceptible threshold.

    Declaration
    public float Value { get; init; }
    Property Value
    Type Description
    float

    Implements

    ITextureComparisonSettings
    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)