• Advertisement
Sign in to follow this  

Texturing an object (DX vs Shader)

This topic is 1436 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I haven't really thought of this until now..... When rendering a scene with DX9 (no shader) it's not a good practice to change textures very often because state changes are slow. Therefore it's a good idea to render every object in the scene that use the same texture in a group and then change the texture and render objects that use the new texture and repeat, repeat, repeat......

 

The question is: do shaders suffer the same state change "slowdown"?

Share this post


Link to post
Share on other sites
Advertisement

Just to be sure you understand my question. It's one or the other-- I'm not asking about mixing DX and shaders.

 

So you are saying switching textures will be a bottleneck regardless?

Share this post


Link to post
Share on other sites

So you are saying switching textures will be a bottleneck regardless?

 

There is no way for us to know if it will be a bottleneck in your case. Every state change has a certain cost. How big that cost is (and how relevant that cost is for a given system) depends on lots of different factors, but for DX9 you probably want to sort by shader first, then by texture, then by everything else.

Edited by lwm

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement