Class HDCachedShadowManager
The class responsible to handle cached shadow maps (shadows with Update mode set to OnEnable or OnDemand).
상속된 멤버
네임스페이스: UnityEngine.Rendering.HighDefinition
어셈블리: solution.dll
구문
public class HDCachedShadowManager
프로퍼티
이름 | 설명 |
---|---|
instance | Get the cached shadow manager to control cached shadow maps. |
메서드
이름 | 설명 |
---|---|
DefragAtlas(HDLightType) | If a light is added after a scene is loaded, its placement in the atlas might be not optimal and the suboptimal placement might prevent a light to find a place in the atlas. This function will force a defragmentation of the atlas containing lights of type lightType and redistributes the shadows inside so that the placement is optimal. Note however that this will also mark the shadow maps as dirty and they will be re-rendered as soon the light will come into view for the first time after this function call. |
ForceEvictLight(HDAdditionalLightData) | This function can be used to evict a light from its atlas. The slots occupied by such light will be available to be occupied by other shadows. Note that eviction happens automatically upon light destruction and, if lightData.preserveCachedShadow is false, upon disabling of the light. |
ForceRegisterLight(HDAdditionalLightData) | This function can be used to register a light to the cached shadow system if not already registered. It is necessary to call this function if a light has been evicted with ForceEvictLight and it needs to be registered again. Please note that a light is automatically registered when enabled or when the shadow update changes from EveryFrame to OnDemand or OnEnable. |
WouldFitInAtlas(int, HDLightType) | This function verifies if a shadow map of resolution shadowResolution for a light of type lightType would fit in the atlas when inserted. |