Fix transform scaling applying to nested objects when drawing

#1796 #1350
This commit is contained in:
Wojtek Figat
2024-02-20 23:55:06 +01:00
parent e5cfd872b2
commit 9a21cfd092
13 changed files with 51 additions and 30 deletions

View File

@@ -125,7 +125,7 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context)
auto& lod = staticModel->Model->LODs[0];
Matrix worldMatrix;
staticModel->GetTransform().GetWorld(worldMatrix);
staticModel->GetLocalToWorldMatrix(worldMatrix);
Matrix::Transpose(worldMatrix, shaderData.WorldMatrix);
shaderData.LightmapArea = staticModel->Lightmap.UVsArea;