[osg-users] pass mat4 as attribute for glsl
Cong Ye
sirian_ye at hotmail.com
Mon Nov 26 20:58:31 PST 2018
Hi,
I am currently working on a project requires gpu instancing. I worked out a way to do the instancing with vec4 as position attribute in. However, in the real case, instances need to be scaled/rotated/translated. Now, I want to send the transform matrix as an attribute to the shader. Normally, general opengl uses glVertexAttribPointer with offset and glVertexAttribDivisor to sperate mat4 to vec4 then pass to the shader. However, I don't find the replacement function to do the offset data structure pass. Could someone enlighten me about it, please?
thanks very much!
...
Thank you!
Cheers,
Cong
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75249#75249
More information about the osg-users
mailing list