Class ShadowAtlas
Inheritance
System.Object
ShadowAtlas
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Syntax
public class ShadowAtlas : ShadowmapBase, IDisposable
Constructors
ShadowAtlas(ref ShadowAtlas.AtlasInit)
Declaration
public ShadowAtlas(ref ShadowAtlas.AtlasInit init)
Parameters
Fields
k_MaxCascadesInShader
Declaration
public const uint k_MaxCascadesInShader = 4U
Field Value
Type |
Description |
System.UInt32 |
|
m_ActiveEntriesCount
Declaration
protected uint m_ActiveEntriesCount
Field Value
Type |
Description |
System.UInt32 |
|
m_EntryCache
Declaration
protected VectorArray<ShadowAtlas.CachedEntry> m_EntryCache
Field Value
m_FrameId
Declaration
protected FrameId m_FrameId
Field Value
m_SampSlot
Declaration
protected uint m_SampSlot
Field Value
Type |
Description |
System.UInt32 |
|
m_ShaderKeyword
Declaration
protected string m_ShaderKeyword
Field Value
Type |
Description |
System.String |
|
m_Shadowmap
Declaration
protected RenderTexture m_Shadowmap
Field Value
Type |
Description |
RenderTexture |
|
m_ShadowmapId
Declaration
protected RenderTargetIdentifier m_ShadowmapId
Field Value
Type |
Description |
RenderTargetIdentifier |
|
m_SupportedAlgorithms
Declaration
protected VectorArray<int> m_SupportedAlgorithms
Field Value
m_TempDepthId
Declaration
protected readonly int m_TempDepthId
Field Value
Type |
Description |
System.Int32 |
|
m_TexSlot
Declaration
Field Value
Type |
Description |
System.UInt32 |
|
m_TmpBorders
Declaration
protected float[] m_TmpBorders
Field Value
Type |
Description |
System.Single[] |
|
m_TmpHeights
Declaration
protected uint[] m_TmpHeights
Field Value
Type |
Description |
System.UInt32[] |
|
m_TmpSplits
Declaration
protected Vector4[] m_TmpSplits
Field Value
Type |
Description |
Vector4[] |
|
m_TmpWidths
Declaration
protected uint[] m_TmpWidths
Field Value
Type |
Description |
System.UInt32[] |
|
m_ZClipId
Declaration
protected readonly int m_ZClipId
Field Value
Type |
Description |
System.Int32 |
|
Properties
captureFrame
Declaration
public bool captureFrame { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Alloc(FrameId, ShadowAtlas.Key, UInt32, UInt32, out UInt32, VectorArray<ShadowPayload>)
Declaration
protected bool Alloc(FrameId frameId, ShadowAtlas.Key key, uint width, uint height, out uint cachedEntryIdx, VectorArray<ShadowPayload> payload)
Parameters
Returns
Type |
Description |
System.Boolean |
|
CheckDataIntegrity(ShadowAlgorithm, ShadowVariant, ShadowPrecision, ref Int32[])
Declaration
protected virtual bool CheckDataIntegrity(ShadowAlgorithm algorithm, ShadowVariant variant, ShadowPrecision precision, ref int[] dataBlock)
Parameters
Returns
Type |
Description |
System.Boolean |
|
CreateShadowmap()
Declaration
public override void CreateShadowmap()
Overrides
CreateShadowmap(RenderTexture)
Declaration
protected virtual void CreateShadowmap(RenderTexture shadowmap)
Parameters
Type |
Name |
Description |
RenderTexture |
shadowmap |
|
DisplayShadowMap(CommandBuffer, Material, Vector4, UInt32, Single, Single, Single, Single, Single, Single, Boolean)
Declaration
public override void DisplayShadowMap(CommandBuffer debugCB, Material debugMaterial, Vector4 scaleBias, uint slice, float screenX, float screenY, float screenSizeX, float screenSizeY, float minValue, float maxValue, bool flipY)
Parameters
Type |
Name |
Description |
CommandBuffer |
debugCB |
|
Material |
debugMaterial |
|
Vector4 |
scaleBias |
|
System.UInt32 |
slice |
|
System.Single |
screenX |
|
System.Single |
screenY |
|
System.Single |
screenSizeX |
|
System.Single |
screenSizeY |
|
System.Single |
minValue |
|
System.Single |
maxValue |
|
System.Boolean |
flipY |
|
Overrides
ShadowmapBase.DisplayShadowMap(CommandBuffer, Material, Vector4, UInt32, Single, Single, Single, Single, Single, Single, Boolean)
Dispose()
Declaration
Fill(ShadowContextStorage)
Declaration
public override void Fill(ShadowContextStorage cs)
Parameters
Overrides
Free(ShadowAtlas.CachedEntry)
Declaration
protected void Free(ShadowAtlas.CachedEntry ce)
Parameters
GetFilterWidthInTexels(ShadowmapBase.ShadowRequest, AdditionalShadowData)
Declaration
protected virtual float GetFilterWidthInTexels(ShadowmapBase.ShadowRequest sr, AdditionalShadowData asd)
Parameters
Returns
Type |
Description |
System.Single |
|
Initialize(ShadowAtlas.AtlasInit)
Declaration
public void Initialize(ShadowAtlas.AtlasInit init)
Parameters
Layout()
Declaration
Returns
Type |
Description |
System.Boolean |
|
PostUpdate(FrameId, CommandBuffer, UInt32, List<VisibleLight>)
Declaration
protected virtual void PostUpdate(FrameId frameId, CommandBuffer cb, uint rendertargetSlice, List<VisibleLight> lights)
Parameters
Type |
Name |
Description |
FrameId |
frameId |
|
CommandBuffer |
cb |
|
System.UInt32 |
rendertargetSlice |
|
List<VisibleLight> |
lights |
|
PreUpdate(FrameId, CommandBuffer, UInt32)
Declaration
protected virtual void PreUpdate(FrameId frameId, CommandBuffer cb, uint rendertargetSlice)
Parameters
Type |
Name |
Description |
FrameId |
frameId |
|
CommandBuffer |
cb |
|
System.UInt32 |
rendertargetSlice |
|
Register(GPUShadowType, ShadowRegistry)
Declaration
protected override void Register(GPUShadowType type, ShadowRegistry registry)
Parameters
Overrides
Reserve(FrameId, Camera, Boolean, ref ShadowData, ShadowmapBase.ShadowRequest, UInt32, UInt32, ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>, List<VisibleLight>)
Declaration
public override bool Reserve(FrameId frameId, Camera camera, bool cameraRelativeRendering, ref ShadowData shadowData, ShadowmapBase.ShadowRequest sr, uint width, uint height, ref VectorArray<ShadowData> entries, ref VectorArray<ShadowPayload> payload, List<VisibleLight> lights)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Reserve(FrameId, Camera, Boolean, ref ShadowData, ShadowmapBase.ShadowRequest, UInt32[], UInt32[], ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>, List<VisibleLight>)
Declaration
public override bool Reserve(FrameId frameId, Camera camera, bool cameraRelativeRendering, ref ShadowData shadowData, ShadowmapBase.ShadowRequest sr, uint[] widths, uint[] heights, ref VectorArray<ShadowData> entries, ref VectorArray<ShadowPayload> payload, List<VisibleLight> lights)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
ReserveFinalize(FrameId, ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>)
Declaration
public override bool ReserveFinalize(FrameId frameId, ref VectorArray<ShadowData> entries, ref VectorArray<ShadowPayload> payload)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
ReservePayload(ShadowmapBase.ShadowRequest)
Declaration
protected virtual uint ReservePayload(ShadowmapBase.ShadowRequest sr)
Parameters
Returns
Type |
Description |
System.UInt32 |
|
ReserveSlots(ShadowContextStorage)
Declaration
public override void ReserveSlots(ShadowContextStorage sc)
Parameters
Overrides
Update(FrameId, ScriptableRenderContext, CommandBuffer, CullResults, List<VisibleLight>)
Declaration
public override void Update(FrameId frameId, ScriptableRenderContext renderContext, CommandBuffer cmd, CullResults cullResults, List<VisibleLight> lights)
Parameters
Type |
Name |
Description |
FrameId |
frameId |
|
ScriptableRenderContext |
renderContext |
|
CommandBuffer |
cmd |
|
CullResults |
cullResults |
|
List<VisibleLight> |
lights |
|
Overrides
WritePerLightPayload(List<VisibleLight>, ShadowmapBase.ShadowRequest, ref ShadowData, ref VectorArray<ShadowPayload>, ref UInt32)
Declaration
protected virtual void WritePerLightPayload(List<VisibleLight> lights, ShadowmapBase.ShadowRequest sr, ref ShadowData sd, ref VectorArray<ShadowPayload> payload, ref uint payloadOffset)
Parameters