lightningterror
ae8808b86e
GS/HW: Backport some tex is fb shaders to dx and opengl.
2025-05-15 20:08:16 +02:00
Filoppi
8be2b907b3
GS: Add actual HDR and HQ textures and rename the "HDR" textures to colclip (hw) given that's actually what they are (HDR was a very loose term for it)
2025-04-18 19:11:11 +02:00
refractionpcsx2
a6d5598c08
GS/HW: More RT in RT regression fixes
2025-04-17 18:54:33 -04:00
refractionpcsx2
fed266f5ac
GS/HW: Fixes to texture is target offsets
2025-04-17 18:54:33 -04:00
refractionpcsx2
a547d10ab9
GS/HW: Further fixes for RT in RT changes in behaviour
2025-04-17 18:54:33 -04:00
refractionpcsx2
0b53f541d1
GS/HW: Initial work implementing RT in RT support
2025-04-17 18:54:33 -04:00
JordanTheToaster
d2c31df106
GS/HW: Mask 16bit colours when blending is disabled
2025-04-12 01:50:37 +02:00
TellowKrinkle
7910506b3c
GS:HW: Avoid using blend + fbfetch for AFAIL RGB_ONLY
2025-03-22 15:47:37 -05:00
lightningterror
d3e288447f
GS/HW: Cleanup gl and vk shaders.
...
gl: Rename fetch_rt to sample_from_rt to match vk shaders, remove old atst call.
vk: Make sure shuffle values have correct unsigned type.
2025-02-17 21:27:34 +01:00
refractionpcsx2
2d6a42ac06
GS/HW: Reduce number of copies for HDR
2025-02-03 16:48:47 -05:00
TheTechnician27
23fd57f641
Copyright: Change year from 2002-2024 to 2002-2025
2025-01-20 05:07:26 +01:00
lightningterror
67d7744f7f
GS/HW: Further expand blend multipass.
...
For formulas:
Cs*Alpha + Cd*(1 - Alpha).
Cd*Alpha + Cs*(1 - Alpha).
Where Alpha is higher than 1 and is either As or Af.
2024-08-27 13:38:44 +02:00
lightningterror
40d5c78573
GS/HW: Implement PABE(Per pixel alpha blending) on accumulation blend and add optimizations.
...
PABE accumulation blend:
Idea is to achieve final output Cs when As < 1, we do this with manipulating Cd using the src1 output.
This can't be done with reverse subtraction as we want Cd to be 0 when As < 1.
Blend mix is excluded as no games were found, otherwise it can be added.
PABE Disable blending:
We can disable blending here as an optimization since alpha max is 128
which if alpha is 1 in the formula Cs*Alpha + Cd*(1 - Alpha) will give us a result of Cs.
2024-08-22 21:39:19 +02:00
lightningterror
f9fbecc783
GS: Match data types in shaders to be the same when doing bitwise operations.
2024-08-11 00:35:42 +02:00
GovanifY
132431b7c8
headers: relicense to GPL-3.0+
...
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
lightningterror
75defbeded
GS/HW: Adjust point sampler behavior.
...
VK/GL/Metal: Get rid of it completely as it doesn't seem needed anymore.
DX: Only enable it with combination with GPU Palette Conversion enabled as that's when the issue occurs.
Test: See if Metal breaks with no point sampler.
2
2024-07-09 19:20:38 +02:00
Stenzek
ec8d5d1b71
GS/HW: Allow use of trilinear with shader sampling
2024-06-24 10:15:48 +10:00
lightningterror
abec2738b9
GS/HW: Extend blend second pass to more blend formulas v2.
...
Cd*(1 + Alpha).
Alpha = As, Ad or Af.
For As or Af case when alpha > 128.
For Ad case when there is no RTA correction.
2024-06-14 21:40:31 +02:00
refractionpcsx2
d34f359621
GS/HW: Correct TEXA behaviour on shuffles
2024-06-08 19:26:35 +01:00
refractionpcsx2
256babd337
GS/HW: Allow forcing Dither to 32bit for 16bit draws
2024-05-25 02:13:33 +01:00
Stenzek
aa48256010
GS/HW: Round alpha values for indexed sample of RTA
2024-04-28 17:40:20 +02:00
lightningterror
d824ae6e0c
GS/HW: Extend blend second pass to more blend formulas.
...
`Cs + Cd*Ad, Cs - Cd*Ad, Cd*(1 - Ad), Cs*(1 + Ad), Cs*(1 - Ad).`
2024-04-23 02:00:02 +02:00
refractionpcsx2
30f4e77b31
GS/HW: Rearrange color on shuffle if SW Blend or TFX
2024-04-08 12:09:30 +01:00
Stenzek
11ee0a8613
GS: Remove reduced-depth-range hack
2024-03-29 20:44:02 +10:00
Stenzek
7ddf6386f1
GS: Remove DSB feature
...
No longer needed, since it's mandatory.
2024-03-29 20:44:02 +10:00
Stenzek
a317e9c038
GS/HW: Improve accuracy of RGB_ONLY AFAIL
...
Instead of breaking the draw into two passes, which breaks when
fragments overlap each other and blending is enabled, use blending to
leave the value of Ad intact when a pixel fails the alpha test.
In the case of DATE being enabled, prefer PrimID over stencil, as since
we are changing Ad on a per-fragment basis, with some fragments not
being modified, stencil DATE will become desynchronized with the value
of Ad.
2024-03-28 11:46:20 +10:00
Stenzek
0917d49a01
GS: Remove separate alpha pass fallback
...
This is just wrong when overlap and depth writes are involved.
2024-03-28 11:46:20 +10:00
refractionpcsx2
059ec49389
GS/HW: RTA improvements and enhancements
2024-03-25 17:58:12 +00:00
refractionpcsx2
4ba43b8496
GS/HW: Improve channel + texture shuffle detection and processing
2024-03-24 11:38:33 +00:00
refractionpcsx2
bfef8397d6
GS/HW: Allow source is rt to use corrected alpha in most cases.
2024-03-17 17:24:39 +01:00
lightningterror
0900c2fd8b
GS/HW: RTA Correction, implement on DATE.
...
Less copies, and makes it work with DATE.
2024-03-17 17:24:39 +01:00
lightningterror
58628b8dd3
GS/HW: Make sure we don't multiply Cs if Ad is corrected.
...
Another potential to avoid copies.
2024-03-17 17:24:39 +01:00
lightningterror
71376ff4e6
GS/HW: Decorrect Ad on sw blend in tfx shader.
...
Otherwise if we do decorrection in covert shader we add more copies.
Also make sure to decorrect for fbmask, tex is fb.
2024-03-17 17:24:39 +01:00
lightningterror
6c9f132093
GS/HW: Add support for Ad (RTA) correction.
...
The idea is to adjust the alpha destination for more
accurate hw blending which will work on all renderers.
Old behavior has Ad in range within 0-1 whereas for blending 0-2 is needed.
copy rt -> adjust the alpha -> copy back the adjusted alpha-> restore old alpha after blending is done
2024-03-17 17:24:39 +01:00
lightningterror
a7c5eebf99
GS/HW: Adjust blend mix for impossible blend.
...
Since we can't do Cd*(Alpha + 1) - Cs*Alpha in hw blend what we can do is adjust the Cs value that will be subtracted,
this way we can get a better result in hw blend. Result is still wrong but less wrong than before.
2024-03-14 16:16:11 +01:00
lightningterror
c0e47767b7
GS/HW: Adjust dither on Blend Mix when Cs-Cd * Af blend.
2024-03-10 23:41:18 +00:00
refractionpcsx2
65649b3cbb
GS/HW: Adjust dither on Blend Mix when Cs-Cd * As blend.
2024-03-10 23:41:18 +00:00
refractionpcsx2
4b88256df2
GS/HW: Allow palette lookups from depth and deswizzle manual deswizzles
2024-02-01 00:13:39 +00:00
refractionpcsx2
badede2e2d
GS/HW: ignore lower 3 bits of 16bit color for AEM check
2024-01-15 14:45:00 +00:00
refractionpcsx2
01842a3c6b
GS/HW: Allow blending on normal shuffles
2024-01-09 13:17:52 +00:00
Stenzek
d9abe10308
Misc: Remove explicit PCH include, switch to SPDX
2023-12-24 14:03:14 +10:00
lightningterror
f96e7a9156
GS/HW: Rename dfmt to dst_fmt.
...
It was confusing whenever the d meant depth or destination, this should make the code easier to read.
2023-10-19 19:25:13 +02:00
lightningterror
846c9cec6a
GS/HW: Adjust how we handle RT alpha in blending.
...
When both rt min and max are equal then we know what Ad value is,
if so use Af bit instead and set AFIX value from rt alpha value that we know.
On OpenGL when BLEND C == 1 but reading the rt is disabled, set the value to 0 instead
of reading an undefined value.
2023-08-12 18:14:37 +02:00
lightningterror
7fadb6ed05
GS/HW: Cleanup texture shuffle shaders.
2023-08-11 15:23:50 +01:00
refractionpcsx2
5a3ba4e563
GS/HW: Add support for complex offset shuffles
2023-08-11 13:14:19 +01:00
Stenzek
784118e9c1
GS/HW: Don't drop fractional colour before modulating
...
Fixes banding in Xenosaga, Tales of the Abyss, Beyond Good and Evil.
2023-07-28 16:31:35 +01:00
lightningterror
3dce969a5e
GS-shaders: Add missing copyright headers.
2023-07-21 10:24:15 +02:00
TellowKrinkle
e221d31b45
GS:OGL:Shaders: Formatting
2023-04-30 23:48:49 +02:00
Stenzek
f569ad0970
GS/HW: Allow translating targets for depth sources
...
Fixes broken half screen in Miami Vice and 10 Pin - Champions Alley.
2023-04-09 17:56:49 +01:00
Stenzek
d70334ee57
GS/HW: Slight shader simplification
...
- Don't declare texture if it's not read from. Stops Vulkan validation
layers whinging.
- Get rid of OpenGL common_header.glsl, and use name linking instead of
leftovers from separate shader objects.
2023-03-30 21:55:50 +01:00