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

Make const mipmaps more consistent #9678

Merged
merged 2 commits into from
May 13, 2017
Merged

Conversation

unknownbrackets
Copy link
Collaborator

From what I can tell, slope is entirely constant. It sorta makes sense if you think of the slope as the UV slope, and this is an alternative to AUTO using the calculated slope.

Senjou no Valkyria 3 uses this on lamps. I didn't find a case with a slope other than 0.015, but the bias is then varied between -2 and 0, which in other words varies the level between 0 and 1 (even though there are 7 mip levels.) Maybe there are areas that use other slope values... I only checked two maps using them.

Anyway, this makes slope and const equivalent (after adding slope to bias), and flushes when slope changes.

-[Unknown]

Since SLOPE is just a more complicated CONST, we can treat them the same.
@hrydgard
Copy link
Owner

Code looks good, only worry is as usual possible performance effects due to changes in flushing. Let's try it.

@hrydgard hrydgard merged commit 8cff9f8 into hrydgard:master May 13, 2017
@unknownbrackets
Copy link
Collaborator Author

Right. These are the affected games:
http://report.ppsspp.org/logs/kind/912

I couldn't find where Grand Theft Auto was doing it. Valkyria was the only other one I had, and didn't see any real performance impact there (it seems to leave the slope register constant.)

Of course, this only lists games using the SLOPE mode, so there might be some crazy game fiddling with the register for no reason, but never using it. Hopefully not...

-[Unknown]

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.

2 participants