Daniel, relying on HW texture minification (or magnification) filters is
fast but quite ugly in terms of contour anti-aliasing quality. Using
distance fields instead allows for instance to have a 16x16 contour
texture that can be rendered at 256x256 at perfect quality. It just
requires a texture lookup and a smoothstep(). Retrieving the standard
derivatives is almost free since the 4 texels required for the
subtraction have already been fetched during the texture lookup (so
still cached). It is the perfect thing for the shape since we need to
get the shape mask under any scale factor as required by our grid unit
system.

This technique has been used for a decade now and is efficient, easy to
implement and lightweigth in terms of texture usage. This is for
instance also used by QML for text rendering. More info can be found
there :
http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1458694

Title:
  [vivid-overlay] unity8 fails to start on the emulator

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1458694/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to