From: John Tsiombikas Date: Tue, 26 Jul 2016 18:59:22 +0000 (+0300) Subject: smoothstep for the horizon X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=commitdiff_plain;h=65fa35533b5f8e26b57a31d5972a7649d71ad684;ds=sidebyside smoothstep for the horizon --- diff --git a/sdr/skydome.p.glsl b/sdr/skydome.p.glsl index 62a3475..d774adc 100644 --- a/sdr/skydome.p.glsl +++ b/sdr/skydome.p.glsl @@ -14,7 +14,7 @@ void main() vec3 color = sky_grad(ty, mid_point); float horiz = ty + fbm(tx * horiz_scale, 4, horiz_scale) * 0.035; - color = mix(fog_color, color, step(0.035, horiz)); + color = mix(fog_color, color, smoothstep(0.034, 0.035, horiz)); gl_FragColor.rgb = color; gl_FragColor.a = 1.0; diff --git a/src/main.cc b/src/main.cc index 942db47..7e700a6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -18,7 +18,7 @@ int main(int argc, char **argv) } SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 1); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1); int x = SDL_WINDOWPOS_UNDEFINED;