This project is read-only.

Orthographic projection bug?

May 22, 2011 at 9:03 AM


I was trying to use an orthographic projection camera for my shadow buffer transform and unless I'm doing something wrong I found a bug in the way the orthographic projection is created in Projection.cs at this line:

	Matrix.CreateOrthographic(1, 1, near, far, out projection);

The issue looks to be simply that the 1, 1 needs to actually be a frustum width and height. I fixed this locally by adding OrthoWidth and OrthoHeight float values to the Projection class which are fed into the line above instead of the 1s.