[osg-users] Image from shader

Lucas Amparo lucas.barbosa at fieb.org.br
Mon Oct 7 06:38:52 PDT 2019


AnyOldName3 wrote:
> Hi,
> 
> The name texUnit0 comes from the shader, which you're providing. The texture unit index (which my example snippet sets to 0) comes from your scene graph, which you said came from osgOcean, and will almost certainly be 0 for a diffuse map. If I was trying to check that, I'd run the application through APITrace and see which units have textures bound to them during the draw calls for the meshes I'm interested in, but that might not be the simplest approach.
> 
> Cheers,
> Chris


Chris, I've achieved an improvement, using your approach.

I've looking for a variable on osgocean and find uTextureMap.

But, some textures on the model wasn't loaded yet. It isn't correct yet but is a little step forward. Thanks a lot.

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




Attachments: 
http://forum.openscenegraph.org//files/captura_de_tela_de_2019_10_07_10_35_58_121.png




More information about the osg-users mailing list