<commit_before>#version 430 core

layout (points) in;
layout (triangle_strip, max_vertices = 4) out;

out vec2 UV;

uniform mat4 viewProjectionMatrix;

uniform float textureIndex;
uniform float textureAtlasRows;

void main(void)
{
	float atlasColumn = mod(textureIndex, textureAtlasRows);
    float atlasRow = floor(textureIndex/textureAtlasRows);
	
	float atlasIndexOffset = 1.0/textureAtlasRows;
    vec2 atlasCoordOffset = vec2(atlasColumn*atlasIndexOffset, atlasRow*atlasIndexOffset);

    int i = 0;
    int points = 0;

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(0.0, 0.0, 0.0, 1.0));
	UV = vec2(0,0.25);
	EmitVertex();

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(0.0, 1.0, 0.0, 1.0));
	UV = vec2(0,0);
	EmitVertex();

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(1.0, 0.0, 0.0, 1.0));
	UV = vec2(0.25,0.25);
	EmitVertex();

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(1.0, 1.0, 0.0, 1.0));
	UV = vec2(0.25,0);
	EmitVertex();

	EndPrimitive();
}<commit_msg>Geometry shader working for texture UV's.<commit_after>#version 430 core

layout (points) in;
layout (triangle_strip, max_vertices = 4) out;

out vec2 UV;

uniform mat4 viewProjectionMatrix;

uniform float textureIndex;
uniform float textureAtlasRows;

void main(void)
{
	float atlasColumn = mod(textureIndex, textureAtlasRows);
    float atlasRow = floor(textureIndex/textureAtlasRows);
	
	float atlasIndexOffset = 1.0/textureAtlasRows;
    vec2 atlasCoordOffset = vec2(atlasColumn*atlasIndexOffset, atlasRow*atlasIndexOffset);

    int i = 0;
    int points = 0;

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(0.0, 0.0, 0.0, 1.0));
	UV = vec2(atlasCoordOffset.x+atlasIndexOffset, atlasCoordOffset.y);
	EmitVertex();

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(0.0, 1.0, 0.0, 1.0));
	UV = vec2(atlasCoordOffset.x, atlasCoordOffset.y);
	EmitVertex();

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(1.0, 0.0, 0.0, 1.0));
	UV = vec2(atlasCoordOffset.x+atlasIndexOffset, atlasCoordOffset.y+atlasIndexOffset);
	EmitVertex();

	gl_Position = viewProjectionMatrix * (gl_in[i].gl_Position + vec4(1.0, 1.0, 0.0, 1.0));
	UV = vec2(atlasCoordOffset.x + atlasIndexOffset, atlasCoordOffset.y);
	EmitVertex();

	EndPrimitive();
}
{'fraction_non_alphanumeric': 0.1377245508982036, 'fraction_numerical': 0.05132591958939264, 'mean_word_length': 5.171503957783641, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7039474', 'n_tokens_mistral': 951, 'n_tokens_neox': 897, 'n_words': 182}