You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/nbl/builtin/hlsl/text_rendering/msdf.hlsl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ This can then be processed using smoothstep to provide anti-alising when renderi
23
23
@params:
24
24
- msdfSample: sampled SNORM value from the MSDF texture generated by msdfgen library.
25
25
26
-
- pixelRange = msdfPixelRange * screenPxRangeValue, It is the value to convert snorm distance to screen space distance
26
+
- pixelRange = screenPxRangeValue * msdfPixelRange * 0.5, It is the value to convert snorm distance to screen space distance
27
27
- msdfPixelRange: specifies the width of the range around the shape between the minimum and maximum representable signed distance in shape units or distance field pixels, respectivelly.
28
28
for example if msdfPixelRange is 4, then the range of distance values are [-2, +2], and it can be computed by snormValue * MSDFPixelRange/2.0
29
29
so an snorm value of 1.0 means a distance of 2 pixels outside the shape (in msdf texture space)
@@ -34,7 +34,7 @@ This can then be processed using smoothstep to provide anti-alising when renderi
34
34
where GlyphTextureSpaceSize is the size of the glyph inside the msdf texture/atlas
0 commit comments