浏览代码

Fix shadow algorithm reserve size

/main
Antoine Lelievre 6 年前
当前提交
f6b0b8f5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.render-pipelines.core/CoreRP/Shadow/Shadow.cs

2
com.unity.render-pipelines.core/CoreRP/Shadow/Shadow.cs


override protected void Register(GPUShadowType type, ShadowRegistry registry)
{
ShadowPrecision precision = m_ShadowmapBits == 32 ? ShadowPrecision.High : ShadowPrecision.Low;
m_SupportedAlgorithms.Reserve(5);
m_SupportedAlgorithms.Reserve(6);
m_SupportedAlgorithms.AddUniqueUnchecked((int)ShadowUtils.Pack(ShadowAlgorithm.PCF, ShadowVariant.V0, precision));
m_SupportedAlgorithms.AddUniqueUnchecked((int)ShadowUtils.Pack(ShadowAlgorithm.PCF, ShadowVariant.V1, precision));
m_SupportedAlgorithms.AddUniqueUnchecked((int)ShadowUtils.Pack(ShadowAlgorithm.PCF, ShadowVariant.V2, precision));

正在加载...
取消
保存