Commit graph

165 commits

Author SHA1 Message Date
Jean-Philip Desjardins
4064c4c5e0 Use GetDisplayBounds. 2021-09-03 13:28:55 -04:00
Jean-Philip Desjardins
095e4e4e8d Use scale from GS handler. 2021-08-20 11:11:45 -04:00
Jean-Philip Desjardins
6c23cb5c3e Remove unused ReadFramebuffer function. 2021-08-20 09:52:34 -04:00
Jean-Philip Desjardins
596e81fd38 Move VERTEX to GSHandler. 2021-08-19 21:01:17 -04:00
Jean-Philip Desjardins
7ab258204c Add textured line support in OpenGL. 2021-07-14 11:15:45 -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
5dda26feeb
Implement missing blendmode 1021
Fixes various things in Rule of Rose
2021-05-16 18:52:22 +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
96c47dd154 Remove old/unused technique code. 2021-04-15 13:12:23 -04:00
Jean-Philip Desjardins
2103eb1726 Add blending formulae. 2021-03-24 16:56:12 -04:00
Ian Brown
cfdf42dc08 Another 2 glCheckFramebufferStatus calls 2021-01-27 17:21:26 +00:00
Ian Brown
56957273b9 remove assertion code in release 2021-01-27 16:09:00 +00:00
Jean-Philip Desjardins
86d34c1eea Change how feature toggles are applied.
Fixes an issue with blending state not being properly invalidated.
2021-01-14 10:50:01 -05:00
Mahmood - Zer0xFF
67c4f1c546 scale framebuffer dump appropriately 2021-01-11 15:06:30 +00:00
Mahmood - Zer0xFF
0f871de2ec syntax cleanup 2021-01-07 21:47:29 +00:00
Mahmood - Zer0xFF
b9b7e1e675 use SendGSCall to access mailbox 2021-01-07 21:47:29 +00:00
Mahmood - Zer0xFF
abf49b299f fix texture colouring 2021-01-07 21:47:29 +00:00
Mahmood - Zer0xFF
63e57711e0 disbale code on GLES, GLES doesnt support GL_BGRA or glGetTexImage, these can be worked around using GL_RGBA, and attaching texture to debugger and reading with glReadPixels, however since these functions are use only in frame debugger, there is no need for a workaround 2021-01-07 21:47:29 +00:00
Mahmood - Zer0xFF
1fea18e2a1 update CGSH_OpenGL to match CGSH_Direct3D9 2021-01-07 21:47:29 +00:00
Jean-Philip Desjardins
c036662f3d Add missing blending formulae. 2020-12-23 16:04:59 -05: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
Ian Brown
e1b6c1b7bf review fix - move code to better respect ordering 2020-11-07 23:46:25 +00:00
Ian Brown
088fb0c2e1 Implement 2000 blend mode. Used by BGDA 2020-11-06 16:30:58 +00:00
Jean-Philip Desjardins
c1c2cef8b4 Add missing blending formulae in OGL. 2020-09-25 16:35:23 -04:00
Jean-Philip Desjardins
7d88ba6115 Code style fixes. 2020-06-16 16:47:24 -04:00
Jean-Philip Desjardins
a92bd3334e Add blending mode 1221 on OpenGL. 2020-06-16 16:47:24 -04:00
Jean-Philip Desjardins
ba86ba5c74 Only enable colorOutputWhite if alpha blending is enabled. 2020-06-16 16:47:24 -04:00
Jean-Philip Desjardins
74b2d6dfac Fix blending mode 1201 on OpenGL. 2020-06-16 16:47:23 -04:00
Jean-Philip Desjardins
51ef8171cf Add missing blending formulae in D3D9. 2020-06-16 16:47:22 -04:00
Björn Gerdau
4a7bad7fa9
Ensure that all drawing has completed before we do a local 2 local transfer 2020-06-11 23:28:48 +02:00
Björn Gerdau
c66cf09449
Handle CGSH_OpenGL::ProcessLocalToLocalTransfer texture write
If we do a local to local transfer, the destination might not be a framebuffer, but a texture.
2020-06-11 23:28:48 +02:00
Jean-Philip Desjardins
1cfd486fa4 Extract invalidation range computation logic.
Reuse in both OGL and D3D. Also makes it unit testable.
2020-04-30 18:55:09 -04:00
Björn Gerdau
79b4f4cbcc
Account for textures with 0 buffer width
This is used by DBZ Budokai Tenkaichi 2 and 3 at least.
2020-04-28 18:35:44 +02:00
Björn Gerdau
2030bf9a8f
Implement missing blendmode 1002
Fixes loading screen not rendering in Burnout 3

Vulkan implementation is missing as I lack required hardware
2020-04-23 11:28:52 +02:00
Jean-Philip Desjardins
01a0bf5634 Code style fixes. 2020-01-31 09:34:48 -05:00
Jean-Philip Desjardins
93a05d1e76 Implement presentation params. 2020-01-25 20:59:52 -05:00
Mahmood - Zer0xFF
9ee8c00959 cleanup 2020-01-25 22:37:13 +00:00
Mahmood - Zer0xFF
1de4a2b68e capture screenshot directly from display framebuffer, at rendering resolution 2020-01-24 12:43:34 +00:00
Mahmood - Zer0xFF
409ec5a8d0 allow GS to run in non-/threaded mode 2019-12-29 17:35:52 +01:00
Jean-Philip Desjardins
487a419ecf Remove useless asserts. 2019-11-21 12:30:08 -05:00
Jean-Philip Desjardins
2076edf3c0 Fix Linux build. 2019-08-17 13:51:31 -04:00
Jean-Philip Desjardins
5b3c42b94c Reset texture swizzle before presenting.
Fixes red hue in games like Okami.
2019-08-12 13:21:51 -04:00
Jean-Philip Desjardins
8cd4f76383 Code style fixes. 2019-08-09 13:10:49 -04:00
Jean-Philip Desjardins
af7a4781f7 Allow PSMCT24 and PSMCT32 framebuffers to use the same texture. 2019-08-09 13:10:48 -04:00
Jean-Philip Desjardins
65c279bd84 Formatting fixes.
(cherry picked from commit 4c57287c11f664e778bdda8f98437b4f9411afca)
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
e4d5884e45 Cleanup.
(cherry picked from commit b591064819be54ca9bdb75560062a03a69bea6cc)
2019-06-17 20:22:42 -04:00
Jean-Philip Desjardins
a22bd0e61d Add nice constants for depth test method. 2019-06-17 19:52:57 -04:00