Commit Graph

12 Commits

Author SHA1 Message Date
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 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 0f5b17de0f GS/DX11: Implement automatic/manual LOD in pixel shader 2022-01-11 12:30:11 +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 08c00eed1e GS: Unify constant buffers between renderers 2021-12-22 11:41:57 +01:00
lightningterror 9368e29d62 GS-d3d11:fx: Flip x and y dithering positions. 2021-12-19 22:24:30 +01:00
TellowKrinkle ae8751e9ca GS:DX11: 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