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 indirect textures when format is not ITF_8 #9876

Merged
merged 2 commits into from Jul 11, 2021

Conversation

Pokechu22
Copy link
Contributor

This affects the skyward sword map. As mentioned in issue 9070, this regressed in #68 (tev_fixes_new), specifically in 3ea97f7. It turns out that this commit swapped the shifts used for "bump alpha" and the indirect offset; per libogc, the indirect offsets are the high bits and the bump alpha comes from the low bits. (This is further confounded by bump alpha being only 5 bits; in the most common ITF_8 case where bump alpha and the indirect offset are both from the same value, it seems like it does use the top 5 bits, though I haven't hardware tested it). The old code handled it mostly correctly, but because it was trying to implement bit manipulation using floats, it had various rounding issues (and was hard to understand).

@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • ss-map on ogl-lin-mesa: diff
  • ss-map on sw-lin-mesa: diff
  • ss-map on ogl-lin-radeon: diff
  • ss-map on uberogl-lin-radeon: diff

automated-fifoci-reporter

@Pokechu22
Copy link
Contributor Author

I've done a write-up of how the rendering on the map works, available here: https://gist.github.com/Pokechu22/dfebe2758d23faeba48bb7c9fb8557a2. It should explain everything pretty clearly.

@Tilka Tilka merged commit 20a8e9c into dolphin-emu:master Jul 11, 2021
11 checks passed
@philou-felin
Copy link

Thank you! I'm just an end user. Who fixed that? Pokechu22? This has to be highlighted in the next monthly report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants