Merge pull request #109765 from bruvzg/msdf_outline_clamp

Fix MSDF outline size clamping.
This commit is contained in:
Thaddeus Crews
2025-08-20 12:07:11 -05:00
3 changed files with 3 additions and 3 deletions

View File

@@ -609,7 +609,7 @@ void main() {
float d = msdf_median(msdf_sample.r, msdf_sample.g, msdf_sample.b);
if (outline_thickness > 0.0) {
float cr = clamp(outline_thickness, 0.0, px_range / 2.0) / px_range;
float cr = clamp(outline_thickness, 0.0, (px_range / 2.0) - 1.0) / px_range;
d = min(d, msdf_sample.a);
float a = clamp((d - 0.5 + cr) * px_size + 0.5, 0.0, 1.0);
color.a = a * color.a;