MotionBlurModel.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. namespace UnityEngine.PostProcessing
  3. {
  4. [Serializable]
  5. public class MotionBlurModel : PostProcessingModel
  6. {
  7. [Serializable]
  8. public struct Settings
  9. {
  10. [Range(0f, 360f), Tooltip("The angle of rotary shutter. Larger values give longer exposure.")]
  11. public float shutterAngle;
  12. [Range(4, 32), Tooltip("The amount of sample points, which affects quality and performances.")]
  13. public int sampleCount;
  14. [Range(0f, 1f), Tooltip("The strength of multiple frame blending. The opacity of preceding frames are determined from this coefficient and time differences.")]
  15. public float frameBlending;
  16. public static Settings defaultSettings
  17. {
  18. get
  19. {
  20. return new Settings
  21. {
  22. shutterAngle = 270f,
  23. sampleCount = 10,
  24. frameBlending = 0f
  25. };
  26. }
  27. }
  28. }
  29. [SerializeField]
  30. Settings m_Settings = Settings.defaultSettings;
  31. public Settings settings
  32. {
  33. get { return m_Settings; }
  34. set { m_Settings = value; }
  35. }
  36. public override void Reset()
  37. {
  38. m_Settings = Settings.defaultSettings;
  39. }
  40. }
  41. }