POLYTYPE_ATEX(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’… POLYTYPE_ATEX β€” bestie's guide to affine texture mapping

okay so real talk, this is a page from the Allegro manual (you know, the game programming library) and it's about one very specific little guy: the polygon rendering mode type POLYTYPE_ATEX. it's giving niche but important. let's get into it 🫢


✨ SYNOPSIS ✨

#include <allegro.h>

#define POLYTYPE_ATEX

like, that's it. that's the whole setup. one include, one define, and you're in business πŸ’–


🌸 DESCRIPTION 🌸

so POLYTYPE_ATEX is an affine texture mapped polygon. what does that mean fr? it means the texture gets stretched across the polygon using a simple 2d linear interpolation. it's fast β€” like, genuinely speedy, no cap β€” but it is not mathematically correct. and the way that matters is everything here 😭

here's the vibe check: it can look OK if the polygon is fairly small, or if it's flat-on to the camera. those are the two situations where it behaves itself. ✨

but because it doesn't deal with perspective foreshortening, it can produce strange warping artifacts. that's the catch. it's the "looks great until it absolutely doesn't" of rendering modes πŸ’€

and how do you see this for yourself? the manpage says: run Allegro's test program and see what happens to the polygon3d() test when you zoom in very close to the cube. do it. watch the cube get weird. it's a whole experience πŸ™ˆ

not me warning you again: no perspective foreshortening = warping artifacts. small or flat-on = fine. everything in between = gamble. πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

go read those next, bestie, iykyk πŸ’œ


and that's the whole page! this was Allegro, version 4.4.3, serving you this iconic little manual page. slay, stay warpy, and go zoom in on that cube for me πŸŒˆπŸ’…πŸŽ€

πŸ“¦ where this page comes from