 				   in float f,
 				   out vec4 t)
 {
-	t = texture(s, f);
+	t = texture1D(s, f);
 }
 
 //-----------------------------------------------------------------------------

						   in vec3 vNormal,
						   out vec3 vOut)
{
	vec3 vWorldNormal = (mWorldIT * vec4(vNormal, 1.0)).xyz;
	vec3 vViewNormal  = (mView * vec4(vWorldNormal, 1.0)).xyz;
	
	vOut = (mTexture * vec4(vViewNormal, 1.0)).xyz;
}
//-----------------------------------------------------------------------------
void FFP_GenerateTexCoord_EnvMap_Sphere(in 	mat4 mWorld,
										in 	mat4 mView,
										in 	mat4 mWorldIT,
										in 	vec4 vPos,
										in 	vec3 vNormal,
										out vec2 vOut)
{
	mat4 worldview = mView * mWorld;
	vec3 normal = normalize( (mWorldIT * vec4(vNormal,0.0)).xyz); 
	vec3 eyedir =  normalize(worldview * vPos).xyz;
	vec3 r = reflect(eyedir, normal);
	float two_p = 2.0 * sqrt( r.x *  r.x +  r.y *  r.y +  (r.z + 1) *  (r.z + 1));
	vOut = vec2(0.5 + r.x / two_p,0.5 - r.y / two_p);
}
//-----------------------------------------------------------------------------
void FFP_GenerateTexCoord_EnvMap_Sphere(in 	mat4 mWorld,

	float two_p = 2.0 * sqrt( r.x *  r.x +  r.y *  r.y +  (r.z + 1) *  (r.z + 1));
	vOut = (mTexture * vec4(0.5 + r.x / two_p,0.5 - r.y / two_p,0,0)).xy;
}
//-----------------------------------------------------------------------------
void FFP_GenerateTexCoord_EnvMap_Sphere(in 	mat4 mWorld,
										in 	mat4 mView,
										in 	mat4 mWorldIT,
										in 	vec4 vPos,
										in 	vec3 vNormal,
										out vec2 vOut)
{
	mat4 worldview = mView * mWorld;
	vec3 normal = normalize( (mWorldIT * vec4(vNormal,0.0)).xyz); 
	vec3 eyedir =  normalize(worldview * vPos).xyz;
	vec3 r = reflect(eyedir, normal);
	float two_p = 2.0 * sqrt( r.x *  r.x +  r.y *  r.y +  (r.z + 1) *  (r.z + 1));
	vOut = vec2(0.5 + r.x / two_p,0.5 - r.y / two_p);
}

//-----------------------------------------------------------------------------
void FFP_GenerateTexCoord_EnvMap_Reflect(in mat4 mWorld, 
