#ifdef TRANSFORM

uniform mat3		TM3;

varying vec3		tc3;

#endif
varying float		distance;
varying vec2 		texcoord;	

void main()
{
	gl_Position = ftransform();
	distance=gl_Position.z;
	texcoord=gl_MultiTexCoord0.xy;	

#ifdef TRANSFORM

	vec3 tc=gl_MultiTexCoord0.xyz;
	tc.z=1.0;
	tc3 = TM3*tc;

#endif
}