Many implementations support a less restrictive form of multiple render targets. The biggest relaxation is the ability to have multiple render targets that can be created independently. These render targets must be of identical dimensions but can have different formats. The pipeline supports a single render target that can be set using IDirect3DDevice9::SetRenderTarget. This has been extended to allow multiple render targets to be simultaneously present in the device. A new cap expresses this ability.
Multiple render targets have the following restrictions:
If the D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS cap is set, the device can support all mixed formats regardless of format type or bit depth. If the D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS cap is not set, the device can support mixed format types for surfaces containing the same bit depth above 16 bits. The mixing of different format types for 16-bit depth surfaces is undefined.
When the D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING cap is set, you must first consult the IDirect3D9::CheckDeviceFormat with the USAGE_QUERY_POSTPIXELSHADER_BLENDING result for the specific surface format. If false, no post-pixel shader blending operations will be available for that specific surface format. If true, the device is expected to apply the same state to all simultaneous render targets as follows:
Note In the past, this API was used to set the depth stencil as well. In Direct3D 9 however, this API has been split up as documented in the IDirect3DDevice9::SetRenderTarget and IDirect3DDevice9::SetDepthStencilSurface sections.
New hardware caps:
D3DCAPS9.NumSimultaneousRTs // The value is 1 for all hardware except those that // can support this feature. It is never 0. D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS - True if the hardware can support it D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING - True if the hardware can support it