 	float amount;
 
 #define ADD_BIOME(ID, CHANNEL) \
-	amount = getChannel(texture2D(param_biomesSplatMap##ID##, i.uv), CHANNEL); \
+	amount = getChannel(texture2D(param_biomesSplatMap##ID##, uv), CHANNEL); \
 	if(amount > 0) { \
 		color += amount * getBiomeColor(param_biome##ID##CHANNEL##_diffuseMap); \
 		if(calculateNormal) \




void getColor(out vec3 color, out vec3 normal) {

	//DEBUG
	//color = vec3(i.uv.x, 0, 0); return;

	float d1=distance(i[1].worldPos,vec3(0));
	float d2=distance(i[2].worldPos,vec3(0));	

	gl_TessLevelOuter[0] = tessLevel(d1,d2);
	gl_TessLevelOuter[1] = tessLevel(d0,d2);
	gl_TessLevelOuter[2] = tessLevel(d0,d1);
	//gl_TessLevelOuter[3] = tess;

	gl_TessLevelInner[0] = gl_TessLevelOuter[2];
