Pages: 1 2 [3]   Go Down
Author Topic: render global shader speed question  (Read 10344 times)
January 15, 2013, 10:27:51 am
Great info guys thanks!  Had no idea state changes were so expensive with lots of models.  Guess I should go back and update some stuff  Yummie
January 15, 2013, 12:28:25 pm
I suspect that (as Jos pointed out) a texture change does have some impact but isn't a huge one.
(i.e. as long as you don't go anything extreme it won't kill your performance).

As far as I know, a shader change is the most expensive and a texture change the second most expensive. Here's an fairly old document from nvidia. And a similar document from AMD. The last one states:

Render state updates can produce a fairly high overhead in DirectX® runtime and the driver. The most expensive are texture and shader changes, followed by vertex and index buffer changes, texture state changes and render state changes.

I should change my terminology a bit, there is a difference between texture changes and texture state changes. Though they are both render state changes.

So that's why I sort in this order:
1. Shaders
2. Textures
3. Other settings
January 15, 2013, 12:57:50 pm
Ok, thanks.

Does [Set GlobalShader Texture (texture, index)] represent a:

texture-change ('Other settings'?)
or a

..and what would be an example of the other?
January 15, 2013, 02:46:29 pm
That represents a texture change, so group 2. A texture state change is a change in the type of filtering for example, which is in group 3.
January 15, 2013, 02:51:52 pm
Ahh, I see now.

Found this link which is also useful:
Pages: 1 2 [3]   Go Down
Jump to: