LiftGammaGain.cs 985 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. [Serializable, VolumeComponentMenu("Post-processing/Lift, Gamma, Gain")]
  5. public sealed class LiftGammaGain : VolumeComponent, IPostProcessComponent
  6. {
  7. [Tooltip("Controls the darkest portions of the render.")]
  8. public Vector4Parameter lift = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
  9. [Tooltip("Power function that controls mid-range tones.")]
  10. public Vector4Parameter gamma = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
  11. [Tooltip("Controls the lightest portions of the render.")]
  12. public Vector4Parameter gain = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
  13. public bool IsActive()
  14. {
  15. var defaultState = new Vector4(1f, 1f, 1f, 0f);
  16. return lift != defaultState
  17. || gamma != defaultState
  18. || gain != defaultState;
  19. }
  20. public bool IsTileCompatible() => true;
  21. }
  22. }