<commit_before>#ifdef GL_ES
#define LOWP lowp
    precision mediump float;
#else
    #define LOWP
#endif

varying vec2 v_uv;

uniform float u_rotation;
uniform sampler2D u_texture;
uniform sampler2D u_textureClouds;

const float u_mercator_fov = 2.5;
const float u_cloud_limit = 0.4;

void main() {
	vec2 pos = 2.0*v_uv - 1.0;
	if (length(pos) > 1.)
		discard;
	vec3 normal = vec3(pos, inversesqrt(1-dot(pos, pos)));
	vec3 sun = vec3(0., cos(u_rotation), sin(u_rotation));

	float lat = asin(pos.x);
	float lon = asin(pos.y/cos(lat)) - u_rotation;
	lat -= 0.1;

	float x = -lon / (2.*3.1415926535);
	float y = 0.5 + 0.5 * tan(lat) / tan(u_mercator_fov * 0.5);

	float color = smoothstep(0.4, 0.5, texture(u_texture, vec2(x, y)).r);
	float cloud = texture(u_textureClouds, vec2(x, y)).r;


	float diffuse = dot(normal, sun);
	float specular = exp(-1. + dot(sun, reflect(vec3(0, 0, 1), normal)));

	vec4 ground = mix(diffuse * vec4(0.22, 0.37, 0.05, 1), (diffuse+specular) * vec4(0.05, 0.25, 0.75, 1), color);
	vec4 cloudcolor = vec4(cloud);
	gl_FragColor = mix(ground, cloudcolor, smoothstep(u_cloud_limit-0.1, u_cloud_limit+0.5, cloud));
}
<commit_msg>aoetu<commit_after>#ifdef GL_ES
#define LOWP lowp
    precision mediump float;
#else
    #define LOWP
#endif

varying vec2 v_uv;

uniform float u_rotation;
uniform sampler2D u_texture;
uniform sampler2D u_textureClouds;

const float u_mercator_fov = 2.5;
const float u_cloud_limit = 0.4;

void main() {
	vec2 pos = 2.0*v_uv - 1.0;
	if (length(pos) > 1.)
		discard;
	vec3 normal = vec3(pos, inversesqrt(1.-dot(pos, pos)));
	vec3 sun = vec3(0., cos(u_rotation), sin(u_rotation));

	float lat = asin(pos.x);
	float lon = asin(pos.y/cos(lat)) - u_rotation;
	lat -= 0.1;

	float x = -lon / (2.*3.1415926535);
	float y = 0.5 + 0.5 * tan(lat) / tan(u_mercator_fov * 0.5);

	float color = smoothstep(0.4, 0.5, texture(u_texture, vec2(x, y)).r);
	float cloud = texture(u_textureClouds, vec2(x, y)).r;


	float diffuse = clamp(dot(normal, sun), 0., 1.);
	float specular = exp(-1. + dot(sun, reflect(vec3(0., 0., 1.), normal)));

	vec4 ground = mix(diffuse * vec4(0.22, 0.37, 0.05, 1), clamp(diffuse+specular, 0., 1.) * vec4(0.05, 0.25, 0.75, 1), color);
	vec4 cloudcolor = vec4(cloud);
	gl_FragColor = mix(ground, cloudcolor, smoothstep(u_cloud_limit-0.1, u_cloud_limit+0.5, cloud));
}

{'fraction_non_alphanumeric': 0.16838487972508592, 'fraction_numerical': 0.06958762886597938, 'mean_word_length': 4.118681318681318, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7297716', 'n_tokens_mistral': 1081, 'n_tokens_neox': 997, 'n_words': 240}