using System; using System.Diagnostics; namespace UnityEngine.Rendering.HighDefinition { /// /// Component that allow you to control the indirect specular and diffuse intensity /// [Serializable, VolumeComponentMenu("Lighting/Indirect Lighting Controller")] [HelpURL(Documentation.baseURL + Documentation.version + Documentation.subURL + "Override-Indirect-Lighting-Controller" + Documentation.endURL)] public class IndirectLightingController : VolumeComponent { /// Indirect diffuse lighting multiplier, between 0 and 1 [Serialization.FormerlySerializedAs("indirectDiffuseIntensity")] public MinFloatParameter indirectDiffuseLightingMultiplier = new MinFloatParameter(1.0f, 0.0f); /// Controls which layer will be affected by the indirect diffuse lighting multiplier public LightLayerEnumParameter indirectDiffuseLightingLayers = new LightLayerEnumParameter(LightLayerEnum.Everything); // Default to everything to not have migration issue /// Reflection lighting multiplier, between 0 and 1 public MinFloatParameter reflectionLightingMultiplier = new MinFloatParameter(1.0f, 0.0f); /// Controls which layer will be affected by the reflection lighting multiplier public LightLayerEnumParameter reflectionLightingLayers = new LightLayerEnumParameter(LightLayerEnum.Everything); // Default to everything to not have migration issue /// Reflection probe and Planar reflection intensity multiplier, between 0 and 1 [Serialization.FormerlySerializedAs("indirectSpecularIntensity")] public MinFloatParameter reflectionProbeIntensityMultiplier = new MinFloatParameter(1.0f, 0.0f); /// /// Returns a mask of reflection lighting layers as uint and handle the case of Everything as being 0xFF and not -1 /// /// public uint GetReflectionLightingLayers() { int value = (int)reflectionLightingLayers.GetValue(); return value < 0 ? (uint)LightLayerEnum.Everything : (uint)value; } /// /// Returns a mask of indirect diffuse lighting layers as uint and handle the case of Everything as being 0xFF and not -1 /// /// public uint GetIndirectDiffuseLightingLayers() { int value = (int)indirectDiffuseLightingLayers.GetValue(); return value < 0 ? (uint)LightLayerEnum.Everything : (uint)value; } /// /// Sky Ambient Mode volume parameter. /// [Serializable, DebuggerDisplay(k_DebuggerDisplay)] public sealed class LightLayerEnumParameter : VolumeParameter { /// /// Light Layer Enum parameterconstructor. /// /// Light Layer Enum parameter. /// Initial override value. public LightLayerEnumParameter(LightLayerEnum value, bool overrideState = false) : base(value, overrideState) {} } } }