Ingen beskrivning
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.

SplitToning.cs 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738
  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/Split Toning")]
  8. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
  9. [URPHelpURL("Post-Processing-Split-Toning")]
  10. public sealed class SplitToning : VolumeComponent, IPostProcessComponent
  11. {
  12. /// <summary>
  13. /// The color to use for shadows.
  14. /// </summary>
  15. [Tooltip("The color to use for shadows.")]
  16. public ColorParameter shadows = new ColorParameter(Color.grey, false, false, true);
  17. /// <summary>
  18. /// The color to use for highlights.
  19. /// </summary>
  20. [Tooltip("The color to use for highlights.")]
  21. public ColorParameter highlights = new ColorParameter(Color.grey, false, false, true);
  22. /// <summary>
  23. /// Balance between the colors in the highlights and shadows.
  24. /// </summary>
  25. [Tooltip("Balance between the colors in the highlights and shadows.")]
  26. public ClampedFloatParameter balance = new ClampedFloatParameter(0f, -100f, 100f);
  27. /// <inheritdoc/>
  28. public bool IsActive() => shadows != Color.grey || highlights != Color.grey;
  29. /// <inheritdoc/>
  30. [Obsolete("Unused #from(2023.1)", false)]
  31. public bool IsTileCompatible() => true;
  32. }
  33. }