Comments (6)
Msdf3
Our 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
the pixel-curve data into a lookup bitmap.
Then it go to original Msdf gen phase,
this time instead of checking all edges for a pixel,
it use the lookup bitmap to decode edge data that are responsible for the
specific bitmap.
With a given pixel, the choices are
-
no edge for this pixel, => finish here
-
only 1 edge for this pixel, just calculate distant from a pixel to that edge
-
more than 1 edge, just calculate the repsonsible edges (mostly just 2-3 edges, on the
corners, esp overlap edges)
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
blue rect is original Msdf, and red rect is Msdf3
from pixelfarm.
Closest Edge Lookup Table
Closest edge lookup table bitmap, each pixel contains encoding data of responsible edges
over that pixel.
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
from pixelfarm.
Another glyph-B, Roboto font
This shows both curve segments and line segment
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
from pixelfarm.
Closest Edge Lookup Table in the form of Bitmap
The following screen capture show the debugging session when the renderer paint each border.
we paint each border, each border encodes information about edge segment
from the picture, we save result of each step to files to examine later
These are the lut bitmaps.
please note that the actual images are too dark, I will enhance it up to see the data.
from pixelfarm.
Lut creation detail
Zoom in some images.
from step1, zoom 8 times from original (above)
You see that it is too dark.
so I will enhance it to see the detail inside in the following pic.
the picture is zoom in 8 times,
and increase brightness (100%) ,
increase contrast (50%) to see the detail
from pixelfarm.
from pixelfarm.
Related Issues (20)
- .NET Standard version of PixelFarm HOT 1
- Update latest Typography
- CosmosOS RenderSurface Developing HOT 24
- Oblique Glyph Simulation
- PostScript and Pdf
- About subpixel rendering HOT 3
- How to deal with 3 repo?, Submodules consideration HOT 23
- From today, I have a busy job for 3-4 weeks!
- Fixing SmoothLineAA shader HOT 1
- Please give me some ideas about tools that convert C# to C / C++ HOT 1
- [INFO] GLCanvas Coordinate note HOT 2
- [INFO] Tesselation Note HOT 2
- [INFO] Mask
- [INFO] Stroke Generator Notes
- [INFO] Brushes Notes
- HAPPY NEW YEAR 2019 HOT 3
- Clean build fails - many missing files in Typography project HOT 3
- HAPPY NEW YEAR 2020 :)
- Implement Evan Wallace's Rendering Technique HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixelfarm.