Yes i dont say my implementation is good, it was just the easiest way i
found to do it. I am not very confortable with the uniform because it
could not work if you use a more complex shader, or you will have to
take care about the shader you use and reimport the uniform in your
shader to manage this case, it's maybe not a problem but you are right
it's probably faster than re culling.
Anyway I would need more time to investigate this functionnality and
test with uniform. I will have the time soon, I hope :)
Cedric
Jean-Sébastien Guay wrote:
Hi Cedric,
This code is not submitted because it's just a work around, not a
clean way to do it, i make it when i tried shadow.
Well, doing two traversals is pretty much required if you don't want
to change the shader. This may have a large performance hit however.
In my experience, using shadow maps more than doubles the cull time on
machines with a slow CPU, so if this can be kept to a minimum, all the
better.
I think the way I gave with a uniform parameter in the shader to
control this is more flexible, and it might be faster (since you then
only do one traversal). Testing would be needed to confirm this of
course, and it would depend on the scene you're rendering.
J-S
--
+33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED]
http://www.plopbyte.net
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org