Hi Wojtek,

I think if it gives a verifiable gain (less video memory used for depth component RTT) then you can submit it.

I saw direct improvement on GF 7800. On newer boards its smaller unless the OSG application is GPU memory bound. Which happens quite often in our practice.

But even if the application is not video memory bound, using up less video memory means it will be less likely to become video memory bound in the future... I meant verifiable in terms of using a tool that shows how much video memory is used, before and after applying your changes. An app should use as much video memory as it can if it improves performance, but in this case I really don't think it improves anything to use more memory.

Indeed, at least on cards with 512MB video memory you will be more likely to be able to use 4096x4096 shadow map size...

Code attached. Changes are quite simple. You may as well test them. Considering Robert tight schedules I doubt he will be eager to play with it.

You're right, it's a simple change. I wonder if we could get some other people to test it with some of their apps and see if it causes problems.

Looking at the code, it seems like the same thing happens with the depth buffer, i.e. a depth attachment will be created if none is present. IMHO, a depth buffer is not mandatory - you could want to do an RTT pass on a single fullscreen quad, in which case you don't need depth and can disable depth test. In that case, wouldn't it make sense to only attach a color buffer? An added depth buffer will only add to the video memory requirements.

In other words, can't we trust the user to have set up their FBO attachments correctly? In these two cases, the code checks if there's a given attachment (depth or color) and if not, unconditionally adds one whether the user needs it or not. The code can't know exactly what the user needs, but isn't it better to be conservative instead of creating everything in case the user needs it but doesn't know it?

I hope I'm making sense... Anyways, just for the shadow map, I think it would be interesting to at least see if this change affects something else.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to