washingtondc-emu / washingtondc

Open-source Sega Dreamcast emulator
http://www.washemu.org
GNU General Public License v3.0
240 stars 7 forks source link

soft_gfx: texture coordinates off-by-one #91

Closed snickerbockers closed 4 years ago

snickerbockers commented 4 years ago

not sure exactly what's going wrong here, but the texture sampling code in soft_gfx is wrong and tends to sample from texels adjacent to where it should be sampling. This is most apparent in the menus in Daytona USA 2001, which use very low-resolution textures.

snickerbockers commented 4 years ago

note to self: the reason why all my attempts at making soft_gfx use fixed-point end in failure is probably because tri_area2 overflows the size of a 16-bit integer.

eg, for a triangle covering half the screen tri_area2 would return 640*480=307200, and most games would have triangles that go beyond the screen's boundaries too.

snickerbockers commented 4 years ago

fixed by d76a8c03e3cdeb70379cf2ac514492e6efe6e0b9