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

	
	mat4 matViewT = transpose(mView);

	vec3 vWorldNormal = (mWorldIT * vec4(vNormal, 0.0)).xyz;
	vec3 vViewNormal  = (mView * vec4(vWorldNormal, 0.0)).xyz;
	vec4 vWorldPos    = mWorld * vPos;
	vec3 vNormViewPos  = normalize((mView * vWorldPos).xyz);
	

	
	mat4 matViewT = transpose(mView);

	vec3 vWorldNormal = (mat3(mWorldIT) * vNormal);
	vec3 vViewNormal  = (mat3(mView) * vWorldNormal);
	vec4 vWorldPos    = mWorld * vPos;
	vec3 vNormViewPos  = normalize((mView * vWorldPos).xyz);
	
	vec3 vReflect = reflect(vNormViewPos, vViewNormal);

  	matViewT[0][2] = -matViewT[0][2];
 	matViewT[1][2] = -matViewT[1][2];
  	matViewT[2][2] = -matViewT[2][2];
 	vReflect = (mat3(matViewT) * vReflect);
	vReflect.z = -vReflect.z; // Hack for gl 

	vOut = vReflect;
}

