 	return exp(-(abs(diff)-eps)*500.0);
 }
 
+
 float noiz3(float x, float y, float z)
 {
 	float u = 121.12421 * (1.0+x);

	float diff = (dn - d0) + eps;
	return exp(-abs(diff) * 700.0);
}

float contrib(float d0, float dn)
{

		result = vec4(color0.rgb, 1.0);
	}
#elif 0
	float mixalpha = 0.5;

	float CR = color0.r;
	float CG = color0.g;
	float CB = color0.b;

	float CY = 0.299*CR + 0.587*CG + 0.114*CB;
	float CU = (CB-CY)*0.565;
	float CV = (CR-CY)*0.713;
	
	//nois = noiz3(abs(gl_TexCoord[0].y-0.5), 0.21, 0.91);
	//CY = (0.98 + 0.04 * nois) * max(CY*(pow(1.3*ao_, 3.5)), CY) + 0.05*bloom;
	//CY = max(CY*(pow(1.3*ao_, 3.5)), CY) + 0.05*bloom;
	//CY = min(CY, CY * pow(1.3*ao_, 3.5)) + 0.05*bloom;
	CY = (CY * pow(1.3*ao_, 1.0)) + 0.1*bloom;

	CR = CY + 1.403*CV;
	CG = CY - 0.344*CU - 0.714*CV;
	CB = CY + 1.770*CU;

	color0.r = CR;
	color0.g = CG;
	color0.b = CB;

	vec4 result = vec4(color0.rgb, 1.0);
	if (!true && gl_TexCoord[0].x < 0.5) {
		result = vec4(vec3(pow(1.3*ao_, 1.0)), 1.0);
	}
#elif 1
	float mixalpha = 0.5;
	vec4 result = vec4(1.0 * color0.rgb - pow(ao, 3.5)*0.7, 1.0);
	result = mix(result, vec4(vec3(pow(ao_, 3.5)), 3.0), mixalpha);
