Hi,
I am glad you could solve it. I was not aware of _renderOrderNum index. So
thanks, I have learned important new stuff today ;-)
I guess you had to override either Ocean or LispSM techniuque already. So
you may set _renderOrderNum in overriden code. Depending on which one you
overrode, I believe you may either set 1 for Refraction camera or -1 for
Analysis and Shadow cams.
Cheers,
Wojtek
Hi Wojtek,
Well... we will see if I will be able to help here.
Yes, I am sure you will! :-)
Each camera has render order flag and associated RenderStage+RenderBin
set.
Ah yes, I had forgotten about the render order number (integer to order
more finely between PRE_RENDER cameras and so on). Perhaps that's the
answer here?
And I checked, the main pass camera is POST_RENDER with a
_renderOrderNum of 0.
And the above order of cull visits explains the effect. I assume
refraction RTT camera is PRE_RENDER cam like analisys and shadow. So its
rendered first because its culled first. You would need to put
refraction cull after cullShadowCastingScene() to be sure it will get
rendered at the right moment, I guess.
You're my hero!
I just set the refraction camera as PRE_RENDER, but with a number higher
than the shadow pass and analysis cameras (I chose 1 since the shadow
pass camera is PRE_RENDER 0), and it now happens before the main pass
(since that is POST_RENDER 0), but after the shadow and analysis passes!
Thanks a million, I owe you yet another beer.
Though I kind of hate hard-coding the render order in osgOcean, since
the shadow pass could be any render order number imaginable and it won't
necessarily work then, but at least now it works with the default shadow
technique. I think we might need a render passes manager in OSG that
would work out the order of all passes in all libraries whether they
know about each other or not... I know, wishful thinking :-)
Thanks again,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org