Thanks for the reply, I appreciate it. I've come across those two links before in my own research and just hadn't taken the plunge to attempt to code it up, so it's good to know that it can be done.
It seems like the compute shader is a more "natural" fit for this problem, but that because they are so new there aren't a lot of examples to follow and it will only work on pretty new GPUs from the past year or so. For my use case I'm not worried about supporting old graphics cards so my preference would be to do this with a compute shader, but I'll just keep plugging away at it from both the geometry shader and compute shader angles and see which I can figure out. In the meantime if anyone has any src code examples for this I'd love to get my hands on whatever I can. Thanks! -Ethan Aurelien wrote: > 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 :D :) ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57027#57027 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
