Bloom.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. [Serializable, VolumeComponentMenu("Post-processing/Bloom")]
  5. public sealed class Bloom : VolumeComponent, IPostProcessComponent
  6. {
  7. [Tooltip("Filters out pixels under this level of brightness. Value is in gamma-space.")]
  8. public MinFloatParameter threshold = new MinFloatParameter(0.9f, 0f);
  9. [Tooltip("Strength of the bloom filter.")]
  10. public MinFloatParameter intensity = new MinFloatParameter(0f, 0f);
  11. [Tooltip("Changes the extent of veiling effects.")]
  12. public ClampedFloatParameter scatter = new ClampedFloatParameter(0.7f, 0f, 1f);
  13. [Tooltip("Clamps pixels to control the bloom amount.")]
  14. public MinFloatParameter clamp = new MinFloatParameter(65472f, 0f);
  15. [Tooltip("Global tint of the bloom filter.")]
  16. public ColorParameter tint = new ColorParameter(Color.white, false, false, true);
  17. [Tooltip("Use bicubic sampling instead of bilinear sampling for the upsampling passes. This is slightly more expensive but helps getting smoother visuals.")]
  18. public BoolParameter highQualityFiltering = new BoolParameter(false);
  19. [Tooltip("Dirtiness texture to add smudges or dust to the bloom effect.")]
  20. public TextureParameter dirtTexture = new TextureParameter(null);
  21. [Tooltip("Amount of dirtiness.")]
  22. public MinFloatParameter dirtIntensity = new MinFloatParameter(0f, 0f);
  23. public bool IsActive() => intensity.value > 0f;
  24. public bool IsTileCompatible() => false;
  25. }
  26. }