From abaecb7f60e7e192c8d39d8349f6e05ea26cf801 Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 18 Jul 2017 21:48:08 -0700 Subject: [PATCH] Font fixes; --- CMakeLists.txt | 2 ++ src/graphics/shader.c | 1 + 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4e12445..d9b70647 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,9 @@ else() endif() # MSDF +set(BUILD_SHARED_LIBS OFF) add_subdirectory(deps/msdfgen lib_msdfgen) +set(BUILD_SHARED_LIBS ON) include_directories(deps/msdfgen) set(LOVR_MSDF lib_msdfgen) diff --git a/src/graphics/shader.c b/src/graphics/shader.c index 1c7a0c3d..590bfb13 100644 --- a/src/graphics/shader.c +++ b/src/graphics/shader.c @@ -75,6 +75,7 @@ const char* lovrFontFragmentShader = "" " float sdf = median(sample.r, sample.g, sample.b); \n" " float w = fwidth(sdf); \n" " float alpha = smoothstep(.5 - w, .5 + w, sdf); \n" +" if (alpha < .001) { discard; } \n" " return vec4(graphicsColor.rgb, alpha); \n" "}";