12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using System;
-
- namespace UnityEngine.Rendering.Universal
- {
- /// <summary>
- /// A volume component that holds settings for the Channel Mixer effect.
- /// </summary>
- [Serializable, VolumeComponentMenu("Post-processing/Channel Mixer")]
- [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
- [URPHelpURL("Post-Processing-Channel-Mixer")]
- public sealed class ChannelMixer : VolumeComponent, IPostProcessComponent
- {
- /// <summary>
- /// Modify influence of the red channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the red channel in the overall mix.")]
- public ClampedFloatParameter redOutRedIn = new ClampedFloatParameter(100f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the green channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the green channel in the overall mix.")]
- public ClampedFloatParameter redOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the blue channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the blue channel in the overall mix.")]
- public ClampedFloatParameter redOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the red channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the red channel in the overall mix.")]
- public ClampedFloatParameter greenOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the green channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the green channel in the overall mix.")]
- public ClampedFloatParameter greenOutGreenIn = new ClampedFloatParameter(100f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the blue channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the blue channel in the overall mix.")]
- public ClampedFloatParameter greenOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the red channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the red channel in the overall mix.")]
- public ClampedFloatParameter blueOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the green channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the green channel in the overall mix.")]
- public ClampedFloatParameter blueOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
-
- /// <summary>
- /// Modify influence of the blue channel in the overall mix.
- /// </summary>
- [Tooltip("Modify influence of the blue channel in the overall mix.")]
- public ClampedFloatParameter blueOutBlueIn = new ClampedFloatParameter(100f, -200f, 200f);
-
- /// <inheritdoc/>
- 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;
- }
-
- /// <inheritdoc/>
- [Obsolete("Unused #from(2023.1)", false)]
- public bool IsTileCompatible() => true;
- }
- }
|