[osg-users] Image from shader

Lucas Amparo lucas.barbosa at fieb.org.br
Mon Oct 7 05:14:50 PDT 2019


AnyOldName3 wrote:
> 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


Chris, do you know some way to "debug" the variables to find the right name used on this texture?
I'll try your approach and come back with the result.

Thanks a lot.

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







More information about the osg-users mailing list