diff --git a/world.js b/world.js index f238c7c..db31e06 100644 --- a/world.js +++ b/world.js @@ -44,8 +44,8 @@ varying lowp float vDistance; void main() { highp vec4 color = texture2D(uSampler, vTextureCoord); - lowp float fogamount = smoothstep(30.0, 90.0, vDistance); - gl_FragColor = vec4(mix(vLighting * color.rgb, uFogColor, fogamount), color.a); + lowp float fogamount = smoothstep(40.0, 100.0, vDistance); + gl_FragColor = mix(vec4(vLighting * color.rgb, color.a), vec4(uFogColor, 1.0), fogamount); } `;