Class ShadowAtlas | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class ShadowAtlas

    Inheritance
    System.Object
    ShadowmapBase
    ShadowAtlas
    ShadowVariance
    Inherited Members
    ShadowmapBase.m_Width
    ShadowmapBase.m_Height
    ShadowmapBase.m_Slices
    ShadowmapBase.m_ShadowmapBits
    ShadowmapBase.m_ShadowmapFormat
    ShadowmapBase.m_SamplerState
    ShadowmapBase.m_CompSamplerState
    ShadowmapBase.m_ClearColor
    ShadowmapBase.m_WidthRcp
    ShadowmapBase.m_HeightRcp
    ShadowmapBase.m_MaxPayloadCount
    ShadowmapBase.m_ShadowSupport
    ShadowmapBase.m_CullResults
    ShadowmapBase.width
    ShadowmapBase.height
    ShadowmapBase.slices
    ShadowmapBase.IsNativeDepth()
    ShadowmapBase.Register(ShadowRegistry)
    ShadowmapBase.QueryShadowSupport()
    ShadowmapBase.GetMaxPayload()
    ShadowmapBase.Assign(CullResults)
    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)
    Namespace: UnityEngine.Experimental.Rendering
    Syntax
    public class ShadowAtlas : ShadowmapBase, IDisposable

    Constructors

    ShadowAtlas(ref ShadowAtlas.AtlasInit)

    Declaration
    public ShadowAtlas(ref ShadowAtlas.AtlasInit init)
    Parameters
    Type Name Description
    ShadowAtlas.AtlasInit init

    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
    Type Description
    VectorArray<ShadowAtlas.CachedEntry>

    m_FrameId

    Declaration
    protected FrameId m_FrameId
    Field Value
    Type Description
    FrameId

    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
    Type Description
    VectorArray<System.Int32>

    m_TempDepthId

    Declaration
    protected readonly int m_TempDepthId
    Field Value
    Type Description
    System.Int32

    m_TexSlot

    Declaration
    protected uint m_TexSlot
    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
    Type Name Description
    FrameId frameId
    ShadowAtlas.Key key
    System.UInt32 width
    System.UInt32 height
    System.UInt32 cachedEntryIdx
    VectorArray<ShadowPayload> payload
    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
    Type Name Description
    ShadowAlgorithm algorithm
    ShadowVariant variant
    ShadowPrecision precision
    System.Int32[] dataBlock
    Returns
    Type Description
    System.Boolean

    CreateShadowmap()

    Declaration
    public override void CreateShadowmap()
    Overrides
    ShadowmapBase.CreateShadowmap()

    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
    ShadowmapBase.DisplayShadowMap(CommandBuffer, Material, Vector4, UInt32, Single, Single, Single, Single, Single, Single)

    Dispose()

    Declaration
    public void Dispose()

    Fill(ShadowContextStorage)

    Declaration
    public override void Fill(ShadowContextStorage cs)
    Parameters
    Type Name Description
    ShadowContextStorage cs
    Overrides
    ShadowmapBase.Fill(ShadowContextStorage)

    Free(ShadowAtlas.CachedEntry)

    Declaration
    protected void Free(ShadowAtlas.CachedEntry ce)
    Parameters
    Type Name Description
    ShadowAtlas.CachedEntry ce

    GetFilterWidthInTexels(ShadowmapBase.ShadowRequest, AdditionalShadowData)

    Declaration
    protected virtual float GetFilterWidthInTexels(ShadowmapBase.ShadowRequest sr, AdditionalShadowData asd)
    Parameters
    Type Name Description
    ShadowmapBase.ShadowRequest sr
    AdditionalShadowData asd
    Returns
    Type Description
    System.Single

    Initialize(ShadowAtlas.AtlasInit)

    Declaration
    public void Initialize(ShadowAtlas.AtlasInit init)
    Parameters
    Type Name Description
    ShadowAtlas.AtlasInit init

    Layout()

    Declaration
    protected bool Layout()
    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
    Type Name Description
    GPUShadowType type
    ShadowRegistry registry
    Overrides
    ShadowmapBase.Register(GPUShadowType, ShadowRegistry)

    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
    Type Name Description
    FrameId frameId
    Camera camera
    System.Boolean cameraRelativeRendering
    ShadowData shadowData
    ShadowmapBase.ShadowRequest sr
    System.UInt32 width
    System.UInt32 height
    VectorArray<ShadowData> entries
    VectorArray<ShadowPayload> payload
    System.Collections.Generic.List<VisibleLight> lights
    Returns
    Type Description
    System.Boolean
    Overrides
    ShadowmapBase.Reserve(FrameId, Camera, Boolean, ref ShadowData, ShadowmapBase.ShadowRequest, UInt32, UInt32, ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>, List<VisibleLight>)

    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
    Type Name Description
    FrameId frameId
    Camera camera
    System.Boolean cameraRelativeRendering
    ShadowData shadowData
    ShadowmapBase.ShadowRequest sr
    System.UInt32[] widths
    System.UInt32[] heights
    VectorArray<ShadowData> entries
    VectorArray<ShadowPayload> payload
    System.Collections.Generic.List<VisibleLight> lights
    Returns
    Type Description
    System.Boolean
    Overrides
    ShadowmapBase.Reserve(FrameId, Camera, Boolean, ref ShadowData, ShadowmapBase.ShadowRequest, UInt32[], UInt32[], ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>, List<VisibleLight>)

    ReserveFinalize(FrameId, ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>)

    Declaration
    public override bool ReserveFinalize(FrameId frameId, ref VectorArray<ShadowData> entries, ref VectorArray<ShadowPayload> payload)
    Parameters
    Type Name Description
    FrameId frameId
    VectorArray<ShadowData> entries
    VectorArray<ShadowPayload> payload
    Returns
    Type Description
    System.Boolean
    Overrides
    ShadowmapBase.ReserveFinalize(FrameId, ref VectorArray<ShadowData>, ref VectorArray<ShadowPayload>)

    ReservePayload(ShadowmapBase.ShadowRequest)

    Declaration
    protected virtual uint ReservePayload(ShadowmapBase.ShadowRequest sr)
    Parameters
    Type Name Description
    ShadowmapBase.ShadowRequest sr
    Returns
    Type Description
    System.UInt32

    ReserveSlots(ShadowContextStorage)

    Declaration
    public override void ReserveSlots(ShadowContextStorage sc)
    Parameters
    Type Name Description
    ShadowContextStorage sc
    Overrides
    ShadowmapBase.ReserveSlots(ShadowContextStorage)

    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
    ShadowmapBase.Update(FrameId, ScriptableRenderContext, CommandBuffer, CullResults, List<VisibleLight>)

    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
    Type Name Description
    System.Collections.Generic.List<VisibleLight> lights
    ShadowmapBase.ShadowRequest sr
    ShadowData sd
    VectorArray<ShadowPayload> payload
    System.UInt32 payloadOffset
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023