3 ms·
Are there any good resources on using mipmapping and swizzling effectively?
by zeusk 3y ago
Are there any good resources on using mipmapping and swizzling effectively?
- malkia 3y agoI was actually trying to find it - there were lots of .txt files published back then - and there was one about texture mapping from 1992... 1994? - and it explained swizzling and why it was efficient with caches.
- malkia 3y agoNow I remember - back then these texture mappers were called roto zoomers, Alex Champandard did excellent series here -> https://www.flipcode.com/archives/The_Art_of_Demomaking-Issue_10_Roto-Zooming.shtml https://www.flipcode.com/archives/The_Art_of_Demomaking-Issu... - look for zip file with the source code. I've also found Go version (and there were 2 java ones) https://github.com/search?q=BlockTextureScreen https://github.com/search?q=BlockTextureScreen So it's not as neat as swizzling (quickly looking at it) - but essentially same goal - keep pixels that have to be drawn together at close (e.g. blocks). Mipmapping helps too, as then you don't "skip" too many pixels - and you both gain better quality and less cache misses.
- royjacobs 3y agoYou might be thinking of the article written by Pascal of Cubic Team. I think the archive is called pasroto.zip and it explained why rotozoomer performance would tank when the texture was rotated by 90 degrees (since you're stepping in the Y direction and blowing out your cache for every pixel). Really interesting at the time.
- bananaboy 3y agofatmap.txt discusses tiled textures a bit https://hornet.org/code/3d/trifill/texmap/fatmap.txt https://hornet.org/code/3d/trifill/texmap/fatmap.txt