• Advertisement
Sign in to follow this  

Multiple SV_POSITION's for different RT

This topic is 1717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Imagine in a shader you output to 6 different render targets, with different colors. Is it possible to have multiple SV_POSITIONS for each render target, so that I could skip rendering the scene from different view points (E.g. Dynamic Cube Maps)?

 

That could be awesome. huh.png

 

But can I?

Share this post


Link to post
Share on other sites
Advertisement

You can do that through geometry shaders, but not through VS afaik. (expect some performance hit from using the GS to instance your geo n times, once for each output).

(Gs allows you to set one SV_position per triangle stream output)

Share this post


Link to post
Share on other sites

But would that performance hit in the GS, be bigger than rendering the scene 6 times, as an example?

It really depends on your bottleneck, your amount of geo expansion and your GPU. If you are CPU bound it will probably be a win to not resubmit all your geo. It's worth testing and seeing. I use GS expansion for cube map generation, but usually with very small frustums, and it doesn't make much of a difference for me, so I use it for practicality. You can speed things up by culling in your GS as well for each frustum.



 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement