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

	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_Reflect(in mat4 mWorld, 

						   in vec3 vNormal,
						   out vec3 vOut)
{
	vec3 vWorldNormal = (mat3(mWorldIT) * vNormal);
	vec3 vViewNormal  = (mat3(mView) * vWorldNormal);

	vOut = vViewNormal;
}
