Get the latest tech news

Exploring ways to mipmap alpha-tested textures


In my village building game I'm using alpha-tested transparency for foliage — trees, bushes, grass, etc. This works simply by discarding (i.e.

Something like 0.3 probably works, but it makes the flower texture really blobby & fractured, while also introducing a ton of artifacts due to some very transparent areas becoming erroneously visible. We can see that it doesn't actually suit my case: by preserving the coverage value, it fills some holes in the texture at the expense of thinner features, thus once again shrinking the overall shape. So, to fix the color leaking problems, what I decided to do is first compute the mipmaps using usual averaging, and only then replace the alpha channels (starting from level 1) with max-downsampled SDF.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Ways

Ways

Photo of alpha

alpha

Photo of tested textures

tested textures

Related news:

News photo

TikTok ban poised to be delayed as Trump explores ways to extend deadline

News photo

Biden administration looks for ways to keep TikTok available in the U.S.

News photo

Meta kills diversity programs, claiming DEI has become “too charged” | Meta claims it will find other ways to hire employees from different backgrounds.