-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GS/HW: Optimize sw/hdr colclip on some blend formulas. #11214
Conversation
kind of an aside but would be nice for clarity in this PR, can you update the variable names of alpha_less_one, alpha_c0_less_max_one, alpha_c2_less_one maybe make them less_eq_ or something, because they check <= not just < Further to that, couldn't Ad of <= 128 also pass if there's no overlap or alpha is masked (or As is <= 128 also, I guess)? You could also maybe omit the blend_a == 2, since as long as the subtraction is the destination colour, it shouldn't increase the intensity. |
That's already handled as CdAs, Cd(1 - As) since the formula is changed it's picked up. |
Alpha is either As or Af. `Cd*Alpha, Cd*(1 - Alpha).` When Alpha <= 128 we can let hw blend do it's thing as it won't be able to wrap.
1b26069
to
2d38826
Compare
So I checked if it's worth adding Ad conditions but nothing uses them so not going to add them. |
You forgot to rename a variable pxAssert(m_conf.ps.blend_d == 2 || alpha_one); |
Seems so, I'll fix it. |
Description of Changes
GS/HW: Optimize sw/hdr colclip on some blend formulas.
Alpha is either As or Af.
Cd*Alpha, Cd*(1 - Alpha).
When Alpha <= 128 we can let hw blend do it's thing as it won't be able to wrap.
Rationale behind Changes
Brrr, less draw calls, copies, barriers.
Suggested Testing Steps
Helps Sly 2, Big Mutha Truckers, Lord of the rings Third age, so test these games.