Sign in to follow this  
Vertex333

Does Bandwith between VS and PS count? (performance)

Recommended Posts

D3D10: I have the option to set the color (from a texture/buffer) in the VS for each vertex output, or to set the color (from a texture/buffer) for each Pixel in the Pixelshader. Everyone should agree that accessing the texture/buffer with Load(x) in VS would be less work than accessing the color for each Pixel from Load(x) of texture/buffer. If I do so (VS sets color), I have to set color additional as an output for VS and an input for PS. So my question here is what should cost more? Does it cost more to transfer the color from VS to PS (bandwidth, maybe color interpolation,...)? Thx, Vertex

Share this post


Link to post
Share on other sites
It does "cost" more to transfer additional data between the VS and the PS, since the new values need to be interpolated per-pixel. Most hardware has interpolators that do just that, but depending on how many elements you have passing between the VS and PS, it might take longer than it would without some of them.

However, it is important to note that the operation is very quick, and for you to be limited by the interpolation hardware, you'd need to have a very very very efficient VS and a very very very efficient PS. Most real-life scenarios are not even close to being limited by interpolation hardware, and AFAIK, it's only really an issue when GPUs are benchmarked (can draw X triangles per second).

In short, the cost of adding a new interpolation element is minimal, and in most cases the interpolation units are idle at least some of the time, so in nearly all cases that cost is 0.

Hope this helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirob
It does "cost" more to transfer additional data between the VS and the PS, since the new values need to be interpolated per-pixel. Most hardware has interpolators that do just that, but depending on how many elements you have passing between the VS and PS, it might take longer than it would without some of them.

However, it is important to note that the operation is very quick, and for you to be limited by the interpolation hardware, you'd need to have a very very very efficient VS and a very very very efficient PS. Most real-life scenarios are not even close to being limited by interpolation hardware, and AFAIK, it's only really an issue when GPUs are benchmarked (can draw X triangles per second).

In short, the cost of adding a new interpolation element is minimal, and in most cases the interpolation units are idle at least some of the time, so in nearly all cases that cost is 0.

Hope this helps.
Exactly what I was looking for.

Big Thx,
Vertex

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