PDA

View Full Version : The old histogram extension



Obli
06-30-2003, 01:49 AM
EXT_histogram -> ARB_imaging subset

I would like to try it out to measure how much texels are being rendered.
However, looks like it works only for {Copy,Draw,Read}Pixels and this is bad.
I remember of a nVidia whitepaper in which they said there's a way to count how much pixels passed thuru the pipe. Does anyone knows something about it? Maybe they were referring only to {Copy,Draw,Read} operations?

dorbie
06-30-2003, 02:01 AM
On any hardware you can count pixels by either incrementing the stencil buffer back or by doing something similar with alpha blending and GL_ONE, GL_ONE, it requires a readback and software addition on the CPU.

The business of coarse z optimization makes the number you get less meaningful these days. You may want to do this test with depth testing on rather than off, but it still won't give you a perfect answer because of the approximate nature of coarse z elimination of fragments.

Pentagram
06-30-2003, 12:57 PM
Doesn't hp_occlusion_query (or something similar) give you the number of pixels drawn?

Charles

jwatte
06-30-2003, 09:42 PM
Histogramming of written fragments would be very useful for deciding on f-stop/exposure settings. Unfortunately, it's un-clear how to properly do histogramming of floating-point fragment data in hardware... maybe one sample point per exponent value?

Obli
06-30-2003, 11:56 PM
"On any hardware you can count pixels by either incrementing the stencil buffer back or by doing something similar with alpha blending and GL_ONE, GL_ONE, it requires a readback and software addition on the CPU."
Histogram was looking much faster than that. Too bad it cannot be used http://www.opengl.org/discussion_boards/ubb/frown.gif

"The business of coarse z optimization makes the number you get less meaningful these days"
This is true if I want to check out brute force fillrate, but this is not what I want to do. I was thinking in using it to measure the texels drawn. In some way, I could figure out how much texels were discarded by early z thus figurng out how much efficient my front to back rendering is. The advantage of doing this was to have the vertex pipes bottlenecks out of the way.

"Doesn't hp_occlusion_query (or something similar) give you the number of pixels drawn?"
No, the HP just gives true/false. The NV gives you the number you want... And this is nice. Maybe I can try play a little with it. I totally missed out that.

"Histogramming of written fragments would be very useful for deciding on f-stop/exposure settings. Unfortunately, it's un-clear how to properly do histogramming of floating-point fragment data in hardware... maybe one sample point per exponent value?"
I simply does not get this. I guess it is related to HDR but I don't think it's a great problem... Oh well, I simply don't know anyway.

Thank you everyone for the useful feedback!