[osg-users] osgText and shaders

Robert Osfield robert.osfield at gmail.com
Fri Aug 12 02:15:49 PDT 2016

Hi THomas,

On 10 August 2016 at 14:23, Thomas Francois
<thomas.francois at capgemini.com> wrote:
> In my application I got some text displayed using osgText::Text. I would like to alter this text using shaders. However, I wish to apply a different treatment to each letter individually.
> For now, I only managed to process the text as a whole.
> Is there a way to either distinguish the letters in the shader, or to link each letter to its own shader?

There isn't any support for this in osgText, non in GLSL within
specifically adding a vertex attribute.

The best way forward would be to create your own osg::Geometry
containing the required vertices and primitives to represent the text
as you want.


More information about the osg-users mailing list