using System;
namespace UnityEngine.Rendering.HighDefinition
{
///
/// A volume component that holds settings for the White Balance effect.
///
[Serializable, VolumeComponentMenu("Post-processing/White Balance")]
[SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))]
[HDRPHelpURL("Post-Processing-White-Balance")]
public sealed class WhiteBalance : VolumeComponent, IPostProcessComponent
{
///
/// Controls the color temperature HDRP uses for white balancing.
///
[Tooltip("Controls the color temperature HDRP uses for white balancing.")]
public ClampedFloatParameter temperature = new ClampedFloatParameter(0f, -100, 100f);
///
/// Controls the white balance color to compensate for a green or magenta tint.
///
[Tooltip("Controls the white balance color to compensate for a green or magenta tint.")]
public ClampedFloatParameter tint = new ClampedFloatParameter(0f, -100, 100f);
///
/// Tells if the effect needs to be rendered or not.
///
/// true if the effect should be rendered, false otherwise.
public bool IsActive()
{
return !Mathf.Approximately(temperature.value, 0f)
|| !Mathf.Approximately(tint.value, 0f);
}
}
}