Hi Conan,
Are you sure your model has colors?
Also please try to set fragData to a fixed value to see if the shader is
working at all (I somehow miss the layout like layout (location=0) out
vec4 fragData;)
Secondly I'd rather set something like: fragData = vec4(color.rgb,1.0)
to rule out any blending.
Cheers
Sebastian
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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org