Skip to content

[TESTERS NEEDED] rsx/vk: Rewrite how blending works - #19410

Open
kd-11 wants to merge 20 commits into
RPCS3:masterfrom
kd-11:2026/programmable-blend
Open

[TESTERS NEEDED] rsx/vk: Rewrite how blending works#19410
kd-11 wants to merge 20 commits into
RPCS3:masterfrom
kd-11:2026/programmable-blend

Conversation

@kd-11

@kd-11 kd-11 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Introduces a ton of changes to how blending works in the emulator. Most of the implementation is Vulkan-only for now.

  1. Programmable blending is now supported for some edge cases where PS3 behavior diverges from PC
  2. Fixes ROP operation ordering. The correct order is sRGB -> Round8 -> AlphaTest -> Blend
  3. Fix WCB behavior for some formats especially the 16-bit formats like RGB565 under Vulkan
  4. Fix decoding of 16-bit blend constants. The previous assumptions have been completely disproven by hardware tests.
  5. Rework of the ROP export code greatly reduces emitted code for games when PB is not in use. Most trivial shaders are now only a few instructions long. This builds upon previous work done to shrink fragment shaders.

Closes #19269
Relates to #15061 (not closed because OpenGL impl is missing).

OpenGL implementation is currently not provided, it will come later. The amount of changes is already too large so it makes sense to split the work.

I have no idea how many games are affected here, the blast radius is massive. There are a few issues left out that will come later:

  1. The hardware tests need to be added to CI. The work here is verified across around 700 unique tests, we need to formalize them.
  2. There are optimization opportunities that I decided to ignore for the moment since the blend decode mechanism needs a refactor. This will be done before OpenGL implementation is attempted.
  3. The OpenGL implementation itself.

EDIT: Hardware tests attached:
rsx-blending-tests.zip


List of fixed issues:

  • LittleBigPlanet Karting: Fixed incorrect lighting
  • inFamous 1/2: Fixed refracting effects
  • Jak 1/2: Fixed refracting effects
  • Odin Sphere Leifthrasir: Fixed menu rendering

Fixes #19333
Fixes #19290
Fixes #11149
Partial fix #9150

kd-11 added 20 commits September 4, 2026 19:27
- Temporary measure. That really needs to be handled carefullly since most games will not actually need programmable blending.
- No need to rerun the blend config and depth state evaluation every time the shader changes.
- There's probably more that can be done, but I'll check later.
- The correct order is sRGB -> ROUND -> ALPHA_TEST -> BLEND
- Blending DOES NOT run in linear space at all. The bytes are decoded as-is.
- Regardless of the O/Z tag on the format, DST_ALPHA is always 1
- I don't know why it's that way, it shouldn't be but we're probably just looking at a hardware bug
@Megamouse Megamouse added the RSX label Sep 4, 2026
@AniLeo

AniLeo commented Sep 4, 2026

Copy link
Copy Markdown
Member

Fixes #19333

Screenshot_20260904_220035

@ShadowH69

ShadowH69 commented Sep 4, 2026

Copy link
Copy Markdown

Fixes #19290
Screenshot 2026-09-04 223620
Screenshot 2026-09-04 223658

edit Also mercury menu is fixed again

@MarioSonic2987

Copy link
Copy Markdown
Contributor

Fixes broken refraction effect in inFamous.

Before:
image

After:
image

@AniLeo

AniLeo commented Sep 4, 2026

Copy link
Copy Markdown
Member

Fixes broken refraction effect in inFamous.

Partially fixes #11149, Jax collection also needs to be verified

@RPCS3 RPCS3 deleted a comment from Jack54guythecoder Sep 4, 2026
@RPCS3 RPCS3 deleted a comment from Jack54guythecoder Sep 4, 2026
@RPCS3 RPCS3 deleted a comment from Jack54guythecoder Sep 4, 2026
@Virtua64

Virtua64 commented Sep 4, 2026

Copy link
Copy Markdown

Jak 1 looks fixed:

jak.mp4

@ShadowH69

Copy link
Copy Markdown

Partially fixes #9150

Menu correctly loads and displays
as for in-game , those lines are still visible when pausing the game along with the player ghosting issue and the bird is another example

Screenshot 2026-09-04 225535 Screenshot 2026-09-04 231937 Screenshot 2026-09-04 224710

@woj1993

woj1993 commented Sep 4, 2026

Copy link
Copy Markdown

Funny enought while testing this branch I had a graphical issue in Asuras Wrath but repeating the scene it played correctly. I thing I found a some kind of FIFO iassue but from my memory it arelady happened before so Asura Wrath tested and I didn't saw any difference

@kubacAkaGoomba

Copy link
Copy Markdown

Can confirm, this fixes the lighting bugs in LittleBigPlanet Karting:

Master:

image

PR:

image

On Master, it gets really bad on fully dark stages. Master:

image

PR makes some community levels finally playable. PR:

image

@ShadowH69

Copy link
Copy Markdown

I mean this was quite obvious it was still an issue but Dragon's crown is still broken just like the other Vanillaware game #4133
BLES01950_screenshot_2026_09_05_15_53_31

@sergus2008

Copy link
Copy Markdown

Regression: SoulCalibur IV (BLES00296) freezes within ~3 minutes on PR build.

Master 0.0.42-19931 works fine, 60 FPS, no freezes. PR: game hangs within 3 minutes — usually on character select screen or shortly after entering a mode. Tried Arcade, VS — same result in all modes.

Settings: WCB On, WDB On, Strict Texture Flushing On, Strict Rendering Mode Off, RCB Off. Vulkan, GTX 1070, i7-7700.

Log attached.
RPCS3.log

@sergus2008

Copy link
Copy Markdown

NFS ProStreet (BLES00177) — same hang as SC4

Game runs fine on master. On PR build, it hangs/freezes shortly after launch — same behavior as SoulCalibur 4. Log attached.

RPCS3.log

Infamous fix confirmed

No changes:
#11828
#18772

@Triticum0

Copy link
Copy Markdown

No changes on
#18194
#17628
#13749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment