MotionBlurModel.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. namespace UnityEngine.PostProcessing
  3. {
  4. [Serializable]
  5. public class MotionBlurModel : PostProcessingModel
  6. {
  7. public MotionBlurModel.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 = MotionBlurModel.Settings.defaultSettings;
  21. }
  22. [SerializeField]
  23. private MotionBlurModel.Settings m_Settings = MotionBlurModel.Settings.defaultSettings;
  24. [Serializable]
  25. public struct Settings
  26. {
  27. public static MotionBlurModel.Settings defaultSettings
  28. {
  29. get
  30. {
  31. return new MotionBlurModel.Settings
  32. {
  33. shutterAngle = 270f,
  34. sampleCount = 10,
  35. frameBlending = 0f
  36. };
  37. }
  38. }
  39. [Range(0f, 360f)]
  40. [Tooltip("The angle of rotary shutter. Larger values give longer exposure.")]
  41. public float shutterAngle;
  42. [Range(4f, 32f)]
  43. [Tooltip("The amount of sample points, which affects quality and performances.")]
  44. public int sampleCount;
  45. [Range(0f, 1f)]
  46. [Tooltip("The strength of multiple frame blending. The opacity of preceding frames are determined from this coefficient and time differences.")]
  47. public float frameBlending;
  48. }
  49. }
  50. }