View Full Version : Simple question: Triangles per second

07-09-2009, 10:58 AM

I have a fairly simple question for people with experience on current hardware. I have moved my renderer over to use VBOs, however it still seems to be vertex limited (my rough test is that no matter if I use a complex or a simple fragment shader, the performance is nearly identical). I am drawing a whole lot of very small triangles, so the actual fill is quite small.

My question is simple: Does 1 426 474 triangles drawn using GL_TRIANGLES using glDrawRangeElements with interleaved vertex data in one VBO and index data in another VBO sound like a lot? What sort of performance should I be expecting in the ideal scenario? It seems likely that I am missing a bottleneck somewhere and I am not really vertex limited per se, but I figured I should sanity check it since it's been a while since I was aware of the hardware.

Many Thanks, Sean

Alfonse Reinheart
07-09-2009, 11:16 AM
If these triangles do not take up much area, then you will get

Your first step in optimizing this should be to turn these triangles into a single triangle strip. There are plenty of programs for doing this. The good ones take into account the post vertex shader cache.

Your next step is LOD. If the object is so small on screen, then you should draw a less detailed version of it.

Ilian Dinev
07-09-2009, 12:32 PM
On a 600MHz gpu, you can draw up to 600 million tris/sec. Provided that the vtx-shader isn't very complex, you can easily reach those numbers if all tris get culled by the gpu. Rasterization, changing of shaders, changing of textures and uploading of uniforms decrease the triangles/sec rate.

As gpus don't increase that core clock a lot, know the upper bound is 10mil tri/frame @ 60Hz.
If you're drawing a huge terrain, use tristrips, but for general meshes indices afaik can be faster.

07-09-2009, 02:48 PM
what card are you getting 600 million tris/sec with?!

Ilian Dinev
07-09-2009, 05:33 PM
I mentioned that's the upper limit :)
On my GF8600GT, (540MHz) 480 million tri/sec is easily achievable (but those tris get culled in the benchmark! ) with a < 20 macro-instruction vtx shader.

http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&amp;Number=255602#Post2556 02

07-10-2009, 10:23 AM
strange, the most I've ever got out of a quadro 5800 (the top nvidia card) is 500 million tris/sec - and that's well over what they claim it can do:-
Are you sure your timings are correct?

Ilian Dinev
07-10-2009, 01:19 PM
Yes, those timings were simply "while keeping 60Hz, how many batches of how many tris each can we draw"; error is <2%

Quadro FX 5600 runs at 600MHz, but there's no info on FX5800, so I'll assume it's at least 600MHz. I have read at many places that a geforce can setup 1 tri/clk, and with such rough experiments possibly confirmed that notion. So, the "300mtri/sec" spec nVidia slap is probably more of a real-case scenario, where triangles are visible onscreen (some of them getting backface-culled, others getting drawn completely with nice shading).