Home Game Development directx11 – About possibly using Depthstencil 2D array in multiplerendertarget mode

directx11 – About possibly using Depthstencil 2D array in multiplerendertarget mode

0
directx11 – About possibly using Depthstencil 2D array in multiplerendertarget mode

[ad_1]

I’m rendering in forward mode my scene with its depth buffer and because I’m using animated characters I’m plannig to find a way to use multiple rendertargets to do the directional shadow pass at the same time using a geometry shader. The reason for this is also that I have arranged my shadowmap size to be the same as the screen size. Moreover I’m doing “transparent colored shadows” inspired from here that requires for my needs an extra color channel and an additional depth information. The effect is cool but has some impact on the performance so doing the animation only once should be interesting.
So my plan is :

with geometry shader:

send to RTV0+Depth0 the scene

send to RTV1+RTV2+Depth1 shadow colored(RTV1)+additional depth layer(RTV2) and regular shadowmap (depth1)

currently I have these two rendering made in two passes (scene then shadows).

I have already used depthmap cube for pointlight shadow so I wonder if we can use 2Darray depth with multiple targets.

If using 2DARRAY depth with 2Darray rendertarget is possible I’m wondering how this must be arranged.
Do we need the number of slices for the target 2Darray to match the number of slice for the depth 2DArray or is it possible to use less depth buffer than the number of rendertarget? Or can the number of target per depth not be the same? Is the device managing this automatically and how?

[ad_2]