Earlier today, I've been investigating why Pokemon outlines fail. I do have a working solution but it's pretty slow and hacky code.
I'm not going to integrate it probably as I don't know if it causes regressions and I'm not sure how to best convert between texture formats.
The reason for the whole thing is related to 2 bugs / missing features in texture forwarding:
Obligatory images OR/AS (Master / Prototype):
- The depth buffer (D24S8) is used as a RGBA8 texture. That means that the cached texture is first flushed (which is slow and happens at least once per frame!) and then reuploaded (in reduced resolution = pixelation). My solution is to download the depth buffer to the CPU (very slow + it happens twice as the original copy is also necessary), then re-upload it as RGBA8 in the original size. This basicly cuts my framerate in half so it's not a good solution yet.
(I also had an alternative solution where I used the depth buffer correctly. OpenGL will then interpret the data differently (= small visual errors) but it boosts performance by 5-10 FPS as we can avoid all flushes.)- The other issue is that the Stencil buffer is not cleared correctly (causing lines where they shouldn't be). It looks like the texture cache is cleared correctly, but the texture is instead uploaded from memory again (where it wasn't cleared). My solution is to clear both copies of the texture (which is probably a sane configuration anyway).
I'm not sure why this happens yet though.
Bonus images S/M (Master / Prototype) - thanks to Leo121:
The code is temporarily hosted at https://github.com/JayFoxRox/citra/commits/pockeymans .
PLEASE DO NOT RELEASE BUILDS WITH THAT CODE. IT'S PURELY FOR FIGURING OUT THE CAUSE OF THE ISSUE.
Note that I had to test on AS as I don't have access to the other Pokemon games yet.
I'm assuming this will fix a lot of games though (other Pokemon games included.).
I wonder if other games with that issue might work like Hyrule Warriors or Dragonball.
But anyways, can't wait for the PR to be stable.