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

[BUG]: Tales of Rebirth software rendering regression #12100

Open
macrosscape opened this issue Dec 17, 2024 · 11 comments
Open

[BUG]: Tales of Rebirth software rendering regression #12100

macrosscape opened this issue Dec 17, 2024 · 11 comments

Comments

@macrosscape
Copy link

Describe the Bug

Tales of Rebirth software rendering broke with PR #11324 in PCSX2 v1.7.5865 (June 4th 2024)
It's been broken for half a year and causes the backgrounds to tear when using software rendering.

DRAGONBLEAPIECE asked me to make this report.

Reproduction Steps

Walk around Sulz, the first town, or any town, with software rendering on.

Expected Behavior

No response

PCSX2 Revision

Latest

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

CPU

Ryzen 5 3600

GPU

rx570

GS Settings

No response

Emulation Settings

No response

GS Window Screenshots

No response

Logs & Dumps

No response

@Mrlinkwii
Copy link
Contributor

can i have a memcard if possible

@Mrlinkwii
Copy link
Contributor

heres a memcard for testing memcard_issue_12100.zip

@Fis-Ura
Copy link

Fis-Ura commented Dec 17, 2024

This happends in Hardware Rending as well
Steps to reproduce the bug.
fight a battle on the overworld
open the main menu
close the main menu
open the main menu again

This will stay broken until another battle is triggered
Image
Image

@F0bes F0bes changed the title [BUG]: [BUG]: Tales of Rebirth software rendering regression Dec 17, 2024
@badspott
Copy link

https://files.catbox.moe/xo3s3k.mp4
Footage of the bug in question if it is needed.

@lightningterror
Copy link
Contributor

@macrosscape Can you post a gs dump of the issue?

@DRAGONBLE3API3C3
Copy link

there's a gs dump. while I'm at it, here's a memory card. walk into the town with it set to software renderer.
https://drive.google.com/file/d/1zf_GBr3c1NG3YKeVtwupBwyHObtD49Gx/view?usp=drive_link

@lightningterror lightningterror pinned this issue Dec 22, 2024
@lightningterror
Copy link
Contributor

Just posting the debug progress so I/we don't forget what's happening:

Reverting this gets around the issue:
https://github.com/PCSX2/pcsx2/pull/11324/files#diff-b7112f98608190fe3ac7cf4e147bbc393fb36953955c2c97c563d213904ee47bR3980

I compared the draws, first draw indicated in the log says 68, however when I compare the dumped draws it starts from 3 which is itex alpha

draw 3 info:
itex alpha:
master:
Image
revert:
Image
draw:
00003_vertex.txt
00003_context.txt

draw 68 info:
draw:
00068_vertex.txt
00068_context.txt

Currently on master it breaks because inclusive_y_req is 0 in these cases

TODO: Find out why inclusive_y_req is 0 in the conditions and if there's something we can do about it.

@TJnotJT
Copy link

TJnotJT commented Dec 24, 2024

Hi Lightning, I have also been looking at this bug, hope that is ok!

Thanks for sharing the above, here is what I have found also: The glitch seems to be caused by bilinear filtering and goes away when bilinear filtering is disabled. Particularly, it seems to caused by some of the 4 UV coordinates used in the bilinear interpolation going outside the texture by 1 pixel and becoming pure black. This causes the alpha of the final color to be slightly less than 128, which causes it to fail the alpha test (the alpha test is set to GEQUAL with AREF=128). The blue streaks are from the background not being covered up.

It is strange that this seems to only affect software rendering though.

@TJnotJT
Copy link

TJnotJT commented Dec 25, 2024

I did some tests with homebrew and it seems like the issue above affects all the renders (SW, VK, OGL, DX11) and both for triangles and sprites. Assuming this is a problem with bilinear filtering sampling outside the range of texture, is this already a well-known issue? I wonder if it is a limitation of PS2 that is being emulated accurately or a problem with the emulation. If anyone is able to test on a PS2, here are the ELFs. Also the GS dumps and a video showing the glitch. Hope this is useful.

https://drive.google.com/file/d/1FjAbwvuCv462o1YSR7SB01AlJIjCIJWy/view?usp=sharing
https://drive.google.com/file/d/1N_EIrJrmrYUlrKGU6uW1wIlkdS00nbaJ/view?usp=sharing
https://drive.google.com/file/d/1hr3I3VWaOykZTY-mfZpddYug-H0VNiCD/view?usp=sharing
https://drive.google.com/file/d/1j6GjMu1WeX3QPQRMUEVbJakl4Lxng9iU/view?usp=sharing
https://drive.google.com/file/d/1lZ8f7sVI4G8iRRJvLgF9ahdbMRCGsq-f/view?usp=sharing

EDIT: These file can be ignored. I made a mistake in my homebrew code that caused the screen tearing, and was not related to problem in this game.

@TJnotJT
Copy link

TJnotJT commented Dec 27, 2024

I submitted as PR #12127 that may address the issue in this game. Though I haven't tested it very well so potentially it could break other things. Much appreciated if anyone is able to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants