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

rsx: Treat blend colour as BGRA #6185

Merged
merged 1 commit into from Jul 11, 2019
Merged

Conversation

CookiePLMonster
Copy link
Contributor

@CookiePLMonster CookiePLMonster commented Jul 10, 2019

HARDWARE TESTS PENDING: @kd-11 mentioned he'll test it relatively soon.

This PR corrects decoding of SET_BLEND_COLOR RSX commands. Previously colour would be interpreted as RGBA, whereas it appears like it should have been treated as BGRA.

It's assumed this feature is not used by many games, and even the ones using it do not use it consistently.

Afftected games:

  • Gran Turismo HD Concept - fixes blue tail lights in some vehicles. Oddly enough, most cars looked just fine (and they still do), which hints blend color is not used to achieve red material color often.
  • Gran Turismo 5 - possibly affected. Untested, but screenshots from current RPCS3 builds show the same bug as in GTHD.

The most prominent example in GTHD is Infiniti G35, clearly showing what was wrong. Notice that the center brake light is correctly coloured in both cases!
Base Profile Screenshot 2019 07 10 - 21 59 49 20

Best reference from real PS3 I could find:
https://youtu.be/FAMPvAZ3VPc?t=1418

When testing for regressions, look for obvious miscolorations - red things becoming blue and blue things becoming red.

@mavethee
Copy link

The same issue was in GTA IV with cellphone.
But the thing that was blue supposed to be green. I need test that PR tomorrow ;)

@CookiePLMonster
Copy link
Contributor Author

That sadly sounds unrelated - or maybe the fix is not full. When you test, provide screenshots!

@elad335
Copy link
Contributor

elad335 commented Jul 11, 2019

No need for hw test, it matches cellGcm interface.

@elad335
Copy link
Contributor

elad335 commented Jul 11, 2019

Though atleast reorder the methods, they are supposed to be ordered in incrementing bits order.

@CookiePLMonster
Copy link
Contributor Author

CookiePLMonster commented Jul 11, 2019

No need for hw test, it matches cellGcm interface.

What about a 16-bit variation of this command? Currently the first chunk of the command carries RG, while the other carries BA. Is this valid or should also be switched, akin to a 8-bit version?

Though atleast reorder the methods, they are supposed to be ordered in incrementing bits order.

Will do!

@elad335
Copy link
Contributor

elad335 commented Jul 11, 2019

16 bits variation of them is fine.

@CookiePLMonster
Copy link
Contributor Author

Force pushed the requested change.

@kd-11 kd-11 merged commit f3551ce into RPCS3:master Jul 11, 2019
@CookiePLMonster CookiePLMonster deleted the set_blend_color branch July 11, 2019 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants