Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What do you want to measure? I suggest fillrate and triangle rate. Basically fillrate is how many pixels your rasterizer can spit out each second, Triangle rate is how many triangles your rasterizer + affine transformation functions can push out each second, independent of the fillrate. Here's my suggestion for measuring both:</p> <p>To measure the fillrate without getting <em>noise</em> from the time used for the triangle setup, use only two triangles, which forms a quad. Start with a small size, and then increase it with a small interval. You should eventually find an <em>optimal size</em> with respect to the render time of one second. If you don't, you can perform blending, with full-screen triangle pairs, which is a pretty slow operation, and which only burns fillrate. The fillrate becomes <em>width x height</em> of your rendered triangle. For example, <em>4 megapixels / second</em>.</p> <p>To measure the triangle rate, do the same thing; only for triangles this time. Start with two tiny triangles, and increase the <em>number</em> of triangles until the rendering time reaches one second. The time used by the triangle/transformation setup is much more apparent in small triangles than the time used to fill it. The units is <em>triangle count/second</em>.</p> <p>Also, the overall time used to render a frame might be comparable too. The render time for a frame is the derivative of the global time, i.e <em>delta time</em>. The reciprocal of the delta time is the number of <em>frames per second</em>, if that delta time was constant for all frames.</p> <p>Of course, for these numbers to be half-way comparable across rasterizers, you have to use the same techniques and features. Comparing numbers from a rasterizer which uses per-pixel lighting against another which uses flat-shading doesn't make much sense. Resolution and color depth should also be equal.</p> <p>As for optimization, getting a proper profiler should do the trick. GCC has the GNU profiler gprof. If you want an opinion on clever things to optimize in a rasterizer, ask that as a seperate question. I'll answer to the best of my ability.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload