Am 08.11.2013 16:04, schrieb Bram Vaessen:
You're mixing up source and destination. Source is the incoming color
(i.e. the color written in the shader), destination the color in the
buffer (i,e, what was already in the target buffer).
you are right, the word destination also makes more sense then :)
I asked this a while ago. There is no function prototype, so it has to
be added to the extensions somehow I guess....
I got this in a respons on the open gl forums: "If you don't need real blending for
the buffers you do want to write to, you can simply enable and disable blending for each
buffer (requires EXT_draw_buffers2, or GL3.0)"
is that the extension? or actually that seems like it's only about disabling
certain buffers (which would be great for my purpose)
EXT_ ist an extension ;-) We'll have to find someone more experienced
with the OSG extension mechanism to help implementing this into OSG.
If I got this correctly, you have your terrain-buffer in one texture and
your water result in another. hen you don't need hw-blending to combine
them.
No and yes, indeed I do not need or use any Hw blending in the final shader, I
just use mix() etc. in that shader, that is no problem.
But I don't have the writing to seperate buffers working yet, as I described
above, but it might be just that I need to activate the correct blending mode
for all buffers as you said, and use a vec(0,0,0,0) as output when I want to
leave a buffer as is.
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)
But seriously, this seems a lot to swallow given your just starting to
use OSG/OpenGL. Start off with a simpler example to get the blending
things right ;-)
I know what you mean, I do tend to disable almost all stuff in the shaders when
I start working with something new, so I experiment with very simple shaders to
investigate what is exactly happening :)
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57144#57144
_______________________________________________
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