GBAA: Geometry Buffer Anti-Aliasing

GBAA: Geometry Buffer Anti-Aliasing

After GPAA, Humus presents us a new anti-aliasing technique (Direct3D 10 demo) called GBAA or Geometry Buffer Anti-Aliasing.

GBAA is another anti-aliasing technique that works in the same spirit as GPAA, with the same quality, but with a substantially different method to accomplish the results. Whereas GPAA operates entirely as a post-process step (plus optionally pre-processing edges), GBAA uses a mixed method. During main scene rendering the geometry information is stored to a separate buffer, alternatively it uses available channels in an existing buffer. Anti-Aliasing is then performed in the end, in a resolve-pass if you will, as a fullscreen pass using the stored geometric information.

The geometry is represented as a two-channel edge distance. The closest direction (horizontal/vertical) distance is stored and the other is set to zero. It is possible to pack it into one channel and only store a bit indicating the major direction, but this demo uses two channels for simplicity.

GBAA: Geometry Buffer Anti-Aliasing
GBAA disabled

GBAA: Geometry Buffer Anti-Aliasing
GBAA enabled

GBAA allows to anti-alias geometric edges but also alpha tested edges like in the follwing pictures:

Additionally, having geometry information in a buffer allows us to anti-alias other edges than just geometric ones, most notably alpha-tested edges. The shader just needs to output the distance to the alpha-edge, something that’s easily approximated using gradient instructions.

GBAA: Geometry Buffer Anti-Aliasing
alpha tested edges: GBAA disabled

GBAA: Geometry Buffer Anti-Aliasing
alpha tested edges: GBAA enabled

Forum thread


  • xcbb

    Seems to be the most general and solution with best balance between quality and efficiency that I’ve seen.

  • DrBalthar

    Not sure doesn’t look to convincing to me. It smoothed the edge on the triangle above (in the first image) but it completely missed the jaggies on the roundish object left to it. Could be because it is a texture and in this case I guess not even MSAA would find it. (But MLAA would :) )

  • kibermiaf

    @DrBalthar: That does look like an aliased texture. But since this method uses geometry info, textures remain untouched (which is good in my opinion – aa should only process geometric aliasing)

  • Hell yeah, Humus is back in business :)