1. 6
  1. 5

    This paper (and, more pertinently, its associated website) have been circulated broadly, but I’m a bit disillusioned with it.

    Its ‘antialiasing’[0] is only approximate (and, empirically, people say it looks bad). Its proposed solution to this is basically multisampling, which is not so nice (especially after its creator criticised another renderer for using multisampling for antialiasing). A good heuristic to decide when to multisample requires taking 4 samples anyway, just the same as you need in order to decide how to do analytic ‘antialiasing’. (Incidentally, pathfinder and most cpu-based solutions use trapezoidal ‘antialiasing’; I wonder why no one uses analytic integrals?)

    Its space partitioning could be improved (one easy start is to use binary search or interpolation search).

    Its per-vertex calculations are a bit slow compared with a method which pre-calculates coefficients. Perhaps this was an intentional choice, to reduce memory usage, but clever algebraic manipulation can get rid of all the divisions and square roots in the happy path (i.e. when not needing to compute analytic coverage), which seems rather significant. (These precalcuations can also be performed at high precision, improving numerical accuracy slightly, though this is likely not very significant at popular resolutions and bit depths.)

    The patented portion (using a bitfield as a lookup table) is indeed original, but pretty frivolous; and its creator’s (implied) claims that other methods are not robust seem especially frivolous when you consider that the patented portion is basically just a souped-up range check[1]. Add to which that you should be doing bounds checks anyway, as part of your space partitioning, and, well…


    All of which is not to say that slug is bad, just that it’s not particularly good, either, and it’s certainly not all it’s cracked up to be. It does well enough for games. Compared with pathfinder, it has one major advantage, which is that it’s fragment-oriented rather than scanline-oriented; but it is possible to produce a much nicer fragment-oriented renderer.


    0: The term ‘antialiasing’ as used in computer graphics is a lie which has nothing to do with its signal-processing definition, and might better be called ‘blurring’.

    1: Don’t believe me? Look at fastuidraw git history; it formerly used the patented technique, but switched to range checks with fairly little disruption.

    1. 1

      The term ‘antialiasing’ as used in computer graphics is a lie which has nothing to do with its signal-processing definition, and might better be called ‘blurring’.

      It took me a long time to realise this when learning computer graphics, I’m probably not alone.