From c7f8747374f3c5c1168594de6001bec0527bf58b Mon Sep 17 00:00:00 2001 From: rconde01 Date: Mon, 18 Mar 2024 12:42:27 -0400 Subject: [PATCH] Update sample/textRenderingMsdf/msdfText.wgsl Co-authored-by: Brandon Jones --- sample/textRenderingMsdf/msdfText.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/textRenderingMsdf/msdfText.wgsl b/sample/textRenderingMsdf/msdfText.wgsl index f8eb73ca..94bec68e 100644 --- a/sample/textRenderingMsdf/msdfText.wgsl +++ b/sample/textRenderingMsdf/msdfText.wgsl @@ -68,7 +68,7 @@ fn fragmentMain(input : VertexOutput) -> @location(0) vec4f { let pxRange = 4.0; let sz = vec2f(textureDimensions(fontTexture, 0)); let dx = sz.x*length(vec2f(dpdxFine(input.texcoord.x), dpdyFine(input.texcoord.x))); - let dy = sz.y*length(vec2(dpdxFine(input.texcoord.y), dpdyFine(input.texcoord.y))); + let dy = sz.y*length(vec2f(dpdxFine(input.texcoord.y), dpdyFine(input.texcoord.y))); let toPixels = pxRange * inverseSqrt(dx * dx + dy * dy); let sigDist = sampleMsdf(input.texcoord) - 0.5; let pxDist = sigDist * toPixels;