washingtondc-emu / washingtondc

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

GLSL texture paletting #60

Open snickerbockers opened 5 years ago

snickerbockers commented 5 years ago

currently WashingtonDC handles paletted textures by converting them into normal textures, and then updating those textures every time the palette ram changes. This worked fine until I realized that Guilty Gear X tends to overwrite its palette at least once per frame (possibly more than once per frame, even), which causes the emulator to constantly re-update paletted textures.

Better solution is to treat the palette itself as another texture and to do the indexing from within the fragment shader so that only the palette texture needs to be updated when the palette changes.

snickerbockers commented 5 years ago

actually it looks like GGX's case is far more complicated than just that...it seems to be overwriting textures (and not just paletted textures) every frame?