varying vec3 vpos; void main() { gl_Position = ftransform(); vpos = (gl_ModelViewMatrix * gl_Vertex).xyz; gl_TexCoord[0].xy = gl_Vertex.xz * 500.0; }