 
 
 
-void getColor(out vec3 color, out vec3 normal) {
+void getColor(vec2 uv, out vec3 color, out vec3 normal) {
 
 	//DEBUG
 	//color = vec3(i.uv.x, 0, 0); return;

	float amount;

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

	if(a>2) return 2;
	return 1;
}
int tessLevel(float d1, float d2) {		
	float d=(d1+d2)/2;
	//float r=clamp((1/d)*(keyIK*10), 1, 64);
	//float r=clamp((1/d)*(100.0), 1, 64);
	float r=clamp(100/d, 1, 64);
	return closestPowerOf2(r);
}

