浏览代码

Use decal set KeyMaterial for drawInstanced

/main
Paul Melamed 7 年前
当前提交
dbdfb0a6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Decal/DecalSystem.cs


if (instanceCount == kDrawIndexedBatchSize)
{
m_PropertyBlock.SetMatrixArray(m_NormalToWorldID, m_InstanceNormalToWorld);
cmd.DrawMeshInstanced(m_DecalMesh, 0, m_Decals[0].m_Material, 0, m_InstanceMatrices, kDrawIndexedBatchSize, m_PropertyBlock);
cmd.DrawMeshInstanced(m_DecalMesh, 0, KeyMaterial, 0, m_InstanceMatrices, kDrawIndexedBatchSize, m_PropertyBlock);
instanceCount = 0;
}
}

cmd.DrawMeshInstanced(m_DecalMesh, 0, m_Decals[0].m_Material, 0, m_InstanceMatrices, instanceCount, m_PropertyBlock);
cmd.DrawMeshInstanced(m_DecalMesh, 0, KeyMaterial, 0, m_InstanceMatrices, instanceCount, m_PropertyBlock);
}
}

正在加载...
取消
保存