Am 08.11.2013 16:31, schrieb Bram Vaessen:
You still can render to them in separate passes.
1.pass: Render texture to FBO with color buffer1
2.pass: Render water to FBO with color buffer2
3.pass: Combine to result buffer (possibly framebuffer)
hmm yeah interesting... two problems that I would need to overcome then: how to
do multiple passes in OSg (possibly there is a tutorial for that)
but another problem is: I need to reuse the zbuffer from the terrain render for
the water render or else it will just render all water pixels, including the
onces hidden behind the hills of the terrain and such...
is that easy to do?
That's easy. Basically you can simply create multiple cameras, each with
the rendertargets below them.
If you add the same depth buffer texture to the passes it can be used
for reading and writing.
I don't have the examples at hand, but there is some multipass/offscreen
example.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57146#57146
_______________________________________________
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