]> git.lizzy.rs Git - dragonblocks_alpha.git/blobdiff - shaders/3d/fragment.glsl
Add configuration files for client and server
[dragonblocks_alpha.git] / shaders / 3d / fragment.glsl
index 653d579d3c372aa9ac3b322d2d6d2ce38fad5ae8..58b06bd0986fb35a79e1d378609735c04217ef38 100755 (executable)
@@ -13,7 +13,7 @@ uniform sampler2D textures[MAX_TEXTURE_UNITS];
 void main()
 {
        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));
+       outColor.rgb = mix(outColor.rgb, fogColor, clamp(length(fragmentPosition - cameraPos) / RENDER_DISTANCE, 0.0, 1.0));
 
        if (outColor.a == 0.0)
                discard;