Hi Ethan,

Histogram computation is a very good example for compute shader use.

If you want to use real time histogram computation in production code, my 
advaice is to follow these 2 links :

http://http.developer.nvidia.com/GPUGems3/gpugems3_ch41.html
http://developer.amd.com/wordpress/media/2012/10/GPUHistogramGeneration_I3D07.pdf

I've implemented this, using geometry shaders, and it is :
- very efficient if you configure properly the amount of data processed by each 
shader stage, and take benefits of linear texture sampling
- simple to develop (it's easy to make a simple implementation and then work on 
it to optimize performances)
- can be executed on a (really) wide range of hardware.
- very scalable (you can easily configure the amount of input texture pixels be 
to processed)

This histogram is used in several released applications to compute 
min/max/mean/geometric mean/standard deviation of the rendered scene. Then 
adaptative tone mapping is applied using these metrics as input.

IMHO, the main problem in using compute shaders is the target hardware which 
have to be compliant.



Cheers,
Aurelien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57016#57016





_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to