Hi,
I'm getting odd behavior with a vertex shader. The following
pseudo-code snippets do not produce the same results. Can anyone tell
me why?
Program 1:
//Outside the shader, set a shader attribute to negative offset.
vertex_shader_attribute = -offset;
...
//Then in the shader, set temp to the attribute.
temp = vertex_shader_attribute;
Program 2:
//Outside the shader, set a shader attribute to the vertex x
minus an offset
vertex_shader_attribute = vertex.x - offset;
...
//Then in the shader, set temp to attribute minus gl_Vertex x.
temp = vertex_shader_attribute - gl_Vertex.x;
The "temp" should be set to -offset in both cases, but I'm not seeing
the same behavior in my app. The "temp" value is the only thing that
changes between programs.
Is gl_Vertex equal to the vertex passed into geom->setVertexArray()?
Thanks,
Mike
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org