I played around with shadowmapping for a cuple of weeks now and had an other breakthrough yesterday. That resulted in support for the sun with a quite high shadowresolution near to the player.

This is how it works:
I render three depthmaps from three views at the position of the sun. They are all facing the camera but have different arc values. Now when calculating the shadows I always use the depthmap with the highest resolution possible.

This is WIP and needs a lot of more work but I already like to show it of.
Things I know about:
-The shadows are one frame behind the camera.
-There is a lot of aliasing on the shadows.
-When shadows are overlapping there are sometimes non shadowed parts which should be shadowed.

The depthmapresolution used here is 512*512.

I would like to get some feedback on how it works on your computer and what you think about it

Thanks,
Slin

A screenshot and the download:

Download (3.15mb)

You can move the sun around with q and e. You have to press 0 before you can move around and you can open the debugpanel through pressing F11.