Hi Robert,

I am working on an HDR  implementation which should work on multiple
channels. The method I use requires average luminance of the scene. If I
 use different average luminances for different channels the colors will
simply not match. E.g. in a tunnel front channel will see the tunnel
exit and have a higher average luminance than the side channels which
only see the dark tunnel walls.

So, I do need a way to collect current average luminances of all
channels and compute a single average that can be used for all (by
channel I mean separate computers that are connected to separate
projectors).

I know that getting data back from GPU is slow but 12ms for a 4x4
texture seems extreme.

glReadPixels seems to be faster, because we are able to make full screen
grabs (800x600) and still keep 60hz (even w/o pbo). Some GPGPU people
suggest using glReadPixels to read directly from a FBO rather than
glGetTexImage, so I was wondering if there is a way to obtain the
osg::FBO pointer from the camera?

cheers,
tugkan




> Hi Tugkan,
> 
> On Thu, Jan 14, 2010 at 12:00 PM, Tugkan Calapoglu <[email protected]> wrote:
>> unfortunately that method is easy but very slow. I think it also uses
>> glGetTexImage.
> 
> An operation like glReadPixels and glGetTexImage involves the fifo
> being flushed and the data copied back into main memory.  These two
> things together make it slow and there isn't much you can do about it
> directly.
> 
> The best way to deal with the high cost of these operations is to
> avoid them completely.  Try to use algorithms that can use render to
> texture using FBO's and read this textures directly in other
> shaders.  Never try to copy the results back to the CPU/main memory,
> this does force you to do more work on the GPU and rely on more
> complex shaders but in the end it means that you don't have to force a
> round trip to the GPU.
> 
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 


-- 
Tugkan Calapoglu

-------------------------------------
VIRES Simulationstechnologie GmbH
Oberaustrasse 34
83026 Rosenheim
Germany
phone    +49.8031.463641
fax      +49.8031.463645
email    [email protected]
internet www.vires.com
-------------------------------------
Sitz der Gesellschaft: Rosenheim
Handelsregister Traunstein  HRB 10410
Geschaeftsfuehrer: Marius Dupuis
                   Wunibald Karl
-------------------------------------
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to