浏览代码

Fix decal set render list container

/main
Paul Melamed 7 年前
当前提交
e21ffe2c
共有 1 个文件被更改,包括 13 次插入3 次删除
  1. 16
      com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs

16
com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs


static public float[] m_BoundingDistances = new float[1];
private Dictionary<int, DecalSet> m_DecalSets = new Dictionary<int, DecalSet>();
private SortedDictionary<int, DecalSet> m_DecalSetsRenderList = new SortedDictionary<int, DecalSet>();
private SortedList<int, List<DecalSet>> m_DecalSetsRenderList = new SortedList<int, List<DecalSet>>(); // list of decalset lists sorted by material draw order
// current camera
private Camera m_Camera;

foreach (var pair in m_DecalSetsRenderList)
{
pair.Value.RenderIntoDBuffer(cmd);
foreach(var decalSet in pair.Value)
{
decalSet.RenderIntoDBuffer(cmd);
}
}
}

{
if (pair.Value.CreateDrawData())
{
m_DecalSetsRenderList.Add(pair.Value.DrawOrder, pair.Value);
int key = pair.Value.DrawOrder;
List<DecalSet> decalSetList;
if (!m_DecalSetsRenderList.TryGetValue(key, out decalSetList))
{
decalSetList = new List<DecalSet>();
m_DecalSetsRenderList.Add(key, decalSetList);
}
decalSetList.Add(pair.Value);
}
}
}

正在加载...
取消
保存