using System;
namespace UnityEngine.Rendering.HighDefinition
{
///
/// Recursive Rendering Volume Component.
/// This component setups recursive rendering.
///
[Serializable, VolumeComponentMenu("Ray Tracing/Recursive Rendering")]
[SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))]
[HDRPHelpURL("Ray-Tracing-Recursive-Rendering")]
public sealed class RecursiveRendering : VolumeComponent
{
///
/// Enables recursive rendering.
///
[Tooltip("Enable. Enables recursive rendering.")]
public BoolParameter enable = new BoolParameter(false, BoolParameter.DisplayType.EnumPopup);
///
/// Layer mask used to include the objects for recursive rendering.
///
[Tooltip("Layer Mask. Layer mask used to include the objects for recursive rendering.")]
public LayerMaskParameter layerMask = new LayerMaskParameter(-1);
///
/// Defines the maximal recursion for rays.
///
[Tooltip("Max Depth. Defines the maximal recursion for rays.")]
public ClampedIntParameter maxDepth = new ClampedIntParameter(4, 1, 10);
///
/// This defines the maximal travel distance of rays in meters.
///
public MinFloatParameter rayLength = new MinFloatParameter(10.0f, 0.0f);
///
/// Minmal smoothness for reflection rays. If the surface has a smoothness value below this threshold, a reflection ray will not be case and it will fallback on other techniques.
///
[Tooltip("Minmal Smoothness for Reflection. If the surface has a smoothness value below this threshold, a reflection ray will not be case and it will fallback on other techniques.")]
public ClampedFloatParameter minSmoothness = new ClampedFloatParameter(0.5f, 0.0f, 1.0f);
///
/// Controls which sources are used to fallback on when the traced ray misses.
///
[AdditionalProperty]
[Tooltip("Controls which sources are used to fallback on when the traced ray misses.")]
public RayTracingFallbackHierachyParameter rayMiss = new RayTracingFallbackHierachyParameter(RayTracingFallbackHierachy.ReflectionProbesAndSky);
///
/// Controls the fallback hierarchy for lighting the last bounce.
///
[AdditionalProperty]
[Tooltip("Controls the fallback hierarchy for lighting the last bounce.")]
public RayTracingFallbackHierachyParameter lastBounce = new RayTracingFallbackHierachyParameter(RayTracingFallbackHierachy.ReflectionProbesAndSky);
///
/// Controls the dimmer applied to the ambient and legacy light probes.
///
[Tooltip("Controls the dimmer applied to the ambient and legacy light probes.")]
[AdditionalProperty]
public ClampedFloatParameter ambientProbeDimmer = new ClampedFloatParameter(1.0f, 0.0f, 1.0f);
///
/// Default constructor for the recursive rendering volume component.
///
public RecursiveRendering()
{
displayName = "Recursive Rendering";
}
}
}