Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KH Birth by Sleep] Weird graphical anomalies in a few cutscenes. #11316

Closed
AkiraJkr opened this issue Aug 23, 2018 · 6 comments
Closed

[KH Birth by Sleep] Weird graphical anomalies in a few cutscenes. #11316

AkiraJkr opened this issue Aug 23, 2018 · 6 comments
Milestone

Comments

@AkiraJkr
Copy link

AkiraJkr commented Aug 23, 2018

I assumed being a D3D9 error, but recently found out to be wrong as a friend of mine had found the same issue as me, and he even attempted seeing if they would be gone changing the backend, which didn't. I'll have the screenshots of some(if not all) of these situations, and their respective Cutscenes.
To prove this is not a issue with my texture pack, and more with the emulator, I turned it off.

Cutscene: Terra - Unlocking the Door
There should be a image here

Cutscene: Any cutscene that includes the mirror and this room.
There maybe should be a image here

Cutscene: Any cutscene that showcases the Radiant Garden logo
There definitely should be one here, I think

Cutscene: First Keyblade Graveyard cutscenes, where the logo shows up
Please there should be a image here too

If any test is necessary or something for not having the game avaiable, please tell me.

And to assure you, this happens in any version of the game. Even Final Mix.

@unknownbrackets
Copy link
Collaborator

Could you try exporting a GE debugger dump on PC?

To do this, open the game and select Debug -> GE debugger..., then when it's displaying the scene, press Record in the top right. After a second or so, it'll finish and save a trace of the drawing activity.

After that, check the memstick/PSP/SYSTEM/DUMP folder and it'll have created a file named something like "ULES12345_0000.ppdmp". You can zip that and then drag and drop it into a reply here.

-[Unknown]

@AkiraJkr
Copy link
Author

PPSSPP_STATE.zip

Throwing a save state here per request on Discord, later uploading a GE dump from someone.

@unknownbrackets
Copy link
Collaborator

Any cutscene that includes the mirror and this room.

So, this happens only in Direct3D 9 and Direct3D 11. It's fine in Vulkan and OpenGL. Probably also doesn't work on mobile for Vulkan or OpenGL, though.

The bad part of the mirror is drawn with texturing disabled, and:

  • Alpha blend on: 2.0 * src.a + fixed 1.0
  • Alpha test on: a > 0
  • Depth test on: ALWAYS
  • Logic op on: noop

So the important thing is this only affects depth, since logic op is set to "noop" and stencil test is disabled. Following the logic:

  1. Replace blend is set to REPLACE_BLEND_PRE_SRC because of source alpha doubling.
  2. Replace alpha is REPLACE_ALPHA_NO since no stencil op.
  3. Because replaceBlend is not REPLACE_BLEND_NO, we don't try to emulate the logic op, so noop is ignored.

Presumably the blending settings were left on by accident and don't matter in this case. There's a decent chance the other issues are also logic ops, but it's not for sure. But a game using logic ops once is probably a game using them other places too.

-[Unknown]

@AkiraJkr
Copy link
Author

Well, I don't know if this is of any relevance, but sometimes, when I'm dumping textures, they come weirdly transparent, even though in-game they aren't. But that's just something I picked irrelevant(probably?) to this.

@unknownbrackets
Copy link
Collaborator

Cutscene: Any cutscene that showcases the Radiant Garden logo
Cutscene: First Keyblade Graveyard cutscenes, where the logo shows up

Can confirm both of these also use the "noop" logic op.

Well, I don't know if this is of any relevance, but sometimes, when I'm dumping textures, they come weirdly transparent, even though in-game they aren't. But that's just something I picked irrelevant(probably?) to this.

Actually, PSP games often do this. You can set the texturing unit to ignore alpha, which many games do for some textures (I've guessed that it might render faster in this mode, but not sure.)

In these cases, they often leave alpha set to 0 (or any other value) since it doesn't matter. It could even be random values, but that's pretty rare.

-[Unknown]

@AkiraJkr
Copy link
Author

AkiraJkr commented Aug 24, 2018

Leaving here another cutscene that I forgot to add, incase it helps in some way.

Cutscene: All Characters - Mark of Mastery
image
I am adding this one in specific, because sometimes, it's random, sometimes, it isn't. The lighting bugs affect the floor.

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Aug 25, 2018
It has well defined behavior with alpha blending, so let's apply it even
when we're blending.  Fixes hrydgard#11316.
@unknownbrackets unknownbrackets added this to the v1.7.0 milestone Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants