UserLutModel.cs 880 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. namespace UnityEngine.PostProcessing
  3. {
  4. [Serializable]
  5. public class UserLutModel : PostProcessingModel
  6. {
  7. public UserLutModel.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 = UserLutModel.Settings.defaultSettings;
  21. }
  22. [SerializeField]
  23. private UserLutModel.Settings m_Settings = UserLutModel.Settings.defaultSettings;
  24. [Serializable]
  25. public struct Settings
  26. {
  27. public static UserLutModel.Settings defaultSettings
  28. {
  29. get
  30. {
  31. return new UserLutModel.Settings
  32. {
  33. lut = null,
  34. contribution = 1f
  35. };
  36. }
  37. }
  38. [Tooltip("Custom lookup texture (strip format, e.g. 256x16).")]
  39. public Texture2D lut;
  40. [Range(0f, 1f)]
  41. [Tooltip("Blending factor.")]
  42. public float contribution;
  43. }
  44. }
  45. }