Orthographic unit translation mismatch on grid (e.g. 64 pixels translates incorrectly)
- by Justin Van Horne
I am looking for some insight into a small problem with unit translations on a grid.
Setup
512x448 window
64x64 grid
gl_Position = projection * world * position;
projection is defined by ortho(-w/2.0f, w/2.0f, -h/2.0f, h/2.0f); This is a textbook orthogonal projection function.
world is defined by a fixed camera position at (0, 0)
position is…