This commit is contained in:
Wojtek Figat
2022-06-20 18:14:38 +02:00
parent 1fbdabdcd0
commit f3bd0e469c
5 changed files with 16 additions and 19 deletions

View File

@@ -381,7 +381,7 @@ void GBufferPass::DrawSky(RenderContext& renderContext, GPUContext* context)
// Calculate sphere model transform to cover far plane
Matrix m1, m2;
Matrix::Scaling(renderContext.View.Far / (box.GetSize().Y * 0.5f) * 0.95f, m1); // Scale to fit whole view frustum
Matrix::Scaling(renderContext.View.Far / ((float)box.GetSize().Y * 0.5f) * 0.95f, m1); // Scale to fit whole view frustum
Matrix::CreateWorld(renderContext.View.Position, Float3::Up, Float3::Backward, m2); // Rotate sphere model
m1 *= m2;