lightningterror
cdb886a454
GS-hw: Implement missing st_int shader bit.
...
Was causing bad shader errors in GT4.
2022-10-24 16:22:44 +02:00
lightningterror
abcbdc4a25
GS-hw: Further improve how we handle blend mix 1.
...
Compensate slightly for Cd*(As + 1) - Cs*As.
Try to compensate a bit with substracting 1 (0.00392) * (Alpha + 1) from Cs.
The initial factor we chose is 1 (0.00392) as that is the minimum color Cd can be, then we multiply by alpha to get the minimum blended value it can be.
2022-10-18 15:20:41 +02:00
Connor McLaughlin
c2823aae39
GS: Fix fractional scaling in GL/Vulkan
2022-10-17 15:26:01 +01:00
TellowKrinkle
1ad6605dfb
GS:HW: Remove comment on rgba to 8i only-blue optimization
...
Doesn't seem to improve anything anymore (GPUs do this with csel now anyways, it's like 5 instructions with no divergence)
2022-10-17 10:28:27 +02:00
TellowKrinkle
c6add663f8
GS:HW: Clean up ps_convert_rgba_8i
2022-10-17 10:28:27 +02:00
Connor McLaughlin
6c17f7ad49
GS: Support fractional upscale
2022-10-15 17:37:35 +01:00
TellowKrinkle
9b5dd92dad
GS:HW: Use 16-bit unorm for HDR
2022-10-11 18:17:27 +02:00
refractionpcsx2
92cd6e8435
GS: Fix DX shader error
2022-10-09 04:53:18 +01:00
TellowKrinkle
0637682eb0
GS:HW: Properly handle fbmask of negative values
...
Previously was possible with blending and colclip, but now more common with the new hdr algorithm
2022-10-09 04:06:59 +01:00
TellowKrinkle
73ae9f8879
GS:HW: Make HDR algorithm more float-precision-friendly
...
- Use whole numbers instead of 255ths
- Use range -128 - 127 instead of 0 - 255 for accumulation blends
2022-10-07 20:44:53 +02:00
TellowKrinkle
1b34eb14f8
GS: Pass through primitive ID in geometry shaders in DX12 and VK
...
Fixes primid destination alpha on sprites
2022-09-06 21:07:56 +02:00
TellowKrinkle
412480b326
GS: Don't add 10 to date flag to indicate initialization
...
We already have 1 and 2 dedicated to the job
2022-09-06 21:07:56 +02:00
TellowKrinkle
62f9b16139
GS:OGL: Use blend min for primid destination alpha
2022-09-06 21:07:56 +02:00
TellowKrinkle
ea81b74e3b
GS:OGL: Add fetch_rt function to shader
2022-09-04 23:02:44 -05:00
lightningterror
6279ae63ce
GS-hw: Remove remaining 24bit destination checks for Ad.
2022-09-01 10:28:42 +02:00
lightningterror
edc82d77a5
GS-hw: Improve how we handle blending on 24bit with Ad factor in renderer.
2022-08-31 20:34:51 +02:00
TellowKrinkle
91601e5647
GS: Manually do bilinear sampling when converting RGBA to depth
...
Shader bilinear doesn't properly handle the case where r overflows into g (or g overflows into b, etc)
2022-08-20 10:12:24 +01:00
TellowKrinkle
882c09b870
Vulkan: Format convert.glsl
2022-08-20 10:12:24 +01:00
refractionpcsx2
5447da0588
GS: Don't do blend_mix on HDR
2022-08-16 20:54:55 +01:00
refractionpcsx2
1b18e02fe0
GS: Add constant adjustment in blend mix when reverse subtracting.
2022-08-16 20:54:55 +01:00
TellowKrinkle
cb64e8d504
GS:HW: More accurate blend equation for blend mix
2022-08-13 00:01:23 +02:00
lightningterror
6b48cf574d
GS-hw: Adjust how we handle specific blend mix cases.
...
Replace Cs*As + Cd*(1 - As) with Cs*As - Cd*(As - 1).
Replace Cs*F + Cd*(1 - F) with Cs*F - Cd*(F - 1).
As - 1 or F - 1 subtraction is only done for the dual source output (hw blending part)
since we are changing the equation.
Af will be replaced with As in shader and send it to dual source output.
Also check if A*Alpha in the shader overflows, if it does then adjust the
alpha that is sent for HW blending further to compensate.
2022-08-07 14:08:04 +02:00
refractionpcsx2
42b334efcd
GS-HW: Use correct alphas when AA1 is enabled + ABE disabled.
2022-07-18 09:40:21 +01:00
Stuart Kenny
f7d76ebf1d
GS: Add lottes crt to present shader.
2022-06-22 16:26:19 +02:00
lightningterror
d2904c1fd5
GS: Fix up wave filter shaders.
2022-06-14 21:25:47 +02:00
Connor McLaughlin
a9819542d4
GS: Split convert and present shaders
2022-06-05 21:27:16 +01:00
Stuart Kenny
0b2536dd3e
GS/HW: Fix typos in wave filter shader
2022-05-31 17:36:16 +01:00
refractionpcsx2
89d44a5f60
GS: Offset interlace when upscaling
2022-05-24 18:03:07 +01:00
Connor McLaughlin
b0f20c9973
GS/DX11: Fix MMOD=1 merge background color
2022-04-18 04:29:19 +01:00
Connor McLaughlin
1993203d26
GS: Add Direct3D 12 renderer
2022-04-15 12:56:41 +01:00
TellowKrinkle
5ecaa9459d
GS: Add Metal renderer
2022-03-31 23:51:27 -05:00
Connor McLaughlin
d32d8cc0ec
Shaders/FXAA: Fix warnings with Vulkan compiler
2022-03-28 09:24:51 +02:00
Connor McLaughlin
0cb9655523
GS/Vulkan: Remove unused color attribute
...
Would likely be getting optimized out anyway.
2022-03-28 09:24:51 +02:00
Connor McLaughlin
3067bef82d
GS/Vulkan: Implement FXAA
2022-03-28 09:24:51 +02:00
Connor McLaughlin
486764be03
GS/Vulkan: Implement shadeboost
2022-03-28 09:24:51 +02:00
Connor McLaughlin
4a5180bc0a
GS: Put shadeboost params in uniforms
...
Compiling variants for these is silly.
2022-03-28 09:24:51 +02:00
Connor McLaughlin
1927896442
GS: Fix some edge cases with fbfetch
...
Second alpha pass with A masked, DATE enabled, etc.
2022-03-21 20:24:09 +00:00
Connor McLaughlin
45682c382f
GS: Add NO_COLOR flag to PS (depth-only)
2022-03-20 23:41:33 +00:00
Connor McLaughlin
19d310475b
GS: Draw alpha pass when dual source blend is missing
2022-03-20 23:41:33 +00:00
Connor McLaughlin
a8b9df3952
GS: Utilize GL_EXT_framebuffer_fetch where available
2022-03-20 23:41:33 +00:00
Connor McLaughlin
bb75c78c1a
GS: Add option to disable texture barriers/geometry shaders
2022-03-20 23:41:33 +00:00
Connor McLaughlin
f73398ea84
GS/Vulkan: Fix warning when compiling RGBA8->RGB5A1 shader
...
Also gets rid of the program info log length check, since that's been
long removed in glslang.
2022-02-20 14:03:33 +00:00
lightningterror
b8236b1b1c
GS-hw: Partially revert #5540
...
Allow to wrap on colclip.
For real tho, ideal solution is sw blend, doing any clamp/wrap is wrong on blend mix.
2022-02-19 00:38:13 +01:00
lightningterror
1a3d77b2c0
GS-hw: Fix d3d11 depth sample shader.
...
Also adjust some comments to match updated shader names.
2022-02-18 19:21:01 +01:00
lightningterror
06766ddb98
GS-hw: Don't wrap on 16bit destination format for blend mix.
...
Helps Dog's Life blending, we shouldn't wrap as we do more blend math afterward which will be wrong if we wrapped before.
2022-02-18 19:00:54 +01:00
lightningterror
7151848406
GS-hw: Rename alpha_clamp to blend_mix.
2022-02-18 19:00:54 +01:00
Connor McLaughlin
dfe4bc199f
GS/HW: Use integers for depth conversion shaders
...
Fixes z-fighting in reflections in DBZ BT3, maybe others?
2022-02-15 10:41:37 +01:00
refractionpcsx2
d4b1d9abe5
GS-hw: Increase 32->16bit conversion accuracy
...
Improves Dogs life (no longer goes completely black right away, but has decal problems)
Vastly improves texture quality in Spider-Man 3 when using Framebuffer Conversion to fix the textures
2022-02-14 14:50:21 +00:00
refractionpcsx2
ad415945a6
GS-hw: Apply clamp/wrap when FBMask enabled
2022-02-11 19:33:38 +01:00
Connor McLaughlin
2684fd6b62
GS: Add depth copy convert shader
2022-02-03 15:20:35 +00:00