using System; using UnityEngine.Serialization; using UnityEngine.Rendering; namespace UnityEngine.Rendering { /// /// A that holds a value. /// [Serializable] public sealed class APVLeakReductionModeParameter : VolumeParameter { /// /// Creates a new instance. /// /// The initial value to store in the parameter. /// The initial override state for the parameter. public APVLeakReductionModeParameter(APVLeakReductionMode value, bool overrideState = false) : base(value, overrideState) { } } /// /// A volume component that holds settings for the Adaptive Probe Volumes System per-camera options. /// [Serializable, VolumeComponentMenu("Lighting/Adaptive Probe Volumes Options"), SupportedOnRenderPipeline] public sealed class ProbeVolumesOptions : VolumeComponent { ProbeVolumesOptions() { displayName = "Adaptive Probe Volumes Options"; } /// /// The overridden normal bias to be applied to the world position when sampling the Adaptive Probe Volumes data structure. Unit is meters. /// [Tooltip("The overridden normal bias to be applied to the world position when sampling the Adaptive Probe Volumes data structure. Unit is meters.")] public ClampedFloatParameter normalBias = new ClampedFloatParameter(0.05f, 0.0f, 2.0f); /// /// A bias alongside the view vector to be applied to the world position when sampling the Adaptive Probe Volumes data structure. Unit is meters. /// [Tooltip("A bias alongside the view vector to be applied to the world position when sampling the Adaptive Probe Volumes data structure. Unit is meters.")] public ClampedFloatParameter viewBias = new ClampedFloatParameter(0.1f, 0.0f, 2.0f); /// /// Whether to scale the bias for Adaptive Probe Volumes by the minimum distance between probes. /// [Tooltip("Whether to scale the bias for Adaptive Probe Volumes by the minimum distance between probes.")] public BoolParameter scaleBiasWithMinProbeDistance = new BoolParameter(false); /// /// Noise to be applied to the sampling position. It can hide seams issues between subdivision levels, but introduces noise. /// [Tooltip("Noise to be applied to the sampling position. It can hide seams issues between subdivision levels, but introduces noise.")] public ClampedFloatParameter samplingNoise = new ClampedFloatParameter(0.1f, 0.0f, 1.0f); /// /// Whether to animate the noise when TAA is enabled, smoothing potentially out the noise pattern introduced. /// [Tooltip("Whether to animate the noise when TAA is enabled. It can potentially remove the visible noise patterns.")] public BoolParameter animateSamplingNoise = new BoolParameter(true); /// /// Method used to reduce leaks. /// [Tooltip("Method used to reduce leaks. Currently available modes are crude, but cheap methods.")] public APVLeakReductionModeParameter leakReductionMode = new APVLeakReductionModeParameter(APVLeakReductionMode.Quality); /// /// This parameter isn't used anymore. /// [Obsolete("This parameter isn't used anymore.")] public ClampedFloatParameter minValidDotProductValue = new ClampedFloatParameter(0.1f, -1.0f, 0.33f); /// /// When enabled, reflection probe normalization can only decrease the reflections intensity. /// [Tooltip("When enabled, reflection probe normalization can only decrease the reflection intensity.")] public BoolParameter occlusionOnlyReflectionNormalization = new BoolParameter(true); /// /// Global probe volumes weight. Allows for fading out probe volumes influence falling back to ambient probe. /// [AdditionalProperty, Tooltip("Global probe volumes weight. Allows for fading out probe volumes influence falling back to ambient probe.")] public ClampedFloatParameter intensityMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 1.0f); /// /// Multiplier applied on the sky lighting when using sky occlusion. /// [AdditionalProperty, Tooltip("Multiplier applied on the sky lighting when using sky occlusion.")] public ClampedFloatParameter skyOcclusionIntensityMultiplier = new ClampedFloatParameter(1.0f, 0.0f, 5.0f); /// /// Offset applied at runtime to probe positions in world space. /// [AdditionalProperty, Tooltip("Offset applied at runtime to probe positions in world space.\nThis is not considered while baking.")] public Vector3Parameter worldOffset = new Vector3Parameter(Vector3.zero); } }