Hi Ekaterina, seems to me it is working properly, although it does not give you the result you want. The black surrounding is just a combination of the texture coordinates going out of range combined with a CLAMP_TO_BORDER wrapping.
the numbers in gl_TextureMatrix[1] are the texture units - the same number passed setTextureAttibutesAndModes Regards, Laurens. On Wed, Dec 21, 2016 at 3:57 PM, Ekaterina Fokina <[email protected]> wrote: > Hello, > > I am trying to understand how to project a texture on a specific part of > the terrain. There are many examples how to project a texture on a whole > object, but not to a part of the oblect. That means the question is how to > specify texture coordinates (using the shader) on order to project a > texture on a right place? > > I have found an examle in internet: > http://jotschi.de/2009/05/31/projective-textures-with-openscenegraph/ > > But unfortunatelly, It is not working properly and I can see my projection > on the terrain, but the rest of it is black. > > One more question, does anybody can explain to me what is the difference > between the numbers in gl_TextureMatrix[0...7]? > > > Thank you! > > Cheers, > Ekaterina > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69726#69726 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

