 #endif
 
 uniform sampler2D u_skin;
+#define u_pixelate_half vec2(0.5,0.5) // TODO
 
 varying vec2 v_texCoord;
 
+#if defined(ENABLE_color) || defined(ENABLE_brightness)
 vec3 convertRGB2HSV(vec3 rgb)
 {
 	float maxRGB = max(max(rgb.r, rgb.g), rgb.b);

	}
	#endif // ENABLE_whirl

	gl_FragColor = texture2D(u_skin, texcoord0);

	// TODO: See if we can/should use actual alpha test.
	// Does bgfx offer a way to set u_alphaRef? Would that help?
	if (gl_FragColor.a == 0.0)
	{
		discard;

		}
		#endif // ENABLE_color

		#ifdef ENABLE_brightness
		hsv.b = clamp(hsv.b + u_brightness, 0.0, 1.0);
		#endif // ENABLE_brightness

		gl_FragColor.rgb = convertHSV2RGB(hsv);
	}
	#endif // defined(ENABLE_color) || defined(ENABLE_brightness)

	#ifdef ENABLE_ghost
	gl_FragColor.a *= u_ghost;
	#endif // ENABLE_ghost
}
