diff --git a/source/gameengine/Rasterizer/Node/RAS_RenderNode.h b/source/gameengine/Rasterizer/Node/RAS_RenderNode.h index 38496dba0646..6c1b535c617a 100644 --- a/source/gameengine/Rasterizer/Node/RAS_RenderNode.h +++ b/source/gameengine/Rasterizer/Node/RAS_RenderNode.h @@ -71,6 +71,7 @@ struct RAS_MaterialNodeData struct RAS_DisplayArrayNodeData { RAS_IStorageInfo *m_storageInfo; + bool m_applyMatrix; }; struct RAS_MeshSlotNodeData diff --git a/source/gameengine/Rasterizer/RAS_DisplayArrayBucket.cpp b/source/gameengine/Rasterizer/RAS_DisplayArrayBucket.cpp index cb302d2abb64..471d1b6b36d1 100644 --- a/source/gameengine/Rasterizer/RAS_DisplayArrayBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_DisplayArrayBucket.cpp @@ -210,6 +210,7 @@ void RAS_DisplayArrayBucket::UpdateActiveMeshSlots(RAS_Rasterizer *rasty) // Update node data. m_nodeData.m_storageInfo = m_storageInfo; + m_nodeData.m_applyMatrix = (!m_deformer || !m_deformer->SkipVertexTransform()); } void RAS_DisplayArrayBucket::DestructStorageInfo() diff --git a/source/gameengine/Rasterizer/RAS_MeshSlot.cpp b/source/gameengine/Rasterizer/RAS_MeshSlot.cpp index bead7a2692e5..fde25665d9f0 100644 --- a/source/gameengine/Rasterizer/RAS_MeshSlot.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshSlot.cpp @@ -181,21 +181,22 @@ void RAS_MeshSlot::RunNode(const RAS_MeshSlotNodeTuple& tuple) rasty->PushMatrix(); - const bool istext = materialData->m_text; - if ((!m_pDeformer || !m_pDeformer->SkipVertexTransform()) && !istext) { - float mat[16]; - rasty->GetTransform(m_meshUser->GetMatrix(), materialData->m_drawingMode, mat); - rasty->MultMatrix(mat); - } - - if (istext) { + if (materialData->m_text) { rasty->IndexPrimitivesText(this); } - else if (m_pDerivedMesh) { - rasty->IndexPrimitivesDerivedMesh(this); - } else { - rasty->IndexPrimitives(displayArrayData->m_storageInfo); + if (displayArrayData->m_applyMatrix) { + float mat[16]; + rasty->GetTransform(m_meshUser->GetMatrix(), materialData->m_drawingMode, mat); + rasty->MultMatrix(mat); + } + + if (m_pDerivedMesh) { + rasty->IndexPrimitivesDerivedMesh(this); + } + else { + rasty->IndexPrimitives(displayArrayData->m_storageInfo); + } } rasty->PopMatrix();