Compare commits

...

2 Commits

View File

@ -193,8 +193,11 @@ namespace polygun::engine {
// activate shader
chunk_shader.bind();
int sizex,sizey;
glfwGetWindowSize(window, &sizex, &sizey);
glm::mat4 projection = glm::perspective(glm::radians(m_camera.m_zoom), (float)SCR_HEIGHT / (float)SCR_HEIGHT, 0.1f, 100.0f);
glm::mat4 projection = glm::perspective(glm::radians(m_camera.m_zoom), (float)sizex / (float)sizey, 0.1f, 100.0f);
chunk_shader.set_uniform("projection", projection);
glm::mat4 view = m_camera.get_view_matrix();