[osg-users] blending with shader

David Heitbrink david-heitbrink at uiowa.edu
Mon Oct 3 12:27:32 PDT 2016

You should be able to grab the state set in the pre-render callback and bind your image for blending + add any uniforms you need there. You will want to pick a texture level that you are not going to use rendering your scene. You will also need to bind your shader the the scene as well. 

One thing you might consider if you are using a NVidia Quardro card, is they do have API for warping and blending which will work at the driver level, so you will not make any coding changes with your application to use it:


I think ATI has something similar for there professional cards as well but I am not familiar with them. 

One thing you will likely run into problems with if you do not use a professional card is dealing with sync. From past experience we have had two identical displays attached to the same video card not run at the same, and have had different vertical syncs on each display. Having the vertical syncs different on each display can lead to tear lines in your blend regions.
Also there a few companies like Scalable Display (Http://www.scalabledisplay.com/) that have warping + blending software.

What I have done for warping and blending is to write my own Shader for doing blending, and then to use the API I mentioned above for the warping. We did our own blending to deal with the gamma curve for the projectors.

Read this topic online here:

More information about the osg-users mailing list