No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ChannelMixer.cs 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. /// <summary>
  5. /// A volume component that holds settings for the Channel Mixer effect.
  6. /// </summary>
  7. [Serializable, VolumeComponentMenu("Post-processing/Channel Mixer")]
  8. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
  9. [URPHelpURL("Post-Processing-Channel-Mixer")]
  10. public sealed class ChannelMixer : VolumeComponent, IPostProcessComponent
  11. {
  12. /// <summary>
  13. /// Modify influence of the red channel in the overall mix.
  14. /// </summary>
  15. [Tooltip("Modify influence of the red channel in the overall mix.")]
  16. public ClampedFloatParameter redOutRedIn = new ClampedFloatParameter(100f, -200f, 200f);
  17. /// <summary>
  18. /// Modify influence of the green channel in the overall mix.
  19. /// </summary>
  20. [Tooltip("Modify influence of the green channel in the overall mix.")]
  21. public ClampedFloatParameter redOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
  22. /// <summary>
  23. /// Modify influence of the blue channel in the overall mix.
  24. /// </summary>
  25. [Tooltip("Modify influence of the blue channel in the overall mix.")]
  26. public ClampedFloatParameter redOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
  27. /// <summary>
  28. /// Modify influence of the red channel in the overall mix.
  29. /// </summary>
  30. [Tooltip("Modify influence of the red channel in the overall mix.")]
  31. public ClampedFloatParameter greenOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
  32. /// <summary>
  33. /// Modify influence of the green channel in the overall mix.
  34. /// </summary>
  35. [Tooltip("Modify influence of the green channel in the overall mix.")]
  36. public ClampedFloatParameter greenOutGreenIn = new ClampedFloatParameter(100f, -200f, 200f);
  37. /// <summary>
  38. /// Modify influence of the blue channel in the overall mix.
  39. /// </summary>
  40. [Tooltip("Modify influence of the blue channel in the overall mix.")]
  41. public ClampedFloatParameter greenOutBlueIn = new ClampedFloatParameter(0f, -200f, 200f);
  42. /// <summary>
  43. /// Modify influence of the red channel in the overall mix.
  44. /// </summary>
  45. [Tooltip("Modify influence of the red channel in the overall mix.")]
  46. public ClampedFloatParameter blueOutRedIn = new ClampedFloatParameter(0f, -200f, 200f);
  47. /// <summary>
  48. /// Modify influence of the green channel in the overall mix.
  49. /// </summary>
  50. [Tooltip("Modify influence of the green channel in the overall mix.")]
  51. public ClampedFloatParameter blueOutGreenIn = new ClampedFloatParameter(0f, -200f, 200f);
  52. /// <summary>
  53. /// Modify influence of the blue channel in the overall mix.
  54. /// </summary>
  55. [Tooltip("Modify influence of the blue channel in the overall mix.")]
  56. public ClampedFloatParameter blueOutBlueIn = new ClampedFloatParameter(100f, -200f, 200f);
  57. /// <inheritdoc/>
  58. public bool IsActive()
  59. {
  60. return redOutRedIn.value != 100f
  61. || redOutGreenIn.value != 0f
  62. || redOutBlueIn.value != 0f
  63. || greenOutRedIn.value != 0f
  64. || greenOutGreenIn.value != 100f
  65. || greenOutBlueIn.value != 0f
  66. || blueOutRedIn.value != 0f
  67. || blueOutGreenIn.value != 0f
  68. || blueOutBlueIn.value != 100f;
  69. }
  70. /// <inheritdoc/>
  71. [Obsolete("Unused #from(2023.1)", false)]
  72. public bool IsTileCompatible() => true;
  73. }
  74. }