<edit - subject line should say Directional of course)
Two questions for you.
What goes into the depth buffer when rendering using orthgonal projection ?
Can the SGI Shadow Buffer extension method (as seen in Nvidia and other shadow map demos) be modified to implement a light at infinity (directional light).
The two questions link since I’ll need to render the scene to the shadow buffer from the light point of view using an orthogonal projection and I’ll then need change the way the routine compares fragment Z values since the shadow buffer wont hold distance from light, rather just distance <answer to question 1>
ta ta
[This message has been edited by pocketmoon (edited 09-03-2002).]
There is nothing particularly different about orthogonal projections. The math works out pretty much the same.
And, yes, you should be able to use a directional light in shadow buffer, by making the projection orthogonal, just like you intuit. The input to the depth compare has to be slightly different, however; it should probably be a dot product with the light vector (distance from plane) rather than a regular distance to point.
Don’t know if this helps, but I used a skewed orthogonal projection for lights at infinity. This way I could make the light shine in at an angle, while still having the far clipping plane parallel to the ground plane.
thanks folks,
I had a read of the Perspective Shadow Maps paper last night. And I’d like to try something similar but more restictive, using a skewed orthogonal projection as described by Jonask.
The simple case. Viewpoint above a ground plane looking horizontally. The area I want to shadow is defined as extending from the view point projected onto the horizontal plane, extending from zNear to say 100 units. This gives an area of interest like this (looking north, viewed from above):