Re:Original Age of Empires 2 dev talks about its usage of as...
by zeusk on Saturday January 06, 2024 @08:49PM
(#38897559)
Are there any good resources on using mipmapping and swizzling effectively?
[ Parent
| on HN ]
Re:Original Age of Empires 2 dev talks about its usage of as...
by malkia on Saturday January 06, 2024 @09:21PM
(#38897767)
I 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.
Re:Original Age of Empires 2 dev talks about its usage of as...
by malkia on Saturday January 06, 2024 @09:38PM
(#38897863)
Now 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-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
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.
Re:Original Age of Empires 2 dev talks about its usage of as...
by royjacobs on Sunday January 07, 2024 @05:22AM
(#38900031)
You 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.
Re:Original Age of Empires 2 dev talks about its usage of as...
by bananaboy on Sunday January 07, 2024 @07:31AM
(#38900699)
fatmap.txt discusses tiled textures a bit https://hornet.org/code/3d/trifill/texmap/fatmap.txt
Re:Original Age of Empires 2 dev talks about its usage of as...
by malkia on Sunday January 07, 2024 @02:00PM
(#38904078)
I think that's what I was looking at, and read back then - it was only txt files :)