Glyph baking: inline scanline pixel conversion
Build & Release / build (push) Canceled after 0s

This commit is contained in:
4DBug committed 2026-10-17 09:03:36 -05:00
1 parent 48ee9270f6
commit cd826cf3ca
5 files changed
+14 -20

No files matched your search

+4 -6
View File
@@ -72403,15 +72403,13 @@ local function stbtt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, of
do
local sum = 0
local pixels, base = result.pixels, j * result.stride + 1
for i = 0, result.w - 1 do
local k
local m
sum = sum + scanline2[i]
k = scanline[i] + sum
k = STBTT_fabs(k) * 255 + 0.5
m = trunc(k)
-- [Luau] k >= 0: trunc == floor, and m is already 0..255 (unsigned_char() is a no-op)
local m = math.floor(math.abs(scanline[i] + sum) * 255 + 0.5)
if m > 255 then m = 255 end
result.pixels[j * result.stride + i + 1] = unsigned_char(m)
pixels[base + i] = m
end
end