Advertisement

Shadow Mapping RTS-Game - Directional Light

Started by October 24, 2017 10:20 AM
0 comments, last by JFT 7 years, 3 months ago

Hi,

I am trying to optimize shadow mapping for an rts-view (nearly top down) with directional light.

My approach so far is to intersect the camera view frustum with the plane of the terrain on which all the units are moving and
fit a box around the four intersection points:
UfOvRCS.png

Then I use the center of the box and the light direction to construct a view matrix.
To construct the orthographic projection matrix I use the corners of my box. 

With that I somehow do not get the wanted results (no shadows) /shadow map is not correctly created for the view of the camera.

I think I am maybe missing some translation/rotation?

Is there a better way for rts-views with a single shadow map ?

Thanks for your help beforehand!

This topic is closed to new replies.

Advertisement