Current shadow map method
- 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.
- 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.
- In the second rendering pass, fetch the shadow map, and adopt PCF 2x2 to blur the aliasing.
http://msdn.microsoft.com/en-us/library/ee416324%28VS.85%29.aspx
Comments
Post a Comment