[osg-users] Trouble with a simple shader program.

Şan Güneş sgunes at 350.su
Sun Apr 12 04:46:45 PDT 2015


Hello Alexander,

On 11/04/2015 20:21, Alexander Wieser wrote:
> Vertex Shader
>
> Code:
>
> #version 430
>
> uniform mat4 osg_ModelViewProjectionMatrix;
> in vec4 osg_Vertex;
>
> void main() {
> gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
> }

I don't remember using anything that starts with osg_* in the vertex
shader code that I have used with OSG.
You can try using the built-in uniforms of the OpenGL, like "gl_Position
= gl_ModelViewProjectionMatrix * gl_Vertex;" or simply "gl_Position =
ftransform();"

If you have the "OpenSceneGraph 3 Cookbook", you can refer to the point
cloud example there.



More information about the osg-users mailing list