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

Force positions to scale by 128/32768 as the psp does #6737

Merged
merged 2 commits into from
Aug 19, 2014

Conversation

unknownbrackets
Copy link
Collaborator

Haven't measured the performance impact carefully on mobile, but I'm hoping it's small.

Fixes #1963, fixes #4617, fixes #2077, and reportedly fixes glitches in other games too.

Note that normals were and still are converted using varying methods currently: software uses 127/32767, hardware may use 127.5/32767.5 or 128/32768 depending on skin/morph. However, position should with these changes be the same everywhere.

Does not round positions correctly, which may or may not be important, but this gets us closer to accurate anyway in a way that definitely fixes some issues.

-[Unknown]

This makes everything use floats for positions.  On some hardware/drivers,
this may be faster.  On some it may be slower.  We'll need testing to see
the performance impact.

Fixes Final Fantasy 4's pos misalignments, and probably others (like
Tekken 5 I suspect.)
@hrydgard
Copy link
Owner

Nice. Merging after 0.9.9.1 tonight.

It's pretty much all done the same way.  Note that normals have always
been a little inconsistent between 127/128 and 32767/32768.  But it's
probably not causing a major impact...
hrydgard added a commit that referenced this pull request Aug 19, 2014
Force positions to scale by 128/32768 as the psp does
@hrydgard hrydgard merged commit 544c264 into hrydgard:master Aug 19, 2014
@unknownbrackets unknownbrackets deleted the pos-scale branch August 19, 2014 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants