mirror of https://github.com/bjornbytes/lovr.git
Font fixes;
This commit is contained in:
parent
d8047cdeff
commit
abaecb7f60
|
@ -90,7 +90,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# MSDF
|
# MSDF
|
||||||
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
add_subdirectory(deps/msdfgen lib_msdfgen)
|
add_subdirectory(deps/msdfgen lib_msdfgen)
|
||||||
|
set(BUILD_SHARED_LIBS ON)
|
||||||
include_directories(deps/msdfgen)
|
include_directories(deps/msdfgen)
|
||||||
set(LOVR_MSDF lib_msdfgen)
|
set(LOVR_MSDF lib_msdfgen)
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ const char* lovrFontFragmentShader = ""
|
||||||
" float sdf = median(sample.r, sample.g, sample.b); \n"
|
" float sdf = median(sample.r, sample.g, sample.b); \n"
|
||||||
" float w = fwidth(sdf); \n"
|
" float w = fwidth(sdf); \n"
|
||||||
" float alpha = smoothstep(.5 - w, .5 + w, sdf); \n"
|
" float alpha = smoothstep(.5 - w, .5 + w, sdf); \n"
|
||||||
|
" if (alpha < .001) { discard; } \n"
|
||||||
" return vec4(graphicsColor.rgb, alpha); \n"
|
" return vec4(graphicsColor.rgb, alpha); \n"
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue