Hi, everybody!

I have a terrain, generated using a data texture and a vertex shader. It is coloured according to the altitude by the fragment shader. I want to make a polar grid overlaid over the terrain, so that the lines of the grid follow the mountains, etc. I have tried to paint vertices with specific coordiantes in separate colours. It works very well for gl_Vertex.x = 0 (+/-1.5) - it gives me a nicely red coloured y-axis. But gl_Vertex.y = 0 does not give me a coloured horizontal axis, instead, it gives me a coloured curved line. I made a sketch, to visualize the problem (this is the terrain from a bird's eye).

I take the values for gl_Vertex right in the beginning of the main() in the Vertex shader, so the vertices have not been processed yet. And I am using the default Modelview and Projection matrices.

So does anybody have an idea where might the problem be. Could it be in the default Modelview or Projection matrix?

Click image for larger version. 

Name:	Curved abscissa.JPG 
Views:	263 
Size:	10.7 KB 
ID:	815