暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

WhiteBalance.cs 1.3KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. /// <summary>
  5. /// A volume component that holds settings for the White Balance effect.
  6. /// </summary>
  7. [Serializable, VolumeComponentMenu("Post-processing/White Balance")]
  8. [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
  9. [URPHelpURL("Post-Processing-White-Balance")]
  10. public sealed class WhiteBalance : VolumeComponent, IPostProcessComponent
  11. {
  12. /// <summary>
  13. /// Controls the color temperature URP uses for white balancing.
  14. /// </summary>
  15. [Tooltip("Sets the white balance to a custom color temperature.")]
  16. public ClampedFloatParameter temperature = new ClampedFloatParameter(0f, -100, 100f);
  17. /// <summary>
  18. /// Controls the white balance color to compensate for a green or magenta tint.
  19. /// </summary>
  20. [Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
  21. public ClampedFloatParameter tint = new ClampedFloatParameter(0f, -100, 100f);
  22. /// <inheritdoc/>
  23. public bool IsActive() => temperature.value != 0f || tint.value != 0f;
  24. /// <inheritdoc/>
  25. [Obsolete("Unused #from(2023.1)", false)]
  26. public bool IsTileCompatible() => true;
  27. }
  28. }