<div dir="ltr">Hi Ekaterina,<div>seems to me it is working properly, although it does not give you the result you want. </div><div>The black surrounding is just a combination of the texture coordinates going out of range combined with a CLAMP_TO_BORDER wrapping.</div><div><br></div><div>the numbers in <span style="font-size:12.8px">gl_TextureMatrix[1] are the texture units - the same number passed setTextureAttibutesAndModes</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Regards, Laurens.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 21, 2016 at 3:57 PM, Ekaterina Fokina <span dir="ltr"><<a href="mailto:ekaterina.fokina@tum.de" target="_blank">ekaterina.fokina@tum.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
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?<br>
<br>
I have found an examle in internet:<br>
<a href="http://jotschi.de/2009/05/31/projective-textures-with-openscenegraph/" rel="noreferrer" target="_blank">http://jotschi.de/2009/05/31/<wbr>projective-textures-with-<wbr>openscenegraph/</a><br>
<br>
But unfortunatelly, It is not working properly and I can see my projection on the terrain, but the rest of it is black.<br>
<br>
One more question, does anybody can explain to me what is the difference between the numbers in gl_TextureMatrix[0...7]?<br>
<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Ekaterina<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=69726#69726" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=69726#<wbr>69726</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>