View Full Version : about gl_Vertex to compute position...

04-15-2005, 09:58 AM
I try to practice GLSL in gl_Vertex

this is my test program
in http://stmail.fju.edu.tw/~a8851034/glutglsl3_test.rar link (http://stmail.fju.edu.tw/~a8851034/glutglsl3_test.rar)

I use gl_Vertex to comuter the fragment color.
If the gl_Vertex 's y value is <0
to use one color, else another.

But I see the result the color is not clear seperate...but smooth...

WHY? I don't understand....


04-15-2005, 11:50 AM
values get interpolated when they go from vertex->fragment
try doing the test in the fragment stage instead