Commit Graph

12 Commits

Author SHA1 Message Date
Connor McLaughlin f33ee27f56 GS: Get rid of extra binding for channel shuffle
Having this binding was redundant, as there's no "normal" texture
sampled when we're doing a channel shuffle, and it caused issues in
Vulkan when the render target or depth buffer the source.

Also fixes the Urban Chaos HLE shader.

Fixes validation errors in GT4, NFS: Carbon, Urban Chaos, probably
others too.
2022-01-30 14:17:12 +00:00
lightningterror 3b691da8d1 GS-hw: Implement alternative hw blending for Cs*Ad, Cs*Ad + Cd, Cd - Cs*Ad.
Alpha destination value is wrong so let us try to compensate.

Multiply Cs by (255/128) in shader.
Will work best if Cs is 0.5 or less,  if it's higher than 0.5 then the closer to 1 the less accurate it gets.

Ofc it is best to use sw blending but it will help if sw blending is not present/selected for specific draw, will help d3d11 quite more.
2022-01-27 12:09:35 +01:00
lightningterror c9216e5625 GS-hw: Remove useless shader line from CLR As/Af case. 2022-01-24 11:42:54 +01:00
lightningterror 93af9656d0 GS-hw: Fix clr 1 case shader.
Forgot to rename.
2022-01-24 11:11:38 +01:00
lightningterror 4ab9d1a493 GS-hw: Implement alternative hw blending for Cd*As, Cd*F.
Do hw blend for Cd*As, Cd*F, expand the clear color blend method as it is almost the same.

Most helpful for dx11 ofc, for gl/vulkan will help with rendering on lower
levels of blending without needing a barrier.
2022-01-23 20:59:35 +01:00
lightningterror 3c92054a6e GS-hw: Move PABE shader bit to the top of sw blending.
Early return when there is no sw blending, no need to run the blend code.
Optimization.
2022-01-11 13:15:56 +01:00
Connor McLaughlin bce54a64ff GS: Use flat/nointerpolation for IIP=0 instead of GS 2022-01-02 15:06:39 +00:00
lightningterror 6a431daffc GS-hw: Extend Blend mix to work when alpha is higher than 1.
Clamp the alpha(As/Af) to 1 in the shader, it is already clamped to 1 in hw blend unit.
It should allow to better render the effects, still not fully accurate but it's closer to what we want.
Hopefully it helps D3D11 more.
2021-12-27 20:22:41 +01:00
Sergeanur 21bc56a8ba GS: Simulate scan mask 2021-12-26 11:51:25 +00:00
Connor McLaughlin efed92b15c GS/OpenGL: Move scaling factor to shader constant 2021-12-22 11:41:57 +01:00
TellowKrinkle a11b8c4750 GS:OGL: Use GSHWDrawConfig selector structs 2021-12-19 22:21:10 +01:00
TellowKrinkle da651cabe4 Resources: Move shaders to shared shader/ directory 2021-12-12 06:10:47 -06:00