Does Bandwith between VS and PS count? (performance)

Started by
1 comment, last by Vertex333 15 years, 5 months ago
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
Advertisement
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.
Sirob Yes.» - status: Work-O-Rama.
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

This topic is closed to new replies.

Advertisement