nesbox / TIC-80

TIC-80 is a fantasy computer for making, playing and sharing tiny games.
https://tic80.com
MIT License
5.06k stars 492 forks source link

Libretro Core Graphical Bugs #1862

Closed Heuwyn closed 2 years ago

Heuwyn commented 2 years ago

TIC-80 libretro core graphical glitches (compared to working in current browser version):

Fallspire: Part of tower and scrolling landscape missing.

Shadow Over The Twelve Lands: Combat target selection sprites are invisible.

nesbox commented 2 years ago

This is because we have fixed the textri() API for more accurate triangle rasterization. As a solution we could leave old version of the textri() for the backwards compatibility and mark it deprecated, the new one will be something like ttri().

joshgoebel commented 2 years ago

As a solution we could leave old version of the textri() for the backwards compatibility and mark it deprecated, the new one will be something like ttri().

Please, please no. Why exactly is the new triangle code (badly) breaking carts again? If the lines/textures are now drawn slightly differently I wouldn't see that as a huge problem.

This seems to be talking about things not being rendered at all...?

nesbox commented 2 years ago

I analyzed these broken carts and see one common problem, devs want to render a textured line using textri() and we see only half of the line, this is because new rasterizer uses center of the pixels to check if it belongs to the triangle. image To fix it they need to make a second textri() call to display the bottom-right half of the line.

nesbox commented 2 years ago

New textri() renamed to ttri() and textri() is deprecated since now 74ad203b1a56094854be6c8637c040263d3fa921 All the old carts still use old textri()

Heuwyn commented 2 years ago

Can confirm Libretro Core now has fixed the issue with Fallspire. Thanks!