Jean-Philip Desjardins
ab80978852
Fix condition.
2021-05-18 17:41:39 -04:00
Jean-Philip Desjardins
e25a21faf6
Do alpha blending in shader if we have framebuffer fetch.
2021-05-18 17:27:49 -04:00
Björn Gerdau
133ec91c32
Shader cleanup
...
Only write conditional color and alpha into the shader, if we can actually use it (framebuffer fetch extension only at the moment)
2021-04-28 19:13:51 +02:00
Björn Gerdau
347304a991
Make ALPHA_TEST_FAIL_* a bit more lenient
...
This change boils down to three changes:
1. ALPHA_TEST_FAIL_FBONLY:
Without framebuffer fetch: Instead of discarding the pixel, we also draw depth. From my testing, games look less broken this way (Full Metal Alchemist, or Persona 4 for example)
2. ALPHA_TEST_FAIL_RGBONLY:
With framebuffer fetch: Instead of discarding the pixel, we also draw depth.
Without framebuffer fetch: Draw the pixel as is - includes depth and alpha.
2021-04-28 19:13:51 +02:00
Björn Gerdau
38ef4c142e
Use framebuffer fetch (if available) on ALPHA_TEST_FAIL_KEEP, too
2021-04-26 16:37:53 +02:00
Björn Gerdau
53e5271bd9
Partially implement TEST_1/2 AFAIL on mobile via framebuffer fetch
...
When a alpha test fail method is set, and the trivial cases cannot be handled via color mask, we need to handle it in shader code.
TODO: This implementation based on framebuffer fetch, and thus only works on mobile. Also, this does not correctly handle cases where no depth should be written to the framebuffer.
2021-04-26 15:59:36 +02:00
Jean-Philip Desjardins
df9c9e06b3
Use framebuffer fetch to implement destination alpha test.
2021-04-23 08:45:12 -04:00
Jean-Philip Desjardins
59b85f565c
Implement texture clamping in shader on OpenGL.
...
To fix issues with shadow maps that bleed out.
2020-11-20 16:33:27 -05:00
Jean-Philip Desjardins
74b2d6dfac
Fix blending mode 1201 on OpenGL.
2020-06-16 16:47:23 -04:00
Jean-Philip Desjardins
e0fb0933f9
Remove unused code.
2019-08-09 13:10:48 -04:00
Jean-Philip Desjardins
41aebcb6d8
Redo depth handling from GS RAM POC branch.
2019-08-09 13:10:48 -04:00
Jean-Philip Desjardins
58950ca508
Disable dual source blending on macOS.
2019-07-23 12:28:50 -04:00
Jean-Philip Desjardins
5ee061a75b
Restrict usage of dual source blending to desktop platforms.
2019-05-21 12:42:50 -04:00
Jean-Philip Desjardins
aaa630c9d1
Use dual source blending to fix alpha values to frame buffer.
2019-05-21 12:42:50 -04:00
Jean-Philip Desjardins
7b9fc20694
Mark some variables as maybe unused.
2019-04-04 13:22:08 -04:00
Jean-Philip Desjardins
38494aa511
Cleanup.
2019-02-20 19:28:52 -05:00
Jean-Philip Desjardins
fe00f94202
Make precision of fract operation higher to prevent issues.
...
Seems to fix DMC3 rendering on iOS (PowerVR based devices).
2019-02-20 19:28:52 -05:00
Jean-Philip Desjardins
3ba5f0e3e9
Attempt at fixing alpha testing issue.
2019-02-20 19:28:51 -05:00
Jean-Philip Desjardins
0ef4e81547
TEST: Use a slightly different color combine function that is a closer match to reality.
2019-01-07 13:13:24 -05:00
Jean-Philip Desjardins
e08e4c8f6d
Fix framebuffer smearing occuring in some games.
...
(ie.: Dragon Ball Z: Infinite World)
2018-08-27 12:32:43 -04:00
Clang-Format
acf75535ec
Clang format
2018-04-30 21:01:23 +01:00
Jean-Philip Desjardins
f065965d4f
Added CopyToFb function.
...
Replaces glBlitFramebuffer for multisampled framebuffers.
2016-04-16 23:37:50 -04:00
Jean-Philip Desjardins
214ce5fc9c
Use uniform blocks to store shader parameters.
2016-04-16 23:37:45 -04:00
Jean-Philip Desjardins
c6c10447d7
Use highp on texCoord variable to prevent precision issues.
2015-12-20 17:42:18 -05:00
Jean-Philip Desjardins
8bc3a76524
Use specific versions of GLSL whether we're on mobile or desktop OpenGL.
2015-12-20 17:42:14 -05:00
Jean-Philip Desjardins
cbae904b87
Pushed input color manipulation operations to shaders.
...
Also removed MulBy2Clamp since it's not needed anymore.
2015-12-20 17:42:13 -05:00
Jean-Philip Desjardins
2e79950800
Added piece of code that was left out in previous commit.
2015-12-20 17:42:12 -05:00
Jean-Philip Desjardins
54ef78db8c
Removed code that is not compatible with GLES.
2015-12-20 17:42:12 -05:00
Jean-Philip Desjardins
2585c17463
Added support for texture clamping modes in GLES compatibility mode.
2015-12-20 17:42:12 -05:00
Jean-Philip Desjardins
52c04ce710
Added fog support in GlEs compatibility mode.
2015-09-02 23:18:24 +01:00
Jean-Philip Desjardins
fb141c7114
Changed the way GS output is presented on GLES.
...
Fixes issues with some bad GLES drivers.
2015-08-23 20:29:42 -04:00
Jean-Philip Desjardins
08ceb128ba
GLES: Use highp for texture coordinates.
...
Prevents visual issues appearing on some GPUs.
2015-08-15 02:50:02 -04:00
Jean-Philip Desjardins
89e1dfbf67
Added some missing new lines.
2015-08-08 22:16:13 -04:00
Jean-Philip Desjardins
50d5326adc
Moved alpha testing stuff to shaders so it can be used on GLES.
2015-07-28 22:25:53 -04:00
Jean-Philip Desjardins
a8d2cc564b
Fixed paletted texture rendering on GLES.
2015-07-20 01:24:03 -04:00
Jean-Philip Desjardins
ebd4394624
Fixed some shader compilation issues.
2015-06-06 02:38:38 -04:00
Jean-Philip Desjardins
0028f6e225
Enabled bilinear filtering support in GLES compatibility mode and fixed alpha handling.
2015-06-06 01:08:16 -04:00
Jean-Philip Desjardins
9d47cb7f80
Added support for other texture functions in GLES compatibility mode.
2015-06-05 00:37:40 -04:00
Jean-Philip Desjardins
93b1cfdc5b
Fixed paletted textures looking crappy on Tegra.
2015-06-02 03:09:10 -04:00
Jean-Philip Desjardins
528dd125f7
Fixed "half-screen" issue in GLES GS handler.
2015-05-26 23:55:12 -04:00
Jean-Philip Desjardins
5801895b1d
Fixed shader compilation.
2015-05-10 22:05:57 -04:00
Jean-Philip Desjardins
b712766a86
Added basic indexed texture support to GLES renderer.
2015-05-10 18:15:31 -04:00
Jean-Philip Desjardins
fcf1b11f1b
Moved EE and GS specific files in a separate folder.
2015-05-06 00:54:15 -04:00