Re: [osg-users] osgText - fragment shader - font texture

2010-03-25 Thread Yuriy A Rudomyotov
Hi, Farshid Lashkari Thank you very much. Cheers, Yuriy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26117#26117 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] osgText - fragment shader - font texture

2010-03-24 Thread Yuriy A Rudomyotov
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

Re: [osg-users] osgText - fragment shader - font texture

2010-03-24 Thread Farshid Lashkari
Hi Yuriy, The default freetype font uses alpha textures, so only the alpha component of the texture contains the font data. Here is a basic fragment shader that should work with the freetype font plugin: uniform sampler2D bitmap; void main() { gl_FragColor = texture2D(bitmap,