Use Multiple Render Targets for Differing Primitive Projections?
#1 Members - Reputation: 153
Posted 05 November 2012 - 03:27 PM
If I'm understanding the use of multiple render targets correctly, you can only specify different output COLORS for each render target from the Pixel Shader using the SV_Target semantic - using an index suffix to specify the render target (SV_Target0, SV_Target1). But by this stage in the pipeline, the projection position of the pixel has already been determined.
It appears that the SV_Position semantic doesn't give you the same option to specify multiple projection positions for a vertex from the Vertex Shader. Is that correct?
Can anyone think of another way I could do pull this off? Or will I need to perform two separate draw calls on this set of vertices?
Thanks in advance for any help and suggestions.
Tim
#3 Members - Reputation: 153
Posted 06 November 2012 - 10:44 AM
You can do this with a geometry shader and render target array index. Check out for example the CubeMapGS sample in the Direct3D 10 samples in the DX SDK.
Thanks for the suggestion. I looked this over, but it will not work for me as my render targets are not an array type (and can't be as they are different dimensions). Any other ideas?
#4 Members - Reputation: 1984
Posted 06 November 2012 - 11:13 AM
From http://msdn.microsoft.com/en-us/library/windows/desktop/ff476464%28v=vs.85%29.aspx:
The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.






