The near plane takes up the whole viewport, the entire width and height of it, so I can write:

width_of_pixel = (r - l) / w

for a symmetric frustum:

width_of_pixel = 2r / w

pixel_height = (t - b) / h = a * (r - l) / (a * w) = pixel_width

where a is the aspect ratio of the viewport (h / w). In this case, the pixels on the near plane are square!

for the well-known 2D orthogonal projection matrix, glOrtho2D(0, w, 0, h), this gives:

pixel_width = (w - 0) / w = 1

apparently correct. But what if the frustum is asymmetrical? Can we generalize the results?

What I’d like to do with this, is to place quads on the projection plane (the near plane) and render them without perspective distortion. Say, I define:

origin = intersection_of_-z_axis_and_near_plane + l * (1, 0, 0) + t * (0, 1, 0)

a pixel’s position on the near plane is then defined as:

pixel_position = origin + x * pixel_width * (1, 0, 0) - y * pixel_height * (0, 1, 0)

but what happens if the frustum is asymmetrical?