UnityGame/Library/PackageCache/com.unity.render-pipelines.universal/Runtime/Overrides/SplitToning.cs

39 lines
1.4 KiB
C#
Raw Normal View History

2024-10-27 10:53:47 +03:00
using System;
namespace UnityEngine.Rendering.Universal
{
/// <summary>
/// A volume component that holds settings for the Split Toning effect.
/// </summary>
[Serializable, VolumeComponentMenu("Post-processing/Split Toning")]
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
[URPHelpURL("Post-Processing-Split-Toning")]
public sealed class SplitToning : VolumeComponent, IPostProcessComponent
{
/// <summary>
/// The color to use for shadows.
/// </summary>
[Tooltip("The color to use for shadows.")]
public ColorParameter shadows = new ColorParameter(Color.grey, false, false, true);
/// <summary>
/// The color to use for highlights.
/// </summary>
[Tooltip("The color to use for highlights.")]
public ColorParameter highlights = new ColorParameter(Color.grey, false, false, true);
/// <summary>
/// Balance between the colors in the highlights and shadows.
/// </summary>
[Tooltip("Balance between the colors in the highlights and shadows.")]
public ClampedFloatParameter balance = new ClampedFloatParameter(0f, -100f, 100f);
/// <inheritdoc/>
public bool IsActive() => shadows != Color.grey || highlights != Color.grey;
/// <inheritdoc/>
[Obsolete("Unused #from(2023.1)", false)]
public bool IsTileCompatible() => true;
}
}