   [DirectX 10] Any shadow mapping tutorial?
  Does anyone know any good shadow mapping tutorial for DirectX 10?   
  For any Api you want to use the theory is the same, in order to construct the shadow map, take a render to target from light view frustum and store depth values as floating point RGB values. In your normal pass compare the light distance from every pixel with the stored on the shadow map, if the distance is greater than the shadow map value, then that pixel is on the shadow.One problem you may have is aliasing caused by the resolution of the map, one common solution can be using a PCF filter. Another issue is the shadow map bias, what can be solved taking 2 renders, one for the front faces, and another for the back faces, get the middle value and use it as bias.   ;  I made something like that but isnt working very well...The shadow map is too little so this happens:The shadow map cant cover the hole geometry...   ;  Well you got the lazy part done, now, of what resolution is your shadow map?,what kind of light you want to use, it's gonna be outdoor? Because for directional light is better to use orthogonal projection, if it is omni you should use perspective projection instead.Anyway, you could use perspective projection, you will get better results, try to aim your light frustum to cover your entire geometry, with a 512x512 shadow map and a PCF filter of 3x3 should be enough to get good visual results.If you want to cover ALL your scene start thinking on a cube shadow map or dual paraboloid.   ;Quote:Original post by _Camus_of what resolution is your shadow map?, what kind of light you want to use?My shadow map resolution is 1024x1024, I'm using a parallel light and orthogonal projection for the light projection.;  Hi, change to perspective projection, you'll have to tune your projection matrix to fit your scene's needs, like fov, near and far plane. Whith perspective projection you'll be able to cover your entire scene, or at least the parts you want, i don't think orthogonal projections should be used for shadow mapping, even if you want to simulate directional light sources like the sun, is hardly dependent on the size of your scene geometry, there is no closer or far away on orthogonal, only absolute units.If you give more info would be great   ;  http://www.gamedev.net/community/forums/topic.asp?topic_id=567684   