[osg-users] Tearing hair out over simple GLSL instancing
Glenn Waldron
gwaldron at gmail.com
Thu Dec 22 11:38:02 PST 2016
You can use osg::VertexAttribDivisor (set to 1) to tell the shader to use
one attribute index per instance.
Glenn Waldron
On Thu, Dec 22, 2016 at 12:35 PM, Andrew Cunningham <andrewC at mac.com> wrote:
> 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
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69744#69744
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161222/2e7e4d4a/attachment-0003.htm>
More information about the osg-users
mailing list