Hi,

I am trying to mod the shaders in osgsimplegl3 so that the color is passed 
through using osg_Color... My code is as follows:


Code:


// VERTEX SHADER
#version 140
uniform mat4 osg_ModelViewProjectionMatrix;
in vec4 osg_Color;
in vec4 osg_Vertex; 
out vec4 color;
void main() 
{ 
color = osg_Color;
gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
} 

// FRAGMENT SHADER
#version 140
in vec4 color;
out vec4 fragData;
void main()
{ 
fragData = color;
} 




All I see is a black screen though.  What is the proper use of osg_Color?

... 

Thank you!

Cheers,
Conan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=58471#58471





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to