Skip to content

Commit abece91

Browse files
GLTF Renderer: use primitive start vertex for indexed primitives
1 parent 93491e7 commit abece91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PBR/src/GLTF_PBR_Renderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ void GLTF_PBR_Renderer::Render(IDeviceContext* pCtx,
768768
{
769769
DrawIndexedAttribs drawAttrs{primitive.IndexCount, VT_UINT32, DRAW_FLAG_VERIFY_ALL};
770770
drawAttrs.FirstIndexLocation = FirstIndexLocation + primitive.FirstIndex;
771-
drawAttrs.BaseVertex = BaseVertex;
771+
drawAttrs.BaseVertex = BaseVertex + primitive.FirstVertex;
772772
pCtx->DrawIndexed(drawAttrs);
773773
}
774774
else

0 commit comments

Comments
 (0)