Jump to content
  • Advertisement
Sign in to follow this  
Nanoprobe

Expense of texture parameter state change

This topic is 4439 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'm curious - does anyone know how expensive the state change is to change the parameters of a texture? For instance, changing the addressing mode from repeat to clamp, or changing filtering from nearest to linear? Are they essentially free operations, or is there much time involved? - Nanoprobe

Share this post


Link to post
Share on other sites
Advertisement
They're not free operations. But they don't impact things TOO much.

Just what are you trying to do? If it's just a few dozen calls you're worried about, it's all good. But if you do this per poly, you might be killing your performance.

Share this post


Link to post
Share on other sites
I wouldn't be doing anything like per-poly texture state changes; I was wondering whether or not it's worth the effort of sorting states by texture parameters as well - though if in general usage it's not going to make much of an impact I doubt it's worth doing.

Share this post


Link to post
Share on other sites
Texture parameter settings are stored per texture object - so sorting with respect to them doesn't make sense anyway - you just need to sort by texture object.

Hope that helped [smile]

Share this post


Link to post
Share on other sites
Actually, it does make sense if you want to use the same texture data, but with different parameters.

You could use two texture objects with two sets of parameters and two sets of data, but that would be wasteful. Changing the texture state should be cheap, I just don't know how much so.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!