Jump to content

  • Log In with Google      Sign In   
  • Create Account



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Tim Coolman   Members   -  Reputation: 163

Like
0Likes
Like

Posted 05 November 2012 - 03:27 PM

I have a point list of vertices(D3D11_PRIMITIVE_TOPOLOGY_POINTLIST) that I wish to render to two render targets. I was hoping I'd be able to set both render targets simultaneously using OMSetRenderTargets. However, my situation is unique in that I want each point (Vertex) to be projected differently onto the two render targets.

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

Sponsor:

#2 Erik Rufelt   Crossbones+   -  Reputation: 3030

Like
0Likes
Like

Posted 05 November 2012 - 04:53 PM

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.

#3 Tim Coolman   Members   -  Reputation: 163

Like
0Likes
Like

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 Erik Rufelt   Crossbones+   -  Reputation: 3030

Like
0Likes
Like

Posted 06 November 2012 - 11:13 AM

You might be out of luck then, unfortunately.
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.



#5 Tim Coolman   Members   -  Reputation: 163

Like
0Likes
Like

Posted 07 November 2012 - 11:15 AM

You might be out of luck then, unfortunately.


No problem. I can do it in two separate draw calls, I was just wondering if I could improve efficiency since the input data is exactly the same. Thanks for the info!

#6 kauna   Crossbones+   -  Reputation: 2154

Like
0Likes
Like

Posted 07 November 2012 - 01:56 PM

If your drawing code is as efficient as it can be, not using Geometry Shader won't slow down a much. GS may help you to reduce the draw calls, but the overall efficiency gain may be close to 0.

Cheers!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS