#version 120 void foggify(vec3 player_pos, vec3 pos) { gl_FragColor = mix(gl_FragColor, gl_Fog.color, pow(length(player_pos - pos)/100, 5)); if(player_pos.y < 30 - 1.7) gl_FragColor = mix(gl_FragColor, vec4(0, .3, .8, 0), .7); } /* vim: set syn=glsl: */