[osg-users] Tearing hair out over simple GLSL instancing

Andrew Cunningham osg at a-cunningham.com
Thu Dec 29 13:23:52 PST 2016

Hi guys,
Can you help me out with this one more time:)

As I said, I am now able to draw my geometry ( a simple square) using hardware instancing. It works perfectly with excellent performance for millions of squares- except for one thing.  

Now I want to light the squares. I have turned on lighting, assigned a normal array to the geometry being instanced and assigned material colors, but I get  unlit 'black squares' while the rest of my scene is lit just fine. Clearly something to do with hardware instancing using the vertex shader.

Do I need to add a fragment shader? I am a bit lost here.

Read this topic online here:

More information about the osg-users mailing list