Current shadow map method

  1. Switch render target. Keep the current pass color surface and depth surface, set the shadow map color surface and depth surface in order to get the frame buffer data into the screen space texture - shadow map.
  2. We use the R32 color map to store shadow texture, size of 1024x1024. Because dx9.0 can't be valid for modify depth texture, but graphics card vendor support get depth texture approach, it may has something warning in dx9.0 runtime.( Nvidia: hardware shadow map, pcf2x2. ATI: fetch4) If we can fetch depth info. as texture then disable color write, use depth bias to solve depth fighting. The process of shadow map will decrease cost effectively.
  3. In the second rendering pass, fetch the shadow map, and adopt PCF 2x2 to blur the aliasing.


Popular posts from this blog


After reading Steve Jobs Autobiography

Drawing textured cube with Vulkan on Android