- vec3 lightColor = vec3(1.0);
- vec3 fogColor = mix(vec3(0x03, 0x0A, 0x1A), vec3(0x87, 0xCE, 0xEB), daylight) / vec3(0xFF);
-
- float ambientStrength = mix(0.3, 0.7, daylight);
-
- vec3 ambient = ambientStrength * lightColor;
- vec3 diffuse = 0.3 * daylight * clamp(dot(normalize(fragmentNormal), normalize(lightDir)), 0.0, 1.0) * lightColor;
-
- vec3 light = ambient + diffuse;
-
- outColor = texture(textures[int(fragmentTextureIndex + 0.5)], fragmentTextureCoords) * vec4(fragmentColor, 1.0) * vec4(light, 1.0);
- outColor.rgb = mix(outColor.rgb, ambientStrength * fogColor, clamp(length(fragmentPosition - cameraPos) / 255.0, 0.0, 1.0));
+ outColor = texture(textures[int(fragmentTextureIndex + 0.5)], fragmentTextureCoords) * vec4(fragmentColor, 1.0);
+ outColor.rgb = mix(outColor.rgb, fogColor, clamp(length(fragmentPosition - cameraPos) / 255.0, 0.0, 1.0));