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.

LiftGammaGain.cs 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. /// <summary>
  5. /// A volume component that holds settings for the Split Toning effect.
  6. /// </summary>
  7. [Serializable, VolumeComponentMenu("Post-processing/Lift, Gamma, Gain")]
  8. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
  9. [URPHelpURL("Post-Processing-Lift-Gamma-Gain")]
  10. public sealed class LiftGammaGain : VolumeComponent, IPostProcessComponent
  11. {
  12. /// <summary>
  13. /// Use this to control and apply a hue to the dark tones. This has a more exaggerated effect on shadows.
  14. /// </summary>
  15. public Vector4Parameter lift = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
  16. /// <summary>
  17. /// Use this to control and apply a hue to the mid-range tones with a power function.
  18. /// </summary>
  19. public Vector4Parameter gamma = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
  20. /// <summary>
  21. /// Use this to increase and apply a hue to the signal and make highlights brighter.
  22. /// </summary>
  23. public Vector4Parameter gain = new Vector4Parameter(new Vector4(1f, 1f, 1f, 0f));
  24. /// <inheritdoc/>
  25. public bool IsActive()
  26. {
  27. var defaultState = new Vector4(1f, 1f, 1f, 0f);
  28. return lift != defaultState
  29. || gamma != defaultState
  30. || gain != defaultState;
  31. }
  32. /// <inheritdoc/>
  33. [Obsolete("Unused #from(2023.1)", false)]
  34. public bool IsTileCompatible() => true;
  35. }
  36. }