skmp / reicast-emulator

Reicast was a multiplatform Sega Dreamcast emulator
https://reicast.emudev.org
Other
1.1k stars 345 forks source link

Texture tiling #44

Open ppsspp213 opened 10 years ago

ppsspp213 commented 10 years ago

Noticed on a few games the textures are tiling with gaps between them on menu screens, here's a pic of Crazy Taxi with tiling around the logo.

2cgbsw2

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7380824-texture-tiling?utm_campaign=plugin&utm_content=tracker%2F500311&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F500311&utm_medium=issues&utm_source=github).
MrPsyMan commented 10 years ago

This is a limitation of the game's resolution. It happens on many cases. Dunno if it can be fixed on the current renderer without speed taking a major hit. Scaling is very expensive on Android.

AbandonedCart commented 10 years ago

Why not have the emulator fire off the am / wm command to lower the Android resolution? http://forum.xda-developers.com/showthread.php?t=2404783

skmp commented 9 years ago

The issue is the way pixel mapping is done in dreamcast games. Games assumed that the next pixel comes at x+1. drawing to [10, 15] is assumed to take 6 pixels. Though, in reality, drawing needs to be done in [10, 16) range ( [10, 15.9999]).

When we upscale, we insert extra pixels, so

[10, 15], [16, 20], with 2x upscaling becomes [20, 30], [32, 20] leaving an empty pixel.

Sometimes, this is an issue of texture mapping aswell (similar rounding problems)

skmp commented 9 years ago

A slow way to detect this would be

if (vtx.aligned_to_pixels && vtx.right) { add 0.999 to x }

if (vtx.aligned_to_pixels && vtx.bottom) { add 0.999 to y }

ppsspp213 commented 7 years ago

http://www.matim-dev.com/texture-packer---get-rid-of-sprite-artefacts.html

RinMaru commented 7 years ago

This happens on any DC emu when It scales even Dolphin does this