<div dir="ltr">You can use osg::VertexAttribDivisor (set to 1) to tell the shader to use one attribute index per instance.<div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Glenn Waldron</div></div></div></div>
<br><div class="gmail_quote">On Thu, Dec 22, 2016 at 12:35 PM, Andrew Cunningham <span dir="ltr"><<a href="mailto:andrewC@mac.com" target="_blank">andrewC@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On thinking about this issue, I see the problem. I really only have 4 vertices, so the value d in my vertex shader just is always pulled from locations 0-3 in my array. What I really need to do is access an array of offsets in my shader indexed by glInstanceID<br>
<span class=""><br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=69744#69744" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=69744#<wbr>69744</a><br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>