XNA Creators Club Online
Page 1 of 1 (2 items)
Sort Posts: Previous Next

Rendering into a texture array index with a single render target

Last post 10/7/2008 9:13 PM by Dunge. 1 replies.
  • 10/4/2008 7:54 AM

    Rendering into a texture array index with a single render target

    Hello everyone!

    Basically I was trying to add support for multiple lights with shadow mapping. As I understand, I can make one pass per light or try to wrap this up in a single pass. I decided to try the single pass approach, and for this I need a Texture2DArray of all my shadow maps. I would like to use only one render target an depthstencil texture for all my lights (since each shadow map get rendered individually), but use an DIMENSION_TEXTURE2DARRAY flag for the render target texture and the resource view so I can use Texture2DArray inside HLSL to obtain a shadow map array that I coud use inside my normal scene render.

    So what I want would be a way to change the index of the 2darray rendertarget texture used as the output for the rendertarget view. But not at all use MRT and render to multiple target at the same time. Hope this make sense. Or if someone have a much better idea, say it :).

  • 10/7/2008 9:13 PM In reply to

    Re: Rendering into a texture array index with a single render target

    Second time I post here, and second time I don't get any reply even after a while. Microsoft don't really want us to use DX10 huh?

    Anyway, I think SV_RenderTargetArrayIndex could help me with this. I can render the scene from multiple view/proj matrix in one pass and with an array of rendertarget use SV_RenderTargetArrayIndex to set the correct index. I can even render multiple point lights in one pass (6 shadowmap each).

Page 1 of 1 (2 items) Previous Next