Hashed alpha testing

We have 3 types of transparencies:

  1. None (fully opaque)
  2. Mask (some parts are 100% transparent some parts are 100% opaque)
  3. Blended

I recently wrote about the Blended kind, which is the most flexible and generic case.

But masked transparency is bread and butter of transparencies, it’s less impressive but whenever you see a tree with leaves or some grass in a video game - you’re most-likely looking at masked transparency in action.

Long story short, I implemented “Hashed Alpha Testing” technique a while ago for Shade

But I wasn’t using it, because the main purpose I implemented it was for the 3rd case, and I wasn’t happy with the noise.

Recently I was testing the Emeral Square scene, which has a lot of foliage.


The problem is - that foliage disappears as you zoom out, because of mipmapping, which is the exact problem that hashed alpha was invented to overcome. Here are a few screenshots from the paper to demonstrate

So I figures I would use it for masked transparencies, which yields pretty spectacular results


here’s side-by-side


And closer up




The technique requires a good TAA implementation to be stable, which I have, so it was a free win for me.

5 Likes

The comparison images seems to have too much compression , are you posting the images anywhere else ? (like a blog or something)