PaniniProjection.cs 615 B

123456789101112131415161718
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. [Serializable, VolumeComponentMenu("Post-processing/Panini Projection")]
  5. public sealed class PaniniProjection : VolumeComponent, IPostProcessComponent
  6. {
  7. [Tooltip("Panini projection distance.")]
  8. public ClampedFloatParameter distance = new ClampedFloatParameter(0f, 0f, 1f);
  9. [Tooltip("Panini projection crop to fit.")]
  10. public ClampedFloatParameter cropToFit = new ClampedFloatParameter(1f, 0f, 1f);
  11. public bool IsActive() => distance.value > 0f;
  12. public bool IsTileCompatible() => false;
  13. }
  14. }