fix: use radians instead of degrees for camera zoom.

This commit is contained in:
Joey de Vries
2017-09-21 08:35:13 +02:00
parent c6b404915d
commit 2e0035a8d4
28 changed files with 28 additions and 28 deletions

View File

@@ -326,7 +326,7 @@ int main()
// initialize static shader uniforms before rendering
// --------------------------------------------------
glm::mat4 projection = glm::perspective(camera.Zoom, (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
pbrShader.use();
pbrShader.setMat4("projection", projection);
backgroundShader.use();