 
 #if 1
 		vec3 color_diff = abs(neighbor.xyz - center_color.xyz);
-		vec3 ycc = RGB2YCbCr(color_diff.xyz);		// SƂ̍YCbCrŌ
+		vec3 ycc = RGB2YCoCg(color_diff.xyz);		// SƂ̍YCbCrŌ
 		float cbcr_len = length(color_diff.yz);
 
 		// F傫قȂ鎞A臒lɎ܂͈͂ɐF␳č
 		if (cbcr_threshhold < cbcr_len) {
 			ycc = (cbcr_threshhold / cbcr_len) * ycc;
-			neighbor.rgb = center_color.rgb + YCbCr2RGB(ycc);
+			neighbor.rgb = center_color.rgb + YCoCg2RGB(ycc);
 		}
 #else
 		float lum0 = RGB2YCbCr(center_color.xyz).x;


	neighbor_sum /= 5.0;

	float lum = RGB2YCbCr(neighbor_sum.xyz).x;
	neighbor_sum.xyz = neighbor_sum.xyz / (1 - lum);

	oBuffer = neighbor_sum;
	oBuffer.a = 1;

	oScreen = oBuffer;
}

	vec3 YCbCr2B = { 1.0, 1.77200, 1.40200 };

	return vec3(dot(ycc, YCbCr2R), dot(ycc, YCbCr2G), dot(ycc, YCbCr2B));
}

// https://software.intel.com/en-us/node/503873
vec3 RGB2YCoCg(vec3 c)
{
	// Y = R/4 + G/2 + B/4
	// Co = R/2 - B/2
	// Cg = -R/4 + G/2 - B/4
	return vec3(
		c.x / 4.0 + c.y / 2.0 + c.z / 4.0,
		c.x / 2.0 - c.z / 2.0,
		-c.x / 4.0 + c.y / 2.0 - c.z / 4.0);
}

vec3 YCoCg2RGB(vec3 c)
{
	// R = Y + Co - Cg
	// G = Y + Cg
	// B = Y - Co - Cg
	return clamp(
		vec3(
			c.x + c.y - c.z,
			c.x + c.z,
			c.x - c.y - c.z),
		0, 1);
}

// http://graphicrants.blogspot.jp/2013/12/tone-mapping.html
vec3 map(vec3 clr)
{
	float lum = RGB2YCoCg(clr).x;
	return clr / (1 + lum);
}

vec3 unmap(vec3 clr)
{
	float lum = RGB2YCoCg(clr).x;
	return clr / (1 - lum);
}

vec3 clipAABB(
