An osg-users thread from last October, "Repeatable rendering of
subgraphs, ideas?" discusses different ways to do depth peeling and
other multipass solutions.
If you are using the depth peeling example checked into OSG, it is not
thread safe. There was an osg-submissions thread from November called
"osgoit" that contained a thread-safe depth peeling example.
-Paul
Thomas Hogarth wrote:
Hi All
At my work we are trying to develop a nice looking glass car for a
client. The car will contain all internal components and thus would be
very difficult to render using depth sorting and alpha alone.
I decided to use DepthPeeling
to achieve order independent transparency with a sexy refracted glass
shader. I have used Steffen Frey's example application and simply added
the glass shading to the peeling pass.
This works fine in the example app and I get the results I was
expecting. The problems start once I try to move this into my own
application. It appears that as I add passes the near far clipping
planes are shifting but are different for each pass. For example when I
start up with only a single pass the far clipping plane is very close to
the camera but adding a pass will allow me to move further back. Also a
strange dark area appears at the front as if the near clip plane is also
moving forward (see attached images).
The basic setup is a camera with model view matrix set as identity,
a perspective projection matrix with near far planes at 10 - 8000 and
the model being able to freely move in the cameras field of view. The
camera also has DO_NOT_COMPUTE_NEAR_FAR applied (tried with on and off) .
Any help would be awsome as I'm a bit stumped
Thomas Hogarth
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
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