Reading the nvidia shadow mapping guide it uses a depthstencil surface to render the shadow map:
pD3DDev->CreateTexture(texWidth, texHeight, 1, D3DUSAGE_DEPTHSTENCIL, D3DFMT_D24S8, D3DPOOL_DEFAULT, &pTex);
Note that you must create a corresponding color surface to go along with yourdepth surface since Direct3D requires you to set a color surface / z surface pairwhen doing a SetRenderTarget(). If you’re not using the color buffer foranything, it’s best to turn off color writes when rendering to it using theD3DRS_COLORWRITEENABLE renderstate to save bandwidth.
But in this article http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/soft-edged-shadows-r2193 it seems to render to a texture render target
g_pd3dDevice->CreateTexture( SHADOW_MAP_SIZE, SHADOW_MAP_SIZE, 1, D3DUSAGE_RENDERTARGET, D3DFMT_R32F, D3DPOOL_DEFAULT, &g_pShadowMap, NULL )
What is appropiate to use?
Seems like the first alternative you need a color surface but you turn off color renderstate to save bandwidth.
But the second alternative you don't???
Edited by Tispe, 01 November 2013 - 07:04 AM.