UserLutModel.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. namespace UnityEngine.PostProcessing
  3. {
  4. [Serializable]
  5. public class UserLutModel : PostProcessingModel
  6. {
  7. [Serializable]
  8. public struct Settings
  9. {
  10. [Tooltip("Custom lookup texture (strip format, e.g. 256x16).")]
  11. public Texture2D lut;
  12. [Range(0f, 1f), Tooltip("Blending factor.")]
  13. public float contribution;
  14. public static Settings defaultSettings
  15. {
  16. get
  17. {
  18. return new Settings
  19. {
  20. lut = null,
  21. contribution = 1f
  22. };
  23. }
  24. }
  25. }
  26. [SerializeField]
  27. Settings m_Settings = Settings.defaultSettings;
  28. public Settings settings
  29. {
  30. get { return m_Settings; }
  31. set { m_Settings = value; }
  32. }
  33. public override void Reset()
  34. {
  35. m_Settings = Settings.defaultSettings;
  36. }
  37. }
  38. }