Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Shadow Mapping RTS-Game - Directional Light

$
0
0
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: 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!

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>