• dejected_warp_core@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    2 days ago

    I think the preference for Y being the vertical axis in gaming, comes from a legacy of orienting the work around screen-space (roughly 50 years ago). It was more efficient to have a memory layout that is easier to supply data to generate a TV signal. Since a CRT raster goes from upper-left to lower-right, line-by-line, that became the standard for screen-space: inverted y. So screen memory (or however the screen is represented in RAM) starts at address/offset zero, and increments from there. All the other features like hardware sprites, used the same convention since it was faster and simpler to do (easier math).

    When consumer 3D cards were relatively new, this was inherited, most notably when the hardware started to ship with “z-buffer” support. Carrying all this baggage into 3D engines just made sense, since there was never any confusion about the screen-orientation of it all. Why bother flipping axes around from world and camera space to the screen?