-
Notifications
You must be signed in to change notification settings - Fork 174
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
Issues rendering MSDF generated with msdf-bmfont #21
Comments
according to my test. the only difference with the other shader is on this line. https://github.com/Jam3/three-bmfont-text/blob/master/shaders/msdf.js#L49 if I remove the subtraction it works ie
|
I'm not sure what the foreground and background colors are supposed to do in the other shader here but I changed it back to a normal color vector
|
Opened a PR adding a e.g. const createTextGeometry = require('three-bmfont-text');
const createMSDFShader = require('three-bmfont-text/shaders/msdf');
createMSDFShader({
map: texture,
color: 0x000000,
negate: false
}); |
Should I close this ? I have fixed up all issues and refactored to es6 so I can bundle with three.js. my fork is here |
I have tested out generating both the Roboto Bold font and custom WebFonts from icomoon. However it seems the MSDF shader provided generates outline for colors and doesn't generate properly.
The msdf shader supplied with msdf-bmfont works ok but its obviously different and like to stick with this one.
SDF font generation with the tool and using the supplied SDF shader seems to be ok however.
Just an example what I'm trying to achieve with the webfont icons also
Actual msdf texture looks like this for the Roboto bold font.
I'm not sure who to task first.
The text was updated successfully, but these errors were encountered: