Updated wiht OpenSceneGraph-Data/shader version that introduced use of textureLOD to reduce aliasing artifacts with SDF
This commit is contained in:
@@ -25,9 +25,11 @@ char text_sdf_frag[] = "$OSG_GLSL_VERSION\n"
|
||||
"\n"
|
||||
"#if __VERSION__>=130\n"
|
||||
" #define TEXTURE texture\n"
|
||||
" #define TEXTURELOD textureLod\n"
|
||||
" out vec4 osg_FragColor;\n"
|
||||
"#else\n"
|
||||
" #define TEXTURE texture2D\n"
|
||||
" #define TEXTURELOD texture2DLod\n"
|
||||
" #define osg_FragColor gl_FragColor\n"
|
||||
"#endif\n"
|
||||
"\n"
|
||||
@@ -68,7 +70,7 @@ char text_sdf_frag[] = "$OSG_GLSL_VERSION\n"
|
||||
"#ifdef SIGNED_DISTNACE_FIELD_SUPPORTED\n"
|
||||
"vec4 distanceFieldColor()\n"
|
||||
"{\n"
|
||||
" float center_alpha = TEXTURE(glyphTexture, texCoord).r;\n"
|
||||
" float center_alpha = TEXTURELOD(glyphTexture, texCoord, 0.0).r;\n"
|
||||
"\n"
|
||||
" float blend_width = 0.005;\n"
|
||||
" float distance_scale = 0.25;\n"
|
||||
|
||||
Reference in New Issue
Block a user