Jump to content
  • Advertisement
Sign in to follow this  
klapancius

texture change (and other state-change) costs on modern GPU-s

This topic is 2553 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

Hi all,

I'm working on a scene-graph based graphics engine for modeling purposes using XNA 4.0, and I'm really new in this.
On many places I have been reading, that texture changes (and other state changes) should be minimized during rendering (so I have to order my primitives by materials, etc.).

I created a small test application in XNA 4, which was rendering hundreds of 70k triangle models with a single texture, then doing the same toggling 2 different textures per models. There was no difference in rendering time (however I used small ~100x100 textures).

So my questions are:
  • Should I really care about shorting my primitives by texture/color/other material parameters? Or is it less important on modern GPU-s?
  • What is the expectable percentage of performance loss, if I don't?
  • Are there any other state changes, which can effect the performance?
  • Where can I find some up to date literature/best practice guide about this?

    Thank you for any help or links!

Share this post


Link to post
Share on other sites
Advertisement
[color="#1C2837"]
Are there any other state changes, which can effect the performance?[/quote]All state changes affect performance.


[color="#1C2837"] [color="#1C2837"]
Should I really care about shorting my primitives by texture/color/other material parameters? Or is it less important on modern GPU-s?[/quote]
Depends if you are GPU or CPU limited.
If you draw thousand(s) objects you will be more and more CPU bound. If on the other hand you draw few objects with very complex shaders you will be GPU bound.

You should try to minimize all state changes, the driver overhead of API calls is the biggest downside to the PC (compared to consoles).


[color="#1C2837"]
What is the expectable percentage of performance loss, if I don't?[/quote]
[color="#1c2837"]Probably can't be answered, totaly depends on what you plan to do.
[color="#1c2837"]Could be 0%,10%,...


[color="#1C2837"]
[color="#1C2837"]Where can[color="#1C2837"] I find some up to date literature/best practice guide about this?[/quote][color="#1C2837"]
http://origin-develo...hBatchBatch.ppt

Don't go too much into details if you're new to this. Get something working first.
Only once you can easily load in many models and make a game or something,
then come back and try to improve you renderer based on what you need.

Share this post


Link to post
Share on other sites
[font=arial, verdana, tahoma, sans-serif][size=2]Thank you for your answer, it helped a lot, I found the informations I needed![/font]

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!