Hi,
I try to use shaders with osgText to make some effects with text. But how I can
set up uniform variable with font texture to process it in fragment shader? Or
may be I should do something another to have result?
Primitive fragment shader:
Code:
uniform sampler2D bitmap;
varying vec2 texelCoord;
void main( void )
{
gl_FragColor = vec4( texture2D( bitmap, texelCoord ) );
}
Code which sets the variable:
Code:
//...
osg::Uniform* bitmap = new osg::Uniform("bitmap", osg::Uniform::SAMPLER_2D);
bitmap->set(??);
text->getOrCreateStateSet()->addUniform(bitmap);
//...
Thank you!
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26059#26059
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org