[osg-users] Image from shader

Chris Djali krizdjali at gmail.com
Fri Oct 4 11:09:18 PDT 2019


Hi,

OSGOcean is probably setting up the necessary fixed-function stuff to put its texture in texture unit zero, but you'll need to tell the fragment shader that its texUnit0 uniform refers to that texture unit. It should be enough just to add a uniform to the same stateset as you're adding your shader that sets texUnit0 to 0 e.g.

Code:
stateSet->addUniform(new osg::Uniform("texUnit0", 0));



Cheers,
Chris

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







More information about the osg-users mailing list