Skip to content
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

SDF for stb_truetype #54

Closed
nothings opened this issue Dec 2, 2014 · 2 comments
Closed

SDF for stb_truetype #54

nothings opened this issue Dec 2, 2014 · 2 comments

Comments

@nothings
Copy link
Owner

nothings commented Dec 2, 2014

Try building three signed-distance fields (see Valve paper, etc.).

For each one, differently perturb vertices away from sharp corners along different edges.

Use intersection of first two to get sharp convex corners

Get union with third to get sharp concave corners.

Write detector that tells if vertices get displaced too close to other edges; if so, try running the character at a higher resolution.

Store AA pixel coverage in fourth channel; shader dynamically chooses between SDF or manually subsampling coverage (use heavily biased mipmapping).

@nothings
Copy link
Owner Author

nothings commented Jul 12, 2017

Added naive version in stb_truetype version 1.16; don't think I'm going to do a three-channel version.

@godratio
Copy link

@nothings
I know you dont like to be notified for nothing but just wanted to say thanks for putting in the effort for this its a really good effort and helpful and useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants