소스 검색

pre-C99; decrease epsilon

yakov 4 년 전
부모
커밋
b1947dd6cf
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      stb_truetype.h

+ 2 - 3
stb_truetype.h

@@ -4547,10 +4547,9 @@ STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float sc
    // invert for y-downwards bitmaps
    // invert for y-downwards bitmaps
    scale_y = -scale_y;
    scale_y = -scale_y;
 
 
-   // distance from singular values (in the same units as the pixel grid)
-   const float eps = 1./128, eps2 = eps*eps;
-
    {
    {
+      // distance from singular values (in the same units as the pixel grid)
+      const float eps = 1./1024, eps2 = eps*eps;
       int x,y,i,j;
       int x,y,i,j;
       float *precompute;
       float *precompute;
       stbtt_vertex *verts;
       stbtt_vertex *verts;