// Aliased checkboard pattern discarding "white"
// loosely based on orange book chapter 11.3
//
// texCoord comes from res://simpleshader_vert_txt, which is where a
// fragment-only GLSLObject gets its vertex stage.
#version 330 core

uniform sampler2D SimpleTexture;

in vec2 texCoord;
out vec4 fragColor;

void main() {
	vec4 tex_color = texture(SimpleTexture, texCoord);
	if (texCoord.x > .5) {
		if (texCoord.y > .5) {
			fragColor = tex_color;
		} else {
			discard;
		}
	} else {
		if (texCoord.y > .5) {
			discard;
		} else {
			fragColor = tex_color;
		}
	}
}
