Fix sprite shadow to match the sprite facing camera

#1504
This commit is contained in:
Wojtek Figat
2023-10-12 12:10:21 +02:00
parent fa96707c57
commit b1ad2c3a02

View File

@@ -113,7 +113,7 @@ void SpriteRender::Draw(RenderContext& renderContext)
auto model = _quadModel.As<Model>();
if (model->GetLoadedLODs() == 0)
return;
const auto& view = renderContext.View;
const auto& view = (renderContext.LodProxyView ? *renderContext.LodProxyView : renderContext.View);
Matrix m1, m2, m3, world;
Matrix::Scaling(_size.X, _size.Y, 1.0f, m2);
Matrix::RotationY(PI, m3);