Skip to content

Commit 761f59e

Browse files
Kamil Marciniakqaisjp
authored andcommitted
Fix #768 missing shader cast in dxDrawMaterialPrimitive (#769)
1 parent ca306e4 commit 761f59e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Client/core/Graphics/CGraphics.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,12 @@ void CGraphics::DrawMaterialPrimitiveQueued(std::vector<PrimitiveMaterialVertice
891891
vert.fY = m_pAspectRatioConverter->ConvertPositionForAspectRatio(vert.fY);
892892
}
893893

894+
if (CShaderItem* pShaderItem = DynamicCast<CShaderItem>(pMaterial))
895+
{
896+
// If material is a shader, use its current instance
897+
pMaterial = pShaderItem->m_pShaderInstance;
898+
}
899+
894900
// Set up a queue item
895901
sDrawQueueItem Item;
896902
Item.eType = QUEUE_PRIMITIVEMATERIAL;

0 commit comments

Comments
 (0)