Mipmapping Equirectangular

Started by
1 comment, last by LorenzoGatti 4 years, 6 months ago

Hi there,

I want to manually compute mipmaps for an equirectangular texture.

I wrote a compute shader that loads first mip level into LDS using bilinear sampling. Then I'm applying a simple box filtering (using parallel prefix reduction) to output each mip levels.

The above shader was already tested for regular 2d textures.

I noticed however a discontinuity on higher mip levels, exactly where the u axis wraps around, even if I'm loading the LDS using a wrap filtering mode or forcing fract operation for uv coordinates - I can't seem to get rid of the artifact.

I was wondering if anyone else had encountered this artifact when either rendering equirectangular or mipmapping it.

One final note - that artifact can also come from the way that I'm rendering the equirectangular map, but in this shader I'm forcing a specific lod and calculating derivatives manually (to avoid atan discontinuity).

Thanks in advance!

Advertisement

It's obvious that your mapping and/or your filter are wrong, in several ways, but figuring out why is impossible without your rendering and filtering code.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement