emulsion
emulsion copied to clipboard
Sharpness of images at varying zoom
Thanks for making this! Really nice.
In comparison with the standard Windows 10, Emulsion looks a bit blurred on the following screenshot. See the scale bar at the bottom left in particular. I'm sure there are several strategies for smoothing and anti-aliasing, what does Emulsion use? Original png attached.
Indeed. This is something that I don't have experience with, although this is definitely within the scope of my interests so all I'm saying is that there may be someone else who could tackle this more efficiently than I could.
The question in the post somehow eluded my attention. Emulsion currently generates up to four mip-maps and then it uses "LinearMipmapLinear" filtering for minification and "Linear" filtering for magnification by default. "Nearest" is used for maginfication if the renderend texel size is greater than some threshold.
I noticed this bug as well:
Images are, when scaled down, slightly more blurry than they should be. This is most obvious when the image contains text:
The right picture is emulsion showing the help dialog. The left picture is the same image, opened in emulsion normally.
I wonder if the method used to render the help dialog could be used for other downscaled images as well.
The info screen uses regular linear filtering for minification. Nevertheless I can get the two to be exactly as sharp, but it's super sensitive to the scale. Just one pixel off and the one displayed as an image is significantly blurrier.
I made some quick tests to see if this can be improved by simply switching the filtering mode. And indeed it improved by a lot when using NearestMipmapLinear. The photos app still seems to do better but we are pretty close now.
From left-to-right: Old Emulsion, Win Photos, New Emulsion
It's much better now. Only below a certain zoom threshold, it looks as before.
Krita spent a lot of time on a good interpolation method for their OpenGL canvas mode. Perhaps the approach or even the code can be copied if the license allows.