Firstborn/Library/PackageCache/com.unity.render-pipelines..../Runtime/Overrides/ChannelMixer.cs

51 lines
2.3 KiB
C#
Raw Normal View History

2023-03-28 13:24:16 -04:00
using System;
namespace UnityEngine.Rendering.Universal
{
[Serializable, VolumeComponentMenuForRenderPipeline("Post-processing/Channel Mixer", typeof(UniversalRenderPipeline))]
public sealed class ChannelMixer : VolumeComponent, IPostProcessComponent
{
[Tooltip("Modify influence of the red channel in the overall mix.")]
public ClampedFloatParameter redOutRedIn = new ClampedFloatParameter(100f, -200f, 200f);
[Tooltip("Modify influence of the green channel in the overall mix.")]
public ClampedFloatParameter redOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
[Tooltip("Modify influence of the blue channel in the overall mix.")]
public ClampedFloatParameter redOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
[Tooltip("Modify influence of the red channel in the overall mix.")]
public ClampedFloatParameter greenOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
[Tooltip("Modify influence of the green channel in the overall mix.")]
public ClampedFloatParameter greenOutGreenIn = new ClampedFloatParameter(100f, -200f, 200f);
[Tooltip("Modify influence of the blue channel in the overall mix.")]
public ClampedFloatParameter greenOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
[Tooltip("Modify influence of the red channel in the overall mix.")]
public ClampedFloatParameter blueOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
[Tooltip("Modify influence of the green channel in the overall mix.")]
public ClampedFloatParameter blueOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
[Tooltip("Modify influence of the blue channel in the overall mix.")]
public ClampedFloatParameter blueOutBlueIn = new ClampedFloatParameter(100f, -200f, 200f);
public bool IsActive()
{
return redOutRedIn.value != 100f
|| redOutGreenIn.value != 0f
|| redOutBlueIn.value != 0f
|| greenOutRedIn.value != 0f
|| greenOutGreenIn.value != 100f
|| greenOutBlueIn.value != 0f
|| blueOutRedIn.value != 0f
|| blueOutGreenIn.value != 0f
|| blueOutBlueIn.value != 100f;
}
public bool IsTileCompatible() => true;
}
}