[osg-users] Shaders with multiple views using ViewportCallback

Christoph Dohmen christoph.dohmen at cae.de
Wed May 9 02:20:58 PDT 2018


Hi all,

I need to use the viewport dimensions for some calculations in my vertex shader. The most found way of doing the update of the viewport-size uniform is the ViewportCallback derived from osg::Uniform::Callback which encapsulates a camera.
But what happens if I have multiple views?
How can I fetch the viewport size in my shader per viewer?

Thank you!

Cheers,
Christoph

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73573#73573







More information about the osg-users mailing list