Hi Marcus,
On Fri, 2006-07-07 at 17:01 +0200, Marcus Lindblom wrote:
> Hi All,
>
> I'm working on multipass refractive water rendering and for my final
> pass, I have a PolygonBackground with a fancy material (with a shader)
> that draws the water (with refraction) andupdates the depth-buffer with
> the correct value (taken from a FBO-rendering) and then everything that
> goes in front of the water is rendered (i.e. that which is not to be
> visible in refraction) through a regular Node-tree.
>
> It's a simplified model which works good enough.
>
> But, my depth-buffer gets overwritten as PolygonBackground calls
> glClear() after having rendered the polygon!
>
> Is there any reason for the glClear being after rendering, rather than
> before it (and preferrably at that)?
The reason is that it's sort of a background's job to clear the screen
and the depthbuffer. It was not really designed for these kinds of
multi-pass operations... :-/
> I suppose I can work around this by adding another viewport with a
> passive background.
Hm, don't think so. The Polygon will clear the depth buffer, and once
it's gone it's gone. :(
The options I can see right now would be writing your own background, or
using a PolygonForeground, which will not do any clearing.
Hope it helps
Dirk
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users