Spheres model matrix generation fix

Fix of integer division resulting in some spheres being rendered at same position.
Removed redundant float cast as all operands are being promoted to double anyways.
This commit is contained in:
d3BugErr
2018-04-10 13:07:43 +03:00
committed by GitHub
parent e511ca603d
commit 3eaf086897

View File

@@ -143,8 +143,8 @@ int main()
model = glm::mat4();
model = glm::translate(model, glm::vec3(
(float)(col - (nrColumns / 2)) * spacing,
(float)(row - (nrRows / 2)) * spacing,
(col - (nrColumns / 2.)) * spacing,
(row - (nrRows / 2.)) * spacing,
0.0f
));
shader.setMat4("model", model);