Bind indirect shader pipeline closer to actual draw command

This commit is contained in:
Jack Andersen 2016-02-26 15:39:16 -10:00
parent 2af208c039
commit 4405af9925
2 changed files with 7 additions and 5 deletions

View File

@ -1949,8 +1949,6 @@ void CElementGen::RenderParticlesIndirectTexture()
{return a.x4_viewPoint[1] >= b.x4_viewPoint[1];}); {return a.x4_viewPoint[1] >= b.x4_viewPoint[1];});
} }
CGraphics::SetShaderDataBinding(m_normalDataBind);
g_instIndTexData.clear(); g_instIndTexData.clear();
g_instIndTexData.reserve(x2c_particleLists.size()); g_instIndTexData.reserve(x2c_particleLists.size());
@ -2016,8 +2014,12 @@ void CElementGen::RenderParticlesIndirectTexture()
inst.sceneUVs = Zeus::CVector4f{clipRect.x18_uvXMin, clipRect.x24_uvYMax, clipRect.x1c_uvXMax, clipRect.x20_uvYMin}; inst.sceneUVs = Zeus::CVector4f{clipRect.x18_uvXMin, clipRect.x24_uvYMax, clipRect.x1c_uvXMax, clipRect.x20_uvYMin};
} }
if (g_instIndTexData.size())
{
m_instBuf->load(g_instIndTexData.data(), g_instIndTexData.size() * sizeof(SParticleInstanceIndTex)); m_instBuf->load(g_instIndTexData.data(), g_instIndTexData.size() * sizeof(SParticleInstanceIndTex));
CGraphics::SetShaderDataBinding(m_normalDataBind);
CGraphics::DrawInstances(0, 4, g_instIndTexData.size()); CGraphics::DrawInstances(0, 4, g_instIndTexData.size());
}
} }
void CElementGen::SetOrientation(const Zeus::CTransform& orientation) void CElementGen::SetOrientation(const Zeus::CTransform& orientation)

2
hecl

@ -1 +1 @@
Subproject commit 9fdbbb2c298962b28cd21462262ffc685985d4a7 Subproject commit 9cbf88035f4e0b493f8cbb0a977c78ceebf7d603