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

Fix depth issues in multiple games #2772

Merged
merged 1 commit into from
Jul 14, 2013
Merged

Fix depth issues in multiple games #2772

merged 1 commit into from
Jul 14, 2013

Conversation

dbz400
Copy link
Contributor

@dbz400 dbz400 commented Jul 13, 2013

Finally fixes all the depth issues in Saint Seiya Omega , Gundam AGE Universe while not breaking Ridge Racer 2 .

screen00039

screen00038

screen00041

screen00042

screen00040

@dbz400 dbz400 mentioned this pull request Jul 13, 2013
@thedax
Copy link
Collaborator

thedax commented Jul 13, 2013

@raven02, I tried the build you linked on that Ys 7 issue page(#2774), and here's what we have in regards to Phantasy Star Portable 2:

Orphis 549: https://www.youtube.com/watch?v=i8eklj0PCEw
Yours: https://www.youtube.com/watch?v=v5RlEtRLpsg

Yours is more stable, but the glitches still persist. Could it be VFPU bugs or something?

@dbz400
Copy link
Contributor Author

dbz400 commented Jul 14, 2013

@thedax .Thanks for testing .I think some of he depth issue in PS2P should be fixed . The left glitches may be different one.

It would be nice if you can provide a savefile to me for PS2P for those problem area .I can test out from my side to see if can fix it .

@thedax
Copy link
Collaborator

thedax commented Jul 14, 2013

@raven02 : https://mega.co.nz/#!yYsyXYbD!C66PDTFDFSjb4dFm0JfyfjosypMEPsFzpUN2FcXr1Yw

It's a save file right after beating the first boss.

@hrydgard
Copy link
Owner

Seems really unlikely that the fog should be involved in that expression...

@dbz400
Copy link
Contributor Author

dbz400 commented Jul 14, 2013

I think so fog is not the good one to add but I think depthwriteTest is okay and it also fixes some more depth issues in some games

@dbz400
Copy link
Contributor Author

dbz400 commented Jul 14, 2013

@hrydgard , or do you mean we can use fog to detect but not in that expression or should be somewhere else ?

@thedax , thanks for the save. WIll try this out .

@solarmystic
Copy link
Contributor

@raven02

This is a solid commit. Merged it manually with my copy of the latest master updated to 0.8.1-551 and tested it with my usual suite of games.

No negative changes in every single one except for Ys Seven which is now fixed in many ways, just like @papel mentioned here #2774 (comment)

Great work.

@hrydgard
Copy link
Owner

Just saying that I don't think fog is likely to affect depth testing on the real hardware, which means that that part of the expression is yet another "hack that happens to help a few games". I can't be 100% sure of course though...

@dbz400
Copy link
Contributor Author

dbz400 commented Jul 14, 2013

Yep , i also think fog is not likely to be used there somehow and that's why i didn't use it for detection in the first place . Other than depthwrite , clearmode , throughmode , wondering any other you think may be related to depth testing?

@hrydgard
Copy link
Owner

Not really.

I really need to take the time to make a proper GPU test suite that we can run on the PSP to help figure these things out one of these days......

hrydgard added a commit that referenced this pull request Jul 14, 2013
Fix depth issues in multiple games
@hrydgard hrydgard merged commit b039768 into hrydgard:master Jul 14, 2013
@ghost
Copy link

ghost commented Aug 15, 2013

raven02, just to let you know, in the latest build Gundam AGE Universe's graphic is still bugged, there are some screenshots provided from a user on the forum, I didn't post mine since I got the same results with the latest build I tested the game with (0.8.1-1372-gf833872 win 7 x64). When a pull request is merged to master, it should be avaiable on the build, right?
gpaiwvb
7hhr8la

@papel
Copy link

papel commented Aug 15, 2013

@Gurlok
If the bug was fixed in v0.8.1-557, it may have returned in a later version.
Could you test it in v0.8.1-557-gb039768 ( http://buildbot.orphis.net/ppsspp/ )?

@ghost
Copy link

ghost commented Aug 16, 2013

@papel Indeed, it has returned, I tested the game with that build and the graphic is showing correctly (aside the little intro in which are shown the 2 characters in a black screen) as you can see in this screenshot
ksgua

I hope this can be fixed without major hassle.

@papel
Copy link

papel commented Aug 16, 2013

It will be difficult to find the commit that broke it.
It may have been broken in v0.8.1-751-gf9b4568 (#2908).
If it works in v0.8.1-749-g3139c5f and it is broken in v0.8.1-751-gf9b4568, we found the commit.

@hrydgard
Copy link
Owner

This is one of those super annoying depth issues, where it seems that whatever we do we break some games :/

@ghost
Copy link

ghost commented Aug 16, 2013

Both bad and good news, the graphic is broken on the 751-gf9b456 build...aswell on 749-g3139c5f too. Here some screenshot with both build used:

ksga1

ksga2

So I took the liberty to test as many builds as possible, going backward, and I think I found something:

The graphic worked fine for the last time on the 0.8.1-634-g1abd9ff build

ksga3

while it became broken on 0.8.1-636-g98524f3

ksga4

I hope that this can be a bit of help.

@unknownbrackets
Copy link
Collaborator

It's still the same general area unfortunately:

1abd9ff...98524f3

Pretty sure fog is not related...

-[Unknown]

@ghost
Copy link

ghost commented Aug 16, 2013

Yeah I thought that same, that's why I omitted the fog part, though I find fishy how the issue popped up again after "Remove !gstate.isFogEnabled()" was merged.

@dbz400
Copy link
Contributor Author

dbz400 commented Aug 16, 2013

A very annoying bug ...... wondering can we now add a hack section when per game setting ready .

@unknownbrackets
Copy link
Collaborator

I think it'd be much better to create tests and figure out the actual behavior of the PSP here.

-[Unknown]

@ghost
Copy link

ghost commented Aug 17, 2013

Let me know if I can be of help. Also it seems that in some parts of Gundam Age the problem persist even with the fix, as Kaxzu user stated on the game's thread on the forum: "Update: After playing for some hours, some areas suffer from the same issue as my screenshots in the OP, some areas are functioning without any issues at all, although the fix seem to put characters ahead of everything else in texture layer? for example: if a character is standing behind a wall, you can see the character clear as day". I asked him to post some screenshots.

EDIT: here are some screenshots

wxdi0iz

vpyphzt

9dtginh

bddqu5h

@dbz400
Copy link
Contributor Author

dbz400 commented Aug 19, 2013

This fix is not correct indeed and it did break other game . Initially , I did try to set depthwrite always be TRUE for this game and seems to be fixed all the graphical fixes .

glstate.depthWrite.set(GL_TRUE);

However , from one of your screenshot , there is a character show up behind the wall .

Could you able to try the above statements to see if same bug appears ? and try the following as well (i think the following should hide your character correctly)

glstate.depthWrite.set(depthMask ? GL_TRUE : GL_FALSE);

@ghost
Copy link

ghost commented Aug 19, 2013

Sorry to disappoint you but, I'm new when it comes to compiling a build. Also, the edit you are asking to make should be done on the latest or the older build (the one with the fix)?

@papel
Copy link

papel commented Aug 20, 2013

If this problem in Gundam AGE Universe has never been correctly fixed, it should be moved to its own issue thread, because it would be listed as an open bug.

@ghost
Copy link

ghost commented Aug 20, 2013

Well, I wonder, if it is only Gundam Age related. A user on the forum reported missing characters on saint seiya omega, which should be part of the games fixed by this pull request, right?

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

Successfully merging this pull request may close these issues.

6 participants