Font fixes;

This commit is contained in:
bjorn 2017-07-18 21:48:08 -07:00
parent d8047cdeff
commit abaecb7f60
2 changed files with 3 additions and 0 deletions

View File

@ -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)

View File

@ -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"
"}";