Robert Osfield wrote :
Hi Fred & Jefferson,

On Sun, Dec 14, 2008 at 10:49 AM, Frederic Bouvier <[email protected]> wrote:
I have a patch to PrecipitationEffect that seems to work. I'll submit it
to osg-submissions

I've just done a review of these changes and don't feel that there are
mostr straightforward and effecient way to implement what is
effectively near plan clipping.  The code will make the vertex program
slower, and not cut down on rasteristation and fill load.

I feel a better route would be to either:

1) use two Camera's to depth partition the scene as suggested earlier
in this thread, as this would give you control over the worlds depth
range where the precipitation exists

2) Use an osg::ClipPlane to clip the precipitation effect.  Using a
clip plan would also allow you to control angle of the clipping.
In my application, rain inside buildings is problematic if people enter the buildings (which they weren't supposed to do until recently). A clip plane method might work better than a near/far/depth partition. However, even with such a solution, I'd still end up with rain visible in some buildings (depending on where the user places the camera). I'm sorry I'm not being very productive, because I have little to provide in terms of solutions, but I want to point out that a partial solution to the issue which slows down the shader, as Robert says, doesn't look like a good solution.

Laurent.
Neither the above routes require any changes to the core OSG, and both
would not affect the vertex program load, and would clip out fragment
so would cut down the fragment program load so would be more efficient
than the submitted fix.

Could you test out the above suggestions?

Thanks,
Robert.
_______________________________________________
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

Reply via email to