From d9582cd0bdbe8793d550f5844c7dccd5452b3f41 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Wed, 28 Sep 2022 14:47:50 +0800 Subject: [PATCH] Fixed first instance in MDI call being wrong --- SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp index ed8aab64..de77004b 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Batching/SHBatch.cpp @@ -270,7 +270,7 @@ namespace SHADE .instanceCount = static_cast(subBatch.Renderables.size()), .firstIndex = subBatch.Mesh->FirstIndex, .vertexOffset = subBatch.Mesh->FirstVertex, - .firstInstance = nextInstanceIndex + .firstInstance = nextInstanceIndex++ }); // Fill in buffers (CPU)