-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Msdf3, Font TextureAtlas Development #55
Comments
Msdf3Our version is an extension to the original technique (Msdf, see https://github.com/Chlumsky/msdfgen). It optimizes 'nearest-edge searching' by using 'classic scanline fill' and encode Then it go to original Msdf gen phase, With a given pixel, the choices are
so it go faster for Msdf, see https://github.com/PaintLab/PixelFarm/tree/master/src/PixelFarm/PixelFarm.Drawing/7_CpuBlitPainter/Msdf and Msdf3, see https://github.com/PaintLab/PixelFarm/tree/master/src/PixelFarm/PixelFarm.Drawing/7_CpuBlitPainter/Msdf3 |
Closest Edge Lookup TableClosest edge lookup table bitmap, each pixel contains encoding data of responsible edges This render with 'classic scanline' technqiue. I use my PixelFarm's Agg (Antigrain geometry, C# port) the render it. Roboto font,Closest edge lookup table bitmap Roboto font, Msdf output, 8 times scale up, still sharp :) Please note that this version has some artifacts, cause by lut phase, It will be fixed later |
Preview
I have a modified version of the originalMsdf gen.
I call it Msdf3
I optimize 'Closest edge search' by using 'closet edges lookup table bitmap'
I have implement it here...
please note that now we are in debug mode,
it should be faster on release mode
All tests use Roboto font, 26 pts
1. PixelFarm's LcdEffect SubPixelRendering Atlas texture
(click on the image to see detail)
PixelFarm's LcdEffectSubPixelRendering Atlas Texture, built-time about 220ms
2. Msdf gen,C# port from original
Msdf, C# version, built-time about 7,101ms
3. a Modified version, (I call it 'Msdf3')
Msdf3, C# version, built-time about 1,096ms
Event the result images are different, but it give the acceptable glyph image,
(see later)
The text was updated successfully, but these errors were encountered: