Commit graph

78 commits

Author SHA1 Message Date
Unknown W. Brackets
26dc773b2a
Merge pull request #16709 from unknownbrackets/shader-errors
Correct some shader errors in reporting
2023-01-02 13:51:23 -08:00
Henrik Rydgård
ae99b797d7 Remove some bad float suffixes 2023-01-02 22:30:01 +01:00
Unknown W. Brackets
c8728a12d0 GLES: Use mod() not fmod() in depal shaders. 2023-01-02 13:25:40 -08:00
Unknown W. Brackets
761fdd353f GPU: Avoid large constant in depal shader. 2023-01-02 12:59:19 -08:00
Unknown W. Brackets
49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Henrik Rydgård
524e92374f Use arrays more consistently. 2022-10-27 11:05:59 +02:00
Henrik Rydgård
80e1db07a7 Minor ShaderWriter refactor, prep for later changes 2022-10-24 17:45:18 +02:00
Henrik Rydgård
ecf2797173 Minor refactor of ShaderWriter flags. Extracted from the stereo PR 2022-10-23 21:57:01 +02:00
Unknown W. Brackets
157ffed57f D3D9: Add simple rendered CLUT handling.
I think there's still a deeper half-pixel offset issue, but this fixes
Brave Story.
2022-10-08 15:36:36 -07:00
Henrik Rydgård
e8aaf22163 D3D9 crashfix (flare doesn't render correctly though) 2022-09-15 17:22:09 +02:00
Henrik Rydgård
9907957242 Start implementing ApplyTextureDepal 2022-09-14 22:18:35 +02:00
Henrik Rydgård
b4d0ac2e1c Unify CLUT texture size at 512 to reduce complexity. Worth the extra bytes. 2022-09-13 11:56:56 +02:00
Henrik Rydgård
322f29ce80 Comments and fixes 2022-08-27 23:37:02 +02:00
Henrik Rydgård
27ba7438eb Comment fix, cleanup 2022-08-27 10:05:47 +02:00
Henrik Rydgård
693fd0870f Bugfix, better logging 2022-08-26 23:26:44 +02:00
Henrik Rydgård
dfccdc6367 More successful swizzle impl. Not perfect 2022-08-26 16:16:11 +02:00
Henrik Rydgård
6aecbef11f Unsuccessful swizzle implementation 2022-08-26 16:06:45 +02:00
Henrik Rydgård
1ccfd7986a wip 2022-08-26 15:51:25 +02:00
Henrik Rydgård
4390a05fe0 Fix shader compilation error in depth->565 2022-08-26 15:13:32 +02:00
Henrik Rydgård
67c911d13f Fix smoothed CLUT lookups. Shouldn't go beyond the mask's reach.
Should help #15896
2022-08-24 17:13:36 +02:00
Henrik Rydgård
5084743bbb Use Draw2D for depal shaders (except the actual blit, for now) 2022-08-23 11:21:40 +02:00
Henrik Rydgård
e3943f6d0d Implement smoothed depal for the "old" depal path as well. 2022-08-22 15:34:26 +02:00
Henrik Rydgård
82a6c42e17 DepalettizeCommon -> TextureShaderCommon. Simplifications. 2022-08-22 12:21:20 +02:00
Henrik Rydgård
a11e7e167b More D3D9 work on depth textures. Something still missing. 2022-08-21 09:58:58 +02:00
Henrik Rydgård
5a7bddbfa6 Allow binding depth as 565 by going through depal.
This is a partial fix for #6105 (Ratchet & Clank particles visible
through things), but there's still weird glitchiness. There's a pass
during rendering that scrambles the mini depth buffer by using a
triangle mesh. I wonder if it's trying to simulate the swizzle? But it
doesn't really look like it...
2022-08-21 09:58:58 +02:00
Henrik Rydgård
295f5f391e More consistent handling of lack of depth texture support. Small log improvement. 2022-08-20 08:05:53 +02:00
Henrik Rydgård
31fe0fc39e Remove some unnecessary bool returns. 2022-08-16 11:23:34 +02:00
Henrik Rydgård
252550fbd2 Enable framebuffer depth blits through raster. Fixes games like Jeanne D'Arc on D3D9. 2022-08-09 20:00:32 +02:00
Henrik Rydgård
852c395fb7 Texcoord attrs must be called a_texcoord0, this should be fixed. Oh well.
Also small fix for depth in float-depal.
2022-08-09 16:07:02 +02:00
Henrik Rydgård
83fd8a2fd8 Convert depal shaders to use the ShaderWriter. Add tests for depal shaders. 2022-08-09 15:32:27 +02:00
Henrik Rydgård
9bd4201c83 Cleanup 2022-08-09 10:47:54 +02:00
Henrik Rydgård
9a678406b9 Remove BGRA color swap in depal for D3D, no longer needed (and breaks Simpsons) 2022-08-08 14:10:55 +02:00
Henrik Rydgård
87b128ecaf Compiles on Vulkan, but doesn't yet work. 2022-08-06 18:27:03 +02:00
Henrik Rydgård
2fa9b0d0c7 Simplify 2022-08-06 18:27:03 +02:00
Henrik Rydgård
8aebf0dca4 Port the OpenGL depal path to thin3d 2022-08-06 18:27:02 +02:00
Henrik Rydgård
90a44579bf Implement color-to-depth for Vulkan, start implementing for D3D11 2022-08-01 11:30:36 +02:00
Henrik Rydgård
90460df9b5 HLSL depal simplification 2021-07-09 21:09:44 +02:00
Henrik Rydgård
4e8ffae024 Implement basic depth texturing for OpenGL, requires depth clamp for now.
Need to figure out what to do about other Z mappings.

Helps #6411 for OpenGL on desktop primarily, and certain other games affected by #13256
are likely working too like the fog in Harry Potter.
2021-07-09 21:09:44 +02:00
Unknown W. Brackets
3c09b5c010 GLES: Always use fragColor0 on GL 3.0+. 2021-04-10 16:26:39 -07:00
Henrik Rydgård
03e8eac6ef Merge the two ShaderLanguage enums. 2020-11-04 09:40:11 +01:00
Henrik Rydgård
af4d6e7642 Set up the test for D3D9, start fixing stuff. 2020-10-31 18:32:43 +01:00
Henrik Rydgård
5ee9cfef0d Remove support for D3D11_level_9 (previously only really used for Windows Phone, probably).
Can always fall back to D3D9, which is not going away anytime soon and
still needs to be there. One less HLSL variant to care about.
2020-10-29 00:52:19 +01:00
Henrik Rydgård
e80a526015 D3D11: Implement depth texturing. Fixes, for D3D11, #6411. 2020-10-18 20:14:25 +02:00
Henrik Rydgård
0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård
eda4bb2341 Test Drive: Allow virtual framebuffer copies. This eliminates the hyper expensive readbacks.
Write some comments in Depal about how we could get rid of the banding.
2020-08-30 16:21:56 +02:00
Henrik Rydgård
924329321c Throw in a minor simplification in depal. 2020-08-27 23:02:17 +02:00
Henrik Rydgård
0aa2ceb372 Address feedback 2020-08-10 09:16:28 +02:00
Henrik Rydgård
ba0d04a142 Vulkan: Implement depth texturing through depal. 2020-08-09 20:31:04 +02:00
Henrik Rydgård
c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Unknown W. Brackets
3ba6c1e42b GLES: Use fragColor0 in GLSL 3.30 float path.
This should only happen when 32 bit ints are unsupported, which has been
reported for a few devices.
2019-05-27 00:36:48 -07:00