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 f294c85 commit fe55fbd
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 @@ -67,7 +67,7 @@ fn fragmentMain(input : VertexOutput) -> @location(0) vec4f {
// uses the default which is 4.
let pxRange = 4.0;
let sz = vec2<f32>(textureDimensions(fontTexture, 0));
let dx = sz.x*length(vec2<f32>(dpdxFine(input.texcoord.x), dpdyFine(input.texcoord.x)));
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 toPixels = pxRange * inverseSqrt(dx * dx + dy * dy);
let sigDist = sampleMsdf(input.texcoord) - 0.5;
Expand Down

0 comments on commit fe55fbd

Please sign in to comment.