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!
![](https://uploads.gamedev.net/forums/monthly_2020_02/9f136a99c8824557a8bb48ac0d766e93.image.png)
![](https://uploads.gamedev.net/forums/monthly_2020_02/669fb2d388c74f70856357f038af80b1.image.png)
![](https://uploads.gamedev.net/forums/monthly_2020_02/35840053ccee4077a65ef723368f4be4.image.png)