Tonemapping.cs 928 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. public enum TonemappingMode
  5. {
  6. None,
  7. Neutral, // Neutral tonemapper
  8. ACES, // ACES Filmic reference tonemapper (custom approximation)
  9. }
  10. [Serializable, VolumeComponentMenu("Post-processing/Tonemapping")]
  11. public sealed class Tonemapping : VolumeComponent, IPostProcessComponent
  12. {
  13. [Tooltip("Select a tonemapping algorithm to use for the color grading process.")]
  14. public TonemappingModeParameter mode = new TonemappingModeParameter(TonemappingMode.None);
  15. public bool IsActive() => mode.value != TonemappingMode.None;
  16. public bool IsTileCompatible() => true;
  17. }
  18. [Serializable]
  19. public sealed class TonemappingModeParameter : VolumeParameter<TonemappingMode> { public TonemappingModeParameter(TonemappingMode value, bool overrideState = false) : base(value, overrideState) { } }
  20. }