[osg-users] passing uniforms to compute shader

Mary-Ann Zorra rebebaba2 at gmail.com
Mon Oct 24 07:24:10 PDT 2016

Hi everyone, 

I am trying to write a functional compute shader, but the uniforms dont't want to work. 
I have a compute and a usual shader program currently. The compute shader has to write a texture, which can be read by the usual shader. This part works fine. But I would like to pass some (custom) uniforms (lights, amount of the light sources, projection/view matrix etc.). I use the same method by the two shaders, , but the data seems to arrive only by the usual shader program. 
I thought something could be wrong with the compute shader, but the texture data is there, so the communication is working. Should I pass the uniforms in an other way, when I have to send data to a compute shader? I can't figure it out, where is the mistake... 

Thanks a lot  :)

Read this topic online here:

More information about the osg-users mailing list