33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
|
using System;
|
||
|
|
||
|
namespace UnityEngine.Rendering.Universal
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// A volume component that holds settings for the White Balance effect.
|
||
|
/// </summary>
|
||
|
[Serializable, VolumeComponentMenu("Post-processing/White Balance")]
|
||
|
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
|
||
|
[URPHelpURL("Post-Processing-White-Balance")]
|
||
|
public sealed class WhiteBalance : VolumeComponent, IPostProcessComponent
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Controls the color temperature URP uses for white balancing.
|
||
|
/// </summary>
|
||
|
[Tooltip("Sets the white balance to a custom color temperature.")]
|
||
|
public ClampedFloatParameter temperature = new ClampedFloatParameter(0f, -100, 100f);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Controls the white balance color to compensate for a green or magenta tint.
|
||
|
/// </summary>
|
||
|
[Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
|
||
|
public ClampedFloatParameter tint = new ClampedFloatParameter(0f, -100, 100f);
|
||
|
|
||
|
/// <inheritdoc/>
|
||
|
public bool IsActive() => temperature.value != 0f || tint.value != 0f;
|
||
|
|
||
|
/// <inheritdoc/>
|
||
|
[Obsolete("Unused #from(2023.1)", false)]
|
||
|
public bool IsTileCompatible() => true;
|
||
|
}
|
||
|
}
|