void ftexgen( in vec4 ecPosition )
{
/*
    gl_TexCoord[0].s = dot( ecPosition, gl_EyePlaneS[0] );
    gl_TexCoord[0].t = dot( ecPosition, gl_EyePlaneT[0] );
    gl_TexCoord[0].p = dot( ecPosition, gl_EyePlaneR[0] );
    gl_TexCoord[0].q = dot( ecPosition, gl_EyePlaneQ[0] );
*/
    gl_TexCoord[0]   = gl_TextureMatrix[0] * ecPosition;
}

void main (void)
{
    vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
    gl_Position = ftransform();
    ftexgen( ecPosition );
    gl_TexCoord[ 1 ] = gl_MultiTexCoord1;
}
