I can say some code in dx demo,
if ( g_bPostProcessON && pBackBufferDesc->SampleDesc.Count > 1 )
{
D3D11_TEXTURE2D_DESC Desc;
g_pTexRender11->GetDesc( &Desc );
pd3dImmediateContext->ResolveSubresource( g_pTexRender11, D3D11CalcSubresource( 0, 0, 1 ), g_pTexRenderMS11,
D3D11CalcSubresource( 0, 0, 1 ), Desc.Format );
ID3D11RenderTargetView* aRTViews[ 1 ] = { NULL };
pd3dImmediateContext->OMSetRenderTargets( 1, aRTViews, pOrigDSV );
}
why do we need resolve the msaa target to non-msaa target?
Can't we use mass rendertarget directly?
that code is copy from HDRToneMapping demo in directx sdk.
and then i find a paper: http://developer.amd.com/gpu_assets/Resolve%20your%20Resolves.pdf
it said:
Useful Resolves
We know that the use of MSAA render targets is only helpful when draw calls produce visible “jaggies”. In an ideal world the main geometry pass would be rendered in MSAA mode, and then resolved to a non-MSAA render target. Any subsequent post processing passes would all be completed in non-MSAA mode. This would therefore give rise to just a single resolve per frame. However there are two reasons why a post processing technique may need to be performed in MSAA mode:
1) If a post processing technique enables subsample based depth testing, it can result in an update to some of the subsamples of a pixel.
2) In a similar way if alpha blending is enabled, then subsample data is preserved through the blend operation.[/quote]
so, I want to understand if this is a must.