Skip to content

Commit

Permalink
Update sample/textRenderingMsdf/msdfText.wgsl
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Jones <[email protected]>
  • Loading branch information
rconde01 and toji authored Mar 18, 2024
1 parent 078e431 commit c7f8747
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sample/textRenderingMsdf/msdfText.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -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<f32>(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;
Expand Down

0 comments on commit c7f8747

Please sign in to comment.