Jump to content

  • Log In with Google      Sign In   
  • Create Account

Multiple SV_POSITION's for different RT


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
3 replies to this topic

#1 Migi0027   Crossbones+   -  Reputation: 1728

Like
0Likes
Like

Posted 06 August 2013 - 02:58 AM

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?


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to kill everyone you meet, ohh, AND STEAL ALL ZE TRIANGLES FROM ZHEM!

Sponsor:

#2 ATEFred   Members   -  Reputation: 1080

Like
1Likes
Like

Posted 06 August 2013 - 03:06 AM

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)



#3 Migi0027   Crossbones+   -  Reputation: 1728

Like
0Likes
Like

Posted 06 August 2013 - 03:23 AM

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


Hi! Cuboid Zone
The Rule: Be polite, be professional, but have a plan to kill everyone you meet, ohh, AND STEAL ALL ZE TRIANGLES FROM ZHEM!

#4 ATEFred   Members   -  Reputation: 1080

Like
0Likes
Like

Posted 06 August 2013 - 04:07 AM

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.



 






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