4

I am currently writing a transformation from model space to clip space for use in OpenGL. From what i have seen, programmers typically use a traditional rectangular frustum to define the clipping boundaries in their model space. I personally had in mind a shape like a frustum, except the near and far planes are spheres centered at the apex of the frustum (the camera). So something that looks like this:

Circular sector

The yellow region corresponds to OpenGL's clip space, and the two spheres (depicted as circles in this cross-section image) correspond to OpenGL's z=-1 (inner sphere) and z=1 (outer sphere).

Is this a more realistic way to model the projection, or should i stick with the traditional rectangular frustum when designing my projection matrix?

creXALBO
  • 41
  • 1

1 Answers1

2

Recognize that you are not just clipping against a rectangular window into space, the (angular) edges of which correspond to the boundaries of the screen (or window).

You are also projecting onto a plane, the screen surface.

The traditional clipping pyramid gives you both of these attributes. Your "spherical pyramid" would require correction from the sphere surface to the screen flatness.

John R. Strohm
  • 18,043
  • 5
  • 46
  • 56