fixed GRP dynamic lights using the wrong vertex attributes

This commit is contained in:
myT 2024-08-07 03:16:38 +02:00
parent 9712ffb17d
commit 6ed0ea19a8

View file

@ -608,8 +608,16 @@ void World::EndBatch()
pixelRC.opaque = dlOpaque ? 1.0f : 0.0f;
CmdSetRootConstants(dlRootSignature, ShaderStage::Pixel, &pixelRC);
BindVertexBuffers(batchHasStaticGeo, 0, 1);
CmdDrawIndexed(indexCount, db.indexBuffer.batchFirst, batchHasStaticGeo ? 0 : db.vertexBuffers.batchFirst);
if(batchHasStaticGeo)
{
BindVertexBuffers(batchHasStaticGeo, (uint32_t)stageIndex, 1);
CmdDrawIndexed(indexCount, db.indexBuffer.batchFirst, 0);
}
else
{
BindVertexBuffers(batchHasStaticGeo, 0, 1);
CmdDrawIndexed(indexCount, db.indexBuffer.batchFirst, db.vertexBuffers.batchFirst);
}
}
else
{