Sign in to follow this  
Aqua Costa

Taking advantage of bottlenecks, kind of

Recommended Posts

In most fullscreen effects (probably all of them) either the pixel shader or the fill rate is the bottleneck, so I'm wondering if I can do whatever I want to in the vertex/geometry shader as long as it doens't take longer the compute than the pixel shader right?
For example generate the fullscreen quads in the geometry shader so there's no need to bind vertex/index buffers, set input layouts, etc without hurting the performance...

Share this post


Link to post
Share on other sites
As far as shader goes your primary hardware resources are shared among all shader stages (at least on DX10+ hardware), so you're not really going to have any hardware that's idling when performing a full screen effect. However executing a single instance of a geometry shader probably isn't going to make the slightest bit of difference, so if that's convenient for you then go for it. Alternatively you can also use a vertex shader that sets the appropriate vertex position based on SV_VertexID, and that would also let you avoid binding a VB + IB + InputLayout without having to use a geometry shader.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this