2010年6月6日 星期日

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.
ftp://download.nvidia.com/developer/presentations/2004/GPU_Jackpot/Shadow_Mapping.pdf

http://msdn.microsoft.com/en-us/library/ee416324%28VS.85%29.aspx

沒有留言:

張貼留言