[osg-users] Image from shader
Lucas Amparo
lucas.barbosa at fieb.org.br
Mon Oct 7 12:36:07 PDT 2019
Guys,
Thanks a lot for everyone.
To solve my problem, I need to add
Code:
...
// In the cpp OSG file
ss->addUniform(new osg::Uniform("uTextureMap", 0));
...
Code:
...
// On the vertex shader
gl_TexCoord[0] = gl_MultiTexCoord0;
...
Code:
...
// And this on the fragment shader
color_data = texture2D( uTextureMap, gl_TexCoord[0].st );
...
Now I'm facing problems to render the light on the image hehe
But it's scenes from the next chapter.
Thank you all, again.
Cheers,
Lucas
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76797#76797
More information about the osg-users
mailing list