I recently found an interesting technique in GitHub.
It has a lower resolution than the existing Signed Distance Field, but it is more pronounced and accurate.
It’s a new alternative to great vector graphics, and I’m looking for a way to use it.
But there is some confusion about how shaders are handled.
GitHub repository has an example, but I do not know exactly how to display the processed output.
I’ve done this in shadertoy.com, but it’s just being processed as the original pixels.
I want to know what to do if I’m using it wrong.
But this problem is… oops… this was a matter of shader code and my mistake
The global variable of the shader was caused by the fact that the initial value was not entered when the value was declared.
I still have problems with the shader, but I’ve seen it render the MSDF texture nicely in vector style!
I will post the modified HLSL and C# code tomorrow because I do not have time today
The MSDF technique is definitely a good technique, I think it would be good for the Monogame community!
So I decided to share this project file to my GitHub repository.
I hope this results will be of help to the good Monogame project.
Looking good! Would love to see some benchmarks for this. If it’s good enough, maybe it would be a good fit for MG core. I think it would be great to have an alternative solution for fonts that handles scaling well at the cost of performance.
I have just found helpful generator.
If you want to use font with msdf technique, use soimy’s msdf-bmfont generator.
It’s need Node.js NPM.
1. Install Node.js
2. If you finished install, use CMD to check they are successfully installed.
>npm version
3. download msdf-bmfont, and extract to folder.
4. return to CMD, follow to this command. (use drag and drop or paste path.)
>npm install <extracted folder root> -g
5. then, npm will install the package.
6. thats it! msdf-bmfont guideline is in repository README.md.