diff --git a/Runtime/Particle/CElementGen.cpp b/Runtime/Particle/CElementGen.cpp index fa525c15a..2f42e0f4a 100644 --- a/Runtime/Particle/CElementGen.cpp +++ b/Runtime/Particle/CElementGen.cpp @@ -1949,8 +1949,6 @@ void CElementGen::RenderParticlesIndirectTexture() {return a.x4_viewPoint[1] >= b.x4_viewPoint[1];}); } - CGraphics::SetShaderDataBinding(m_normalDataBind); - g_instIndTexData.clear(); 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}; } - m_instBuf->load(g_instIndTexData.data(), g_instIndTexData.size() * sizeof(SParticleInstanceIndTex)); - CGraphics::DrawInstances(0, 4, g_instIndTexData.size()); + if (g_instIndTexData.size()) + { + m_instBuf->load(g_instIndTexData.data(), g_instIndTexData.size() * sizeof(SParticleInstanceIndTex)); + CGraphics::SetShaderDataBinding(m_normalDataBind); + CGraphics::DrawInstances(0, 4, g_instIndTexData.size()); + } } void CElementGen::SetOrientation(const Zeus::CTransform& orientation) diff --git a/hecl b/hecl index 9fdbbb2c2..9cbf88035 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 9fdbbb2c298962b28cd21462262ffc685985d4a7 +Subproject commit 9cbf88035f4e0b493f8cbb0a977c78ceebf7d603