Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Instead of one row after the next, pixels in memory follow a spiral-like curve.

This is called a z-order curve[1, 2]. It makes texture mapping and mipmapping significantly more cache-friendly than the usual x-y ordering, because these operations are often performed in tiles of 2^n size.

I'd say it's more a fractal pattern than spiral-like, to be precise.

[1]: https://demonstrations.wolfram.com/ComparingXYCurvesAndZOrde...

[2]: https://en.wikipedia.org/wiki/Z-order_curve?wprov=sfla1



Interesting. Wouldn't it be more strictly 2^(n*(2^m)) size where m is the number of dimensions?


I meant 2^n along one side, strictly in two dimensions (which is generally the most common texture layout). In other words, square tiles.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: