ChromaticAberrationModel.cs 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. namespace UnityEngine.PostProcessing
  3. {
  4. [Serializable]
  5. public class ChromaticAberrationModel : PostProcessingModel
  6. {
  7. public ChromaticAberrationModel.Settings settings
  8. {
  9. get
  10. {
  11. return this.m_Settings;
  12. }
  13. set
  14. {
  15. this.m_Settings = value;
  16. }
  17. }
  18. public override void Reset()
  19. {
  20. this.m_Settings = ChromaticAberrationModel.Settings.defaultSettings;
  21. }
  22. [SerializeField]
  23. private ChromaticAberrationModel.Settings m_Settings = ChromaticAberrationModel.Settings.defaultSettings;
  24. [Serializable]
  25. public struct Settings
  26. {
  27. public static ChromaticAberrationModel.Settings defaultSettings
  28. {
  29. get
  30. {
  31. return new ChromaticAberrationModel.Settings
  32. {
  33. spectralTexture = null,
  34. intensity = 0.1f
  35. };
  36. }
  37. }
  38. [Tooltip("Shift the hue of chromatic aberrations.")]
  39. public Texture2D spectralTexture;
  40. [Range(0f, 1f)]
  41. [Tooltip("Amount of tangential distortion.")]
  42. public float intensity;
  43. }
  44. }
  45. }