Question: correct way to use supersampling with MDSF textures #141
Replies: 2 comments 11 replies
-
You should definitely average the resulting opacity and not the signed distance samples. Supersampling just the distance field is nonsensical - it is smooth, so you won't gain any new information from it. You should also adjust the output of |
Beta Was this translation helpful? Give feedback.
-
Also, just so you know, I don't believe you can get a very noticeable improvement in fidelity using supersampling, because the SDF technique already includes its own anti-aliasing algorithm, and supersampling is just a different one. In fact, the only time there should be any difference at all is when the glyphs are so cramped that multiple (non-adjacent) edges occupy the same pixel - basically at very tiny font sizes. And even then, the improvement is pretty miniscule because not much can be done at such a small size. Here is an example I just rendered, top is with no supersampling and bottom has 8x8 supersampling (the number of samples doesn't really matter). If I really squint my eyes, I can see a slight improvement in the dots above i and j, and maybe the number 3 is a bit nicer, but that's about it. And as I said, for larger sizes the result will be mathematically identical. If your SDF text doesn't look as good as my above render, there's probably something else going wrong and supersampling won't save you. |
Beta Was this translation helpful? Give feedback.
-
Hi, I was trying to implement Rotated Grid Supersampling from @bgolus for better font readability in VR.
There's a slight improvement, but results look a bit blurry when either supersampling the MSDF texture directly (and then calculating median etc.) or calculating alpha per sample and averaging them (with the technique for 3D outlined here).
Do you happen to have any hints what the correct way to supersample a MSDF texture for better clarity would be? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions