[osg-users] Tearing hair out over simple GLSL instancing
Gedalia Pasternak
gpasternak at mak.com
Thu Dec 22 11:15:18 PST 2016
you might want to look into glVertexAttribDivisor
https://www.opengl.org/sdk/docs/man4/html/glVertexAttribDivisor.xhtml
That would let you make a vbo with 100 offsets in it and then each
instanced draw call would get a different offset.
you can even send down a 4x3 transform matrix by using more attributes.
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
>
--
DI-Guy Engineering Lead, VT MÄK
150 Cambridge Park Drive, 3rd Floor, Cambridge, MA 02140
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161222/8b81f4c7/attachment-0002.htm>
More information about the osg-users
mailing list