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

TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha #10279

Merged
merged 3 commits into from Dec 22, 2021

Conversation

Pokechu22
Copy link
Contributor

@Pokechu22 Pokechu22 commented Dec 16, 2021

We were already doing this for non-intensity formats, but it seems like the same applies to intensity formats. Note that the software renderer already sets alpha to 1 for both intensity and regular formats.

This appears to fix Rygar: The Battle of Argus's white screens, but I can't tell if this fix is actually correct (as the game's bloom effect doesn't seem to work properly still); I also haven't hardware tested this behavior (but it seems like it's probably correct to me). It seems to roughly match the results I was getting with the hardware FIFO player, though. The bloom effect works properly in areas where it is enabled (which does not include the area that was experiencing the white screen), and I've confirmed with the hardware FIFO player that I get matching results in areas with bloom enabled. I haven't done a standalone hardware test confirming this behavior, but it seems like it is almost certainly correct.

@Miksel12
Copy link
Contributor

This also fixes https://bugs.dolphin-emu.org/issues/11875

@Pokechu22 Pokechu22 force-pushed the intensity-alpha branch 2 times, most recently from ac75b38 to ce0998d Compare December 19, 2021 02:03
@Pokechu22
Copy link
Contributor Author

I've added a patch that fixes https://bugs.dolphin-emu.org/issues/12629 (a game bug in Pokémon Battle Revolution resulting in black appearing in some screen effects), since it's related to the offset issue (11875).

I've also done a writeup explaining both the offset issue and the patch I made: https://gist.github.com/Pokechu22/e9fa9037fe21312ff32475638b78ba27. I plan on doing a second writeup examining how the bloom effect works with Rygar: The Battle of Argus and why that effect didn't work in Dolphin. (Note that some additional testing has already shown that the bloom effect does work in some cases with this patch; the game tries to disable the bloom effect in other situations, including the one for the fifolog I was working with before, which is why I initially thought it was completely broken).

@Pokechu22 Pokechu22 marked this pull request as ready for review December 19, 2021 02:08
… lacks alpha

We were already doing this for non-intensity formats, but it seems like the same applies to intensity formats.
The field itself is named half_scale, and it can be used for things unrelated to mipmaps, so reflecting that name in the fifo analyzer helps.
@Pokechu22
Copy link
Contributor Author

And here's the writeup of Rygar's bloom effect: https://gist.github.com/Pokechu22/f9c6f22388f1c37570a546b80fdd7ddc

@dolphin-emu-bot
Copy link
Contributor

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

  • pbr-sfx on ogl-lin-mesa: diff
  • pbr-sfx on ogl-lin-radeon: diff
  • pbr-sfx on uberogl-lin-radeon: diff

automated-fifoci-reporter

Copy link
Contributor

@iwubcode iwubcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable, untested.

@JosJuice JosJuice merged commit e6f40fa into dolphin-emu:master Dec 22, 2021
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants