using System;
using Unity.Collections;
namespace UnityEngine.Rendering.Universal
{
///
/// Class that holds settings related to lights.
///
public class UniversalLightData : ContextItem
{
///
/// Holds the main light index from the VisibleLight list returned by culling. If there's no main light in the scene, mainLightIndex is set to -1.
/// The main light is the directional light assigned as Sun source in light settings or the brightest directional light.
///
///
public int mainLightIndex;
///
/// The number of additional lights visible by the camera.
///
public int additionalLightsCount;
///
/// Maximum amount of lights that can be shaded per-object. This value only affects forward rendering.
///
public int maxPerObjectAdditionalLightsCount;
///
/// List of visible lights returned by culling.
///
public NativeArray visibleLights;
///
/// True if additional lights should be shaded in vertex shader, otherwise additional lights will be shaded per pixel.
///
public bool shadeAdditionalLightsPerVertex;
///
/// True if mixed lighting is supported.
///
public bool supportsMixedLighting;
///
/// True if box projection is enabled for reflection probes.
///
public bool reflectionProbeBoxProjection;
///
/// True if blending is enabled for reflection probes.
///
public bool reflectionProbeBlending;
///
/// True if light layers are enabled.
///
public bool supportsLightLayers;
///
/// True if additional lights enabled.
///
public bool supportsAdditionalLights;
///
public override void Reset()
{
mainLightIndex = -1;
additionalLightsCount = 0;
maxPerObjectAdditionalLightsCount = 0;
visibleLights = default;
shadeAdditionalLightsPerVertex = false;
supportsMixedLighting = false;
reflectionProbeBoxProjection = false;
reflectionProbeBlending = false;
supportsLightLayers = false;
supportsAdditionalLights = false;
}
}
}