zhangzdb / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Multi-pass rendering incompatible with other nodekits (particularly osgShadow) #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Since osgOcean uses multi-pass rendering and particularly full-screen
effects that are rendered to full-screen quads from previous RTT passes, it
is unlikely to be compatible with other nodekits that implement multi-pass
effects, or indeed any multi-pass effects created by the user.

I think this is inevitable in the current way of implementing these effects
(osgOcean and osgShadow, for example), but it would be nice if it were
possible to refactor the two to make them compatible. If this could be
done, we could then specify clearly what needs to be done for any
multi-pass effect to be compatible with osgOcean.

I think the first step is exposing the passes that are done in the
OceanScene in some way, as well as their order, and allow the user to
insert passes in the sequence. Perhaps some kind of scene manager object
could be devised to decouple this from osgOcean itself.

I'll ask on osg-users to see if people have suggestions about a general way
of doing this. Right now all the solutions I can think of would require
refactoring of all the nodekits we want to be compatible with each other to
follow the same scheme of doing things, which will be inconvenient for
exising users of those nodekits.

Original issue reported on code.google.com by jean.sebastien.guay13@gmail.com on 12 Jun 2009 at 1:38

GoogleCodeExporter commented 9 years ago
Old issue that has now been resolved at least partially. The comment above was 
a bit alarmist and most RTT effects worked fine without any modification.

OceanScene::traverse() checks the name of the camera that it will traverse, and 
does not do any RTT passes if it is a shadow camera. This lets osgOcean run 
with osgShadow at least - no shadows will be in the reflection but this is 
kinda normal...

It should be documented so that users that do their own custom shadow rendering 
will not have to check the source code to see that they need to name their 
shadow camera "ShadowCamera".

Original comment by jean.sebastien.guay13@gmail.com on 12 Oct 2010 at 2:42

GoogleCodeExporter commented 9 years ago
Added documentation as mentioned in the previous post. This issue can now be 
closed, remaining problems can be bitten off one at a time if needed.

Original comment by jean.sebastien.guay13@gmail.com on 14 Apr 2011 at 1:35