Class UniversalShadowData
Container class for various data used for shadows in URP.
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
public class UniversalShadowData : ContextItem
Fields
additionalLightsShadowmapHeight
The height of the additional light shadow map.
Declaration
public int additionalLightsShadowmapHeight
Field Value
Type | Description |
---|---|
int |
additionalLightsShadowmapWidth
The width of the additional light shadow map.
Declaration
public int additionalLightsShadowmapWidth
Field Value
Type | Description |
---|---|
int |
bias
A list of shadow bias.
Declaration
public List<Vector4> bias
Field Value
Type | Description |
---|---|
List<Vector4> |
mainLightShadowCascadeBorder
Main light last cascade shadow fade border. Value represents the width of shadow fade that ranges from 0 to 1. Where value 0 is used for no shadow fade.
Declaration
public float mainLightShadowCascadeBorder
Field Value
Type | Description |
---|---|
float |
mainLightShadowCascadesCount
The number of shadow cascades.
Declaration
public int mainLightShadowCascadesCount
Field Value
Type | Description |
---|---|
int |
mainLightShadowCascadesSplit
The split between cascades.
Declaration
public Vector3 mainLightShadowCascadesSplit
Field Value
Type | Description |
---|---|
Vector3 |
mainLightShadowmapHeight
The height of the main light shadow map.
Declaration
public int mainLightShadowmapHeight
Field Value
Type | Description |
---|---|
int |
mainLightShadowmapWidth
The width of the main light shadow map.
Declaration
public int mainLightShadowmapWidth
Field Value
Type | Description |
---|---|
int |
resolution
A list of resolution for the shadow maps.
Declaration
public List<int> resolution
Field Value
Type | Description |
---|---|
List<int> |
shadowmapDepthBufferBits
The number of bits used.
Declaration
public int shadowmapDepthBufferBits
Field Value
Type | Description |
---|---|
int |
supportsAdditionalLightShadows
True if additional lights shadows are enabled.
Declaration
public bool supportsAdditionalLightShadows
Field Value
Type | Description |
---|---|
bool |
supportsMainLightShadows
True if main light shadows are enabled.
Declaration
public bool supportsMainLightShadows
Field Value
Type | Description |
---|---|
bool |
supportsSoftShadows
True if soft shadows are enabled.
Declaration
public bool supportsSoftShadows
Field Value
Type | Description |
---|---|
bool |
Methods
Reset()
Resets the object so it can be used as a new instance next time it is created. To avoid memory allocations and generating garbage, the system reuses objects. This function should clear the object so it can be reused without leaking any information (e.g. pointers to objects that will no longer be valid to access). So it is important the implementation carefully clears all relevant members. Note that this is different from a Dispose or Destructor as the object in not freed but reset. This can be useful when havin large sub-allocated objects like arrays or lists which can be cleared and reused without re-allocating.
Declaration
public override void Reset()