Hello Morné,
Just as another datapoint, I also implemented outlining in a similar
way to osgFX::Effect. All times stay the
same except draw which triples. In my application, this doesn't
affect me too much and I still make 60 fps if an object is selected or
not, so I don't mind the jump that much, but I can see it being a
problem if you have a very flexible scene/selection strategy...
Yes, well, for now I've decided to just live with it, though I've been
able to lower the times a bit by fixing a very stooopid bug!
When adding the effect, we were not removing the child from its original
parent. So if the graph looked like this before:
parent
|
|
child
After adding the effect it looked like this:
parent
| \
| effect
| /
child
Since the effect actually renders the child twice, because of not
removing the child from its original parent, it was being rendered a
total of 3 times, which explains the tripling of timings!
I've fixed this, so now after adding the effect the only parent of the
child node is the effect, and when removing the effect I re-add the
child to the parent. The times are closer to double now (though still
slightly higher than double - 0.4 becomes 0.9 - which I can't explain,
since the outline pass disables most things, so it should theoretically
be faster than the original render I would think)
I just want to say in my defense that that code wasn't written by me!
(though I've made that mistake in the past too)
J-S
--
______________________________________________________
Jean-Sebastien Guay [EMAIL PROTECTED]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org