diff options
Diffstat (limited to 'res/effectlib/distancefieldtext_dropshadow.frag')
-rw-r--r-- | res/effectlib/distancefieldtext_dropshadow.frag | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/effectlib/distancefieldtext_dropshadow.frag b/res/effectlib/distancefieldtext_dropshadow.frag index fdb68ba..2f6c9be 100644 --- a/res/effectlib/distancefieldtext_dropshadow.frag +++ b/res/effectlib/distancefieldtext_dropshadow.frag @@ -25,8 +25,8 @@ void main() #ifdef use_fallback highp float shadowAlpha = smoothstep(alphas.x, alphas.y, shadowDistance); #else - highp float shadowDistanceD = fwidth(shadowDistance); - highp float shadowAlpha = smoothstep(0.5 - shadowDistanceD, 0.5, shadowDistance); + highp float shadowDistanceD = fwidth(shadowDistance) * 0.5; + highp float shadowAlpha = smoothstep(0.5 - shadowDistanceD, 0.5 + shadowDistanceD, shadowDistance); #endif highp vec4 shadowPixel = color * shadowColor * shadowAlpha; @@ -38,8 +38,8 @@ void main() #ifdef use_fallback highp float textAlpha = smoothstep(alphas.x, alphas.y, textDistance); #else - highp float textDistanceD = fwidth(textDistance); - highp float textAlpha = smoothstep(0.5 - textDistanceD, 0.5, textDistance); + highp float textDistanceD = fwidth(textDistance) * 0.5; + highp float textAlpha = smoothstep(0.5 - textDistanceD, 0.5 + textDistanceD, textDistance); #endif highp vec4 textPixel = color * textAlpha; |