Fixed shadow mapping rendering incorrectly & Fixed crashed if open scene was cancelled

This commit is contained in:
Antoine Pilote
2024-08-11 00:57:41 -04:00
parent 3c857992ad
commit 24cd93c342
5 changed files with 286 additions and 275 deletions

View File

@@ -355,7 +355,7 @@ void GizmoDrawer::DrawGizmos(Ref<Scene> scene, bool occluded)
Matrix4 gizmoPosition = Matrix4(1.0f);
gizmoPosition = glm::translate(scene->m_EditorCamera->GetTransform(), Vector3(transform.GetGlobalTransform()[3]));
gizmoPosition = gizmoPosition * rotationMatrix;
gizmoPosition = glm::translate(gizmoPosition, { 0, cylinderLength / 2.0, 0 });
gizmoPosition = glm::translate(gizmoPosition, { 0, -cylinderLength / 2.0, 0 });
m_LineShader->Bind();
m_LineShader->SetUniform1f("u_Opacity", 1.0f);