<commit_before>#version 410

uniform sampler2D diffuse_texture;
uniform sampler2D opacity_texture;
uniform int has_diffuse_texture;
uniform int has_opacity_texture;

in VS_OUT {
	vec2 texcoord;
} fs_in;

out vec4 frag_color;

void main()
{
	float alpha = 1.0f;
	if (has_opacity_texture != 0) {
		alpha = texture(opacity_texture,
		                vec2(1.0f - fs_in.texcoord.x, fs_in.texcoord.y)).r;
		if (alpha == 0.0f)
			discard;
	}

	if (has_diffuse_texture != 0)
		frag_color = texture(diffuse_texture, fs_in.texcoord);
	else
		frag_color = vec4(1.0);

	frag_color *= alpha;
}<commit_msg>Remove the opacity texture and use the alpha from the diffuse<commit_after>#version 410

uniform sampler2D diffuse_texture;
uniform int has_diffuse_texture;

in VS_OUT {
	vec2 texcoord;
} fs_in;

out vec4 frag_color;

void main()
{
	if (has_diffuse_texture != 0) {
		frag_color = texture(diffuse_texture, fs_in.texcoord);
		if (frag_color.a < 0.2f)
			discard;
	} else {
		frag_color = vec4(1.0);
	}
}
{'fraction_non_alphanumeric': 0.10574018126888217, 'fraction_numerical': 0.03121852970795569, 'mean_word_length': 4.204188481675392, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7229650', 'n_tokens_mistral': 417, 'n_tokens_neox': 382, 'n_words': 91}