No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PaniniProjection.cs 1.3KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. /// <summary>
  5. /// A volume component that holds settings for the Panini Projection effect.
  6. /// </summary>
  7. [Serializable, VolumeComponentMenu("Post-processing/Panini Projection")]
  8. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
  9. [URPHelpURL("Post-Processing-Panini-Projection")]
  10. public sealed class PaniniProjection : VolumeComponent, IPostProcessComponent
  11. {
  12. /// <summary>
  13. /// Controls the panini projection distance. This controls the strength of the distorion.
  14. /// </summary>
  15. [Tooltip("Panini projection distance.")]
  16. public ClampedFloatParameter distance = new ClampedFloatParameter(0f, 0f, 1f);
  17. /// <summary>
  18. /// Controls how much cropping HDRP applies to the screen with the panini projection effect. A value of 1 crops the distortion to the edge of the screen.
  19. /// </summary>
  20. [Tooltip("Panini projection crop to fit.")]
  21. public ClampedFloatParameter cropToFit = new ClampedFloatParameter(1f, 0f, 1f);
  22. /// <inheritdoc/>
  23. public bool IsActive() => distance.value > 0f;
  24. /// <inheritdoc/>
  25. [Obsolete("Unused #from(2023.1)", false)]
  26. public bool IsTileCompatible() => false;
  27. }
  28. }