Archived

This topic is now archived and is closed to further replies.

nhatkthanh

slow fps for small number of quads with texture

Recommended Posts

I have about 500 quads with size 5000 x 5000 units, with single texture. And when I render the fps is about < 10. is this suppose to happen? (I was thinking of the large section that the texture have to interpolate) any suggestion to render these large texture quads at high fps? thanks.

Share this post


Link to post
Share on other sites
ohh sorry for the spec/details:

The quads are huge (but they''ll get smaller as you move up and away), texture is small 32x32, no blending, and it''s using HAL.

P4 2.4 Ghz, 512 MB DDR333
ATI 9000 Pro 128MB

Share this post


Link to post
Share on other sites
I think this might be the problem, as I draw those 500 quads, for each of them I called the draw primitive (this is because i''m experiencing with patch and a patch is just a quad) so apparently it would call drawprimitive 500 times (wonder if this is the cause?), i''ll try to make all those patches into one single buffer and flush it down one time.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by nhatkthanh
I have about 500 quads with size 5000 x 5000 units, with single texture. And when I render the fps is about < 10.

is this suppose to happen? (I was thinking of the large section that the texture have to interpolate)

any suggestion to render these large texture quads at high fps?

thanks.


Honestly, it sounds like you scene is fill bound (fill-rate limited).

Rendering large quads that stretch a texture means that the card has to sample the texture at a larger mip-level. The texture sample is larger than the texture unit on the GPU, meaning that it can only sample sections of the texture to fill with. (Most cards have a texture of 256x256 stored in the GPU cache).

Now imagine the smaller mip levels. The GPU would have to load the mip levels for the farther quads.

If you render each quad one at a time, then multiply this by 500. You should be rendering the quads in a dynamic or static vertex array.

Share this post


Link to post
Share on other sites
The size of the quads is irrelevant, but what might matter is how much of the screen they cover.

If all 500 quads cover the entire screen (and no fragment is rejected) and your screen resolution is 800x600, then at 10 fps you are drawing 2.4 Gpixels/second. How does that compare to your card''s max fill rate?

Share this post


Link to post
Share on other sites
that''s seem to be part of the problem from what you guys suggested, but the framerate now is around 150 due to 1 drawprimitive call, I will now increase the more polys and decrease the size and fix the texture problem.

Thanks again everyone.

Share this post


Link to post
Share on other sites