washingtondc-emu / washingtondc

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

bad performance with paletted textures #83

Open snickerbockers opened 4 years ago

snickerbockers commented 4 years ago

Some of the sprite-based games that use palettes will switch to a different palette for every sprite. This leads to terrible performance in WashingtonDC because we end up re-uploading the sprite every time it's referenced.

Viable solutions include hashing the palette into the texture (so we can maintain one copy of the texture for each palette the game uses) or implementing the palette in a GLSL fragment shader.

Mars Matrix does this, and (I think) Guilty Gear X does this as well.