Orthographic "Spotlight/Sunlight"

Sep 4, 2012 at 3:27 PM
Edited Sep 4, 2012 at 3:28 PM

In deferred rendering, you typically have point lights, spot lights, and directional.  Say I wanted a combination of spotlight and directional, for the purpose of making sunlight. that could cast shadows.  You would need a light that has a position, but uses a orthographic projection rather than a perspective one since to the sun, everything is the same distance.  It could also be rendered using a full screen quad I believe, rather than the cone the spotlight uses.

Does nine have something like this?

Sep 5, 2012 at 8:11 AM

From the perspective of lighting & shadowing, directional light and sun light are the same, since they are all use orthographic projections. The position of the sun may only affects sky rendering, water rendering and posts effects such as light shards. You can use directional light to simulate the shadows casted by sunlight, but you have to manually place your sun texture/model at the appropriate position. The existing effects in Nine does not rely on the position of the sun.