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

PosS16Through: Treat Z as unsigned. #5428

Merged
merged 1 commit into from
Feb 13, 2014
Merged

PosS16Through: Treat Z as unsigned. #5428

merged 1 commit into from
Feb 13, 2014

Conversation

hrydgard
Copy link
Owner

@unknownbrackets This takes care of both the JITs as well.

@thedax
Copy link
Collaborator

thedax commented Feb 13, 2014

Wonder if this will help Phantasy Star Portable 2.. Proceeds to try it..

@hrydgard
Copy link
Owner Author

Probably not unless you also add Unknown's little Z hack? (z += 0.00001 in the vshader)

@thedax
Copy link
Collaborator

thedax commented Feb 13, 2014

Do I just add it anywhere in GenerateVertexShader? Sorry for going off-topic, I won't post anymore about it after this. :)

@hrydgard
Copy link
Owner Author

Try adding this on line 367 (after gl_Position = u_proj_through * vec4(position.xyz, 1.0);)

  WRITE(p, "  gl_Position.z += 0.000001;\n");

and possibly vary the amount of zeroes, heh.

@thedax
Copy link
Collaborator

thedax commented Feb 13, 2014

Unfortunately, it didn't help, so that game's issue is elsewhere. Thanks.

@dbz400
Copy link
Contributor

dbz400 commented Feb 13, 2014

I also tested #4836 as it has similar depth issue but didn;t help yet

@ThePhoenixRises
Copy link

May I ask a Noob question, What does this do in terms of fixing?
And also why is it Unsigned, does that make much difference?

@hrydgard
Copy link
Owner Author

It may fix some depth issues, if we were interpreting the Z values given by the game wrong.

@ThePhoenixRises
Copy link

Sorry you will have to put into simpler terms LOL, I am that Noobish.
Do you mean as in the different graphics layers are in the wrong order, like some sprites maybe in front of an object, but in the game on PSP should be behind it.

@hrydgard
Copy link
Owner Author

Yeah, pretty much. There are no graphics layers on the PSP though, things are sorted by depth buffer (google it).

@unknownbrackets
Copy link
Collaborator

Looks good to me.

-[Unknown]

@hrydgard hrydgard merged commit 79549e4 into master Feb 13, 2014
@hrydgard hrydgard deleted the through-z-unsigned branch February 13, 2014 16:45
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.

5 participants