fix parallax camera

This commit is contained in:
2019-01-30 11:44:39 +01:00
parent 08490b248e
commit c516e8ae78
4 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ void NodeCanvas::draw()
glm::mat4 ortho_proj = glm::ortho(0.f, box.z, 0.f, box.w, -1000.f, 1000.f);
glm::mat4 proj = glm::perspective(glm::radians(m_canvas->m_cam_fov), box.z / box.w, 0.001f, 1000.f);
glm::mat4 camera = m_canvas->m_cam_rot * glm::translate(m_canvas->m_cam_pos);
glm::mat4 camera = glm::translate(m_canvas->m_cam_pos) * m_canvas->m_cam_rot;
m_canvas->m_mv = camera;
m_canvas->m_proj = proj;