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

Layering issues in Puyo Puyo Fever 2 (Windows x64 Build) #3663

Closed
internetakias opened this issue Sep 7, 2013 · 22 comments
Closed

Layering issues in Puyo Puyo Fever 2 (Windows x64 Build) #3663

internetakias opened this issue Sep 7, 2013 · 22 comments

Comments

@internetakias
Copy link

In PPF2, the layering is messed up when the renderer is set to OpenGL. Resulting in all the game objects besides the background being invisible. That is, util you wait long enough in the title screen for the demo puyo match to begin, then the game fixes itself for some reason.
Here are the display lists, one taken in the opening before a match and one taken after
https://gist.github.com/internetakias/6471825
As for screenshots, you can refer to this thread(Despite the big gap between the current version and the version used to take the screens, the bug remains the same): http://forums.ppsspp.org/showthread.php?tid=3858

@internetakias
Copy link
Author

Any update on this? This issue has been around for a while...

@hrydgard
Copy link
Owner

7 days? Come on.

@internetakias
Copy link
Author

No, I mean the layering issue, not this particular issue report

@internetakias
Copy link
Author

Any info on this? The game no longer crashes at the opening so I think it might be a good time for someone to look into this too

@unknownbrackets
Copy link
Collaborator

Some framebuffer bugs were recently fixed, has this changed at all?

-[Unknown]

@internetakias
Copy link
Author

I'm afraid not. The issue itself isn't related to buffered rendering anyway since it occurs regardless of whether it's on or off

@internetakias
Copy link
Author

Are there any plans to look into this? It's kind of a big issue, considering you can't see anything but the backgrounds and all.

@thedax
Copy link
Collaborator

thedax commented Jan 3, 2014

It's a depth issue like Phantasy Star Portable 2. If I use the same float depthRangeMin = zOff; "hack" as PSP2, it'll suddenly show correct looking graphics, but not 100% correct graphics (some intro/demo videos are still weird looking/missing things). There could be more to it than that, but that's one key element, anyway.

With the hack, I get a proper looking title screen:
Screenshot 01

Debugger shots without the hack:
Screenshot 02

Screenshot 03

@dbz400
Copy link
Contributor

dbz400 commented Jan 3, 2014

The most obvious fix for this hack is the logo below .Softgpu seems to be rendered all correct though

screen00217

@dbz400
Copy link
Contributor

dbz400 commented Jan 3, 2014

If i uses this one , also renders correct

 float depthRangeMin = gstate.getDepthRangeMin() / 65535.0f;

screen00218

@thedax
Copy link
Collaborator

thedax commented Jan 3, 2014

Indeed, but it leaves PSP2 horribly crippled. Wonder what the true min and max are..

@dbz400
Copy link
Contributor

dbz400 commented Jan 3, 2014

Ooops this look better .Try a depth range check here .(Fix PPF2 and PSP1 , PSP2 remains unchanged)

    float min =  gstate.getDepthRangeMin() / 65535.0f;
    float max =  gstate.getDepthRangeMax() / 65535.0f;
    float depthRangeMin = zOff - zScale;
    float depthRangeMax = zOff + zScale;
    if (depthRangeMin > min)
        depthRangeMin = min;
    if (depthRangeMax > max)
        depthRangeMax = max;

EDIT :seems to be breaking Jeannac D Arc

@unknownbrackets
Copy link
Collaborator

Let me compare with softgpu just to explain:

float vpz1 = getFloat24(gstate.viewportz1);
float vpz2 = getFloat24(gstate.viewportz2);

float retz = coords.z * vpz1 / coords.w + vpz2;

coords.z / coords.w is the z value. If z is unsigned, then vpz2 is the minimum value. If z is signed, then vpz2 - 1.0f * vpz1 is the minimum value... either way, vpz2 + 1.0f * vpz1 should be the maximal z value (when z is from 0 - 1 as it is in GLES - this is not the case on the PSP or in softgpu.)

Now, looking at this code:

float zScale = getFloat24(gstate.viewportz1) / 65535.0f;
float zOff = getFloat24(gstate.viewportz2) / 65535.0f;
float depthRangeMin = zOff - zScale;
float depthRangeMax = zOff + zScale;
glstate.depthRange.set(depthRangeMin, depthRangeMax);

It sets the range to vpz2 - vpz1 - vpz2 + vpz1. This assumes that the depth is signed, which I don't know if is true or not. Removing the zScale part from the depthRangeMin equation should assume that depth is unsigned.

See my thoughts here about sign:
#4572 (comment)

Maybe it's depending on throughmode or something?

-[Unknown]

@dbz400
Copy link
Contributor

dbz400 commented Jan 3, 2014

Another try to reverse the position of zoff and zscale , it show up all the missing stuffs (but instead missing out other stuffs)

    float depthRangeMin = zScale - zOff;

@dbz400
Copy link
Contributor

dbz400 commented Jan 3, 2014

@unknownbrackets , but i think it is done in non-through mode already ? (though mode already set to glstate.depthRange.set(0.0f, 1.0f);)

@unknownbrackets
Copy link
Collaborator

Ah, right, and that's probably correct.

zScale - zOff is definitely not right.

It may even be a rounding issue.

-[Unknown]

@internetakias
Copy link
Author

Like I mentioned above, when a puyo match begins, the game suddenly fixes itself. Do any of you know why that happens?

@unknownbrackets
Copy link
Collaborator

Has this improved at all with the recent depth changes?

-[Unknown]

@thedax
Copy link
Collaborator

thedax commented Feb 15, 2014

No, it's still as broken as before. This game's depth problems are the same as PSP2's, I think.

@internetakias
Copy link
Author

Not sure if this is even worth mentioning but the Dpeth range hack for PSP2 doesn't seem to work for this game.

@ppmeis
Copy link
Contributor

ppmeis commented Jul 25, 2015

Tested with latest build. Same status:
image

@daniel229
Copy link
Collaborator

Fixed in #7920

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

7 participants