Jump to content
  • Advertisement
Sign in to follow this  
Roof Top Pew Wee

Batching efficiency gains reduced by large textures?

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

Today I stumbled across some weird behavior. I'm playing around with drawing batched Sprites vs calling DrawPrimitive once for each Sprite. Yeah, I know that calling DrawPrimitive once for each Sprite is generally a no-no, but it seems like some of my results may argue otherwise. First, I have 800 or so quads. These are drawn with z buffering turned off, and I draw one by one, calling DrawPrimitive once for each. They are using a 32X32 texture, and there is only one texture switch per frame (to set the initial). I get around 100 fps or something like that. When I switch to batching all 800 at once, keeping it all at 0 texture switches and only one DrawPrimitive call, I get double the framerate. When I switch to a texture that's 200X200 (probably gets upped to 256 X 256), my framerate drops to about 20 fps for the non-batched group of 800 and about 19 fps for the batched. It seems as if I'm getting lower fps on batched groups of polys when I use larger textures. Anyone ever experience this or have any idea why? Aside from the texture sizes (and file that the texture is made from) nothing changes between the two sets of examples. --Vic--

Share this post


Link to post
Share on other sites
Advertisement
When you are going to a larger texture, you are becoming completely bound by the gpu texture fetches because of the increased texture size (and frame buffer writes if you also increase the sprite size). It's actually taking longer to render each sprite than it is to submit then (as your figures show). The difference between 19 and 20 fps is fairly negligable and is probably either down to an inaccurate timer or some peculiarity evident with what you are doing. The CPU hit imposed by not batching is no longer present because of the gpu time.

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!