Class ShadowAtlas
Inheritance
System.Object
ShadowAtlas
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
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)
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)
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 |
|
Overrides
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 |
|
System.Collections.Generic.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 |
|
System.Collections.Generic.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
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.