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

Remaining glitches in Blazing Souls Accelate #8145

Closed
LunaMoo opened this issue Nov 3, 2015 · 7 comments
Closed

Remaining glitches in Blazing Souls Accelate #8145

LunaMoo opened this issue Nov 3, 2015 · 7 comments

Comments

@LunaMoo
Copy link
Collaborator

LunaMoo commented Nov 3, 2015

As mentioned in #4665 (comment) this game has some weird glitches which seems fixed by disabling slower effects, and appear differently depending if simulate block transfer is used or not. Screenshots made by PPSSPP will usually just make the glitch into completely black square, but they can be transparent gray as well as take shapes of elements they were under when the effect was created, like for example this:
bsaartifacts
which was created under character and so still has an empty shape of character legs inside.
I copied contents of GEdebugger tabs while looking at that effect here: https://gist.github.com/LunaMoo/8378e6ec0641929cab78
You can see the texture used for this:
texture
which is the blue frame on a black square, seems that the arrow to the right of it which is also on black square(all colors 0, a = 255) also causes those glitches while other things there are issue free.

I really have no ideas what could it be, as mentioned disabling slower effects magically causes black/gray squares disappear and it shows normal graphics
bsaslower effects disabled
.

@unknownbrackets
Copy link
Collaborator

unknown weights (1) hmm?

The blend mode is add: fixed, 1.0 - 2.0 * dst.a. That means the destination alpha is very important. This will require a framebuffer copy.

What does the stencil preview look like in this scene when it's drawing that graphic?

-[Unknown]

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Nov 3, 2015

stencil
The numbers under preview are both 0 in stencil all over the scene

@unknownbrackets
Copy link
Collaborator

After some debugging I'm pretty sure I know what the issue likely is here.

We don't handle alpha replacement correctly when doing framebuffer copies for bleinding. I think this is causing alpha to be replaced by the output of the framebuffer copy. Per your tabs, stencil test is disabled so it ought to retain the stencil value, but I don't think there's any code that actually retains right now.

Oops...

-[Unknown]

@unknownbrackets
Copy link
Collaborator

I was wrong, our strategy there is using a color mask, which ought to be working. The problem was we lost the color mask during rendering.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Per:
#4665 (comment)

This is using a 565 buffer. What does src * fixed + dst * (1.0 - 2 * dst.a) mean when there are no dst.a bits? It sounds like it means src * fixed + dst * (1.0 - 2 * 0.0) aka src * fixed + dst * 1.0.

Maybe we need to rewrite some blend modes in 565. This doesn't even require shader blending. Silly game.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Nov 4, 2015

Weird. Just goes to show how many bizarrely subtle behaviours there are to take care of in an emulator...

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Nov 4, 2015

Well #8158 did kind of fix it, as long as pause menu is not entered or if simulate block transfer is disabled.
Nothing is really missing with disabled slower effects so it does pointless stuff ~ made in japan heh.

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

3 participants