Commit graph

40100 commits

Author SHA1 Message Date
Filoppi
a2702c6e27 Video: implement color correction to match the NTSC and PAL color spaces (and gamma) that GC and Wii targeted.
To further increase the accuracy of the post process phase, I've added (scRGB) HDR support, which is necessary
to fully display the PAL and NTSC-J color spaces, and also to improve the quality of post process texture samplings and
do them in linear space instead of gamma space (which is very important when playing at low resolutions).
For SDR, the quality is also slightly increased, at least if any post process runs, as the buffer is now
R10G10B10A2 (on Vulkan, DX11 and DX12) if supported; previously it was R8G8B8A8 but the alpha bits were wasted.

Gamma correction is arguably the most important thing as Dolphin on Windows outputted in "sRGB" (implicitly)
as that's what Windows expects by default, though sRGB gamma is very different from the gamma commonly used
by video standards dating to the pre HDR era (roughly gamma 2.35).

Additionally, the addition of HDR support (which is pretty straight forward and minimal), added support for
our own custom AutoHDR shaders, which would allow us to achieve decent looking HDR in Dolphin games without
having to use SpecialK or Windows 11 AutoHDR. Both of which don't necessarily play nice with older games
with strongly different and simpler lighting. HDR should also be supported in Linux.
Development of my own AutoHDR shader is almost complete and will come next.

This has been carefully tested and there should be no regression in any of the different features that Dolphin
offers, like multisampling, stereo rendering, other post processes, etc etc.

Fixes: https://bugs.dolphin-emu.org/issues/8941

Co-authored-by: EndlesslyFlowering <EndlesslyFlowering@protonmail.com>
Co-authored-by: Dogway <lin_ares@hotmail.com>
2023-06-19 01:34:42 +03:00
Filoppi
0584f8ae2a Video: fix Vulkan RGBA10_2 format to the actual most common one (used as swapchain format) 2023-06-18 12:58:40 +03:00
JosJuice
9943750866
Merge pull request #11973 from Minty-Meeo/string-improvements-part-1d
DITConfiguration: Use File::ReadFileToString
2023-06-18 09:56:52 +02:00
get
80575c4489 DITConfiguration: Use File::ReadFileToString 2023-06-17 19:38:15 -05:00
Admiral H. Curtiss
44498872e9
Merge pull request #11969 from AdmiralCurtiss/thats-no-bool
Jit64: Fix trampolines after #11834.
2023-06-18 01:38:13 +02:00
Admiral H. Curtiss
b71304230c
Jit64: Fix trampolines after #11834. 2023-06-18 01:31:44 +02:00
Admiral H. Curtiss
93d9e90798
Merge pull request #11962 from Minty-Meeo/to-underlying
EnumUtils: Add Common::ToUnderlying
2023-06-17 20:04:25 +02:00
Admiral H. Curtiss
4d03309878
Merge pull request #11965 from lioncash/sign
Qt/NetworkWidget: Get rid of some trivial sign conversions
2023-06-17 19:33:39 +02:00
Lioncash
696087cae0 Qt/NetworkWidget: Get rid of some trivial sign conversions
In all instances, these variables should be signed rather than unsigned.
2023-06-17 10:48:49 -04:00
get
7523a62105 Change unnamed enum in NativeVertexFormat.h to u32 2023-06-17 08:13:57 -05:00
Admiral H. Curtiss
79d5850e6a
Merge pull request #11960 from Minty-Meeo/dolphin-tool-code-review-4
DolphinTool: Use {fmt} library
2023-06-17 14:18:21 +02:00
get
07ad75f34f EnumUtils: Add Common::ToUnderlying
Mirrors the C++23 <utility> function, std::to_underlying
2023-06-17 07:15:33 -05:00
Admiral H. Curtiss
b8242c362e
Merge pull request #11961 from Minty-Meeo/dolphin-tool-code-review-5
DolphinTool: Less string copies
2023-06-17 14:10:59 +02:00
get
e67c196d2a DolphinTool: Less string copies 2023-06-16 21:51:06 -05:00
get
410c4ffe75 DolphinTool: Use {fmt} library 2023-06-16 21:45:59 -05:00
Admiral H. Curtiss
5029924ba1
Merge pull request #11954 from Minty-Meeo/dolphin-tool-code-review-3
DolphinTool: Use EXIT_SUCCESS and EXIT_FAILURE
2023-06-17 04:44:09 +02:00
Admiral H. Curtiss
1aef85a985
Merge pull request #11918 from TellowKrinkle/DPIScale
Improved DPI change handling
2023-06-17 04:07:13 +02:00
Admiral H. Curtiss
089d433996
Merge pull request #11956 from JosJuice/jitarm64-12-bit-asm
JitArm64: Micro-optimizations in fres routine
2023-06-17 04:00:22 +02:00
get
969eeb4b52 DolphinTool: Use EXIT_SUCCESS and EXIT_FAILURE 2023-06-16 21:00:10 -05:00
Admiral H. Curtiss
523f8c5776
Merge pull request #11953 from Minty-Meeo/dolphin-tool-code-review-2
DolphinTool: Ditch OOP design
2023-06-17 03:56:22 +02:00
get
25c020cbe2 DolphinTool: Ditch OOP design 2023-06-16 20:39:16 -05:00
Admiral H. Curtiss
98b5d72ef1
Merge pull request #11951 from Minty-Meeo/dolphin-tool-code-review-1
DolphinTool: Sensible changes
2023-06-17 03:03:26 +02:00
get
31e78c40a1 DolphinTool: Sensible changes 2023-06-16 18:28:03 -05:00
Admiral H. Curtiss
cbcf5bfac1
Merge pull request #11889 from Filoppi/patch-18
Fix video output having small black borders all the times
2023-06-16 17:59:51 +02:00
Admiral H. Curtiss
50301bf1d1
Merge pull request #11957 from lioncash/resource
UICommon/ResourcePack: Allow priority helpers to take arguments by const reference
2023-06-16 17:01:19 +02:00
Lioncash
653d6d059f UICommon/ResourcePack: Allow priority helpers to take arguments by const reference
There's nothing going on with behavior here that would prevent these
from being const qualified.

Also better communicates that this function isn't intended to modify the
given resource pack.
2023-06-16 10:20:50 -04:00
Admiral H. Curtiss
afa8a47be1
Merge pull request #11950 from jmallach/gtest
Allow building against system gtest
2023-06-16 16:08:44 +02:00
Admiral H. Curtiss
f5eea4a957
Merge pull request #11834 from Dentomologist/xemitter_use_pseudonamed_parameter_force5bytes
XEmitter: Add enum class Force5Bytes
2023-06-16 15:46:36 +02:00
JosJuice
9c13436e2b JitArm64: Improve instruction scheduling in fres routine
We want to have a low number of instructions between the LDP and the
MADD so that the MADD can start immediately after the LDP finishes
even if we're on a lower-end in-order CPU.
2023-06-15 22:02:39 +02:00
JMC47
f0f8225ff8
Merge pull request #11424 from Pokechu22/jit-imm-loadstore-update
Jit64: Attempt to fix updating stores with an immediate value
2023-06-15 11:32:30 -04:00
Jordi Mallach
51d4eea7c5 Allow building against system gtest 2023-06-15 10:32:05 +02:00
JosJuice
5b5124d9ff JitArm64: Use immediates more in fres routine
Not sure why I didn't do this to begin with. Maybe I was under the
impression that the most significant bit of a 12-bit immediate was a
sign bit.
2023-06-14 23:27:58 +02:00
Admiral H. Curtiss
bd125733f0
Merge pull request #11946 from Dentomologist/convert_fromwhichroot_to_enum_class
Common: Convert FromWhichRoot to enum class
2023-06-14 13:29:07 +02:00
Admiral H. Curtiss
88ff00a05c
Merge pull request #11942 from Dentomologist/convert_controlleremu_translatability_to_enum_class
ControllerEmu: Convert Translatability to enum class
2023-06-14 13:27:47 +02:00
Admiral H. Curtiss
79073c1a40
Merge pull request #11944 from lioncash/casts
PPCCache: Remove redundant reinterpret_casts
2023-06-14 13:25:48 +02:00
Admiral H. Curtiss
97f77f5b9f
Merge pull request #11947 from InfoManiac742/patch-2
Fix white bars in Ice Age 2: The Meltdown (GC)
2023-06-14 13:24:26 +02:00
InfoManiac742
8e68696d7a
Fix white bars in Ice Age 2: The Meltdown (GC)
Defer EFB Copies to RAM is necessary in order to avoid white bars obscuring the screen: see https://wiki.dolphin-emu.org/index.php?title=Ice_Age_2:_The_Meltdown_(GC)#White_Bars
2023-06-13 11:41:59 -10:00
Dentomologist
7ff7c9e84f Common: Convert FromWhichRoot to enum class 2023-06-13 13:25:22 -07:00
Charles Lombardo
89e7e7d669
Merge pull request #11925 from JosJuice/android-fix-dpad
Android: Fix overlay d-pad
2023-06-13 15:08:09 -04:00
JosJuice
ae4d52c838 Android: Fix overlay d-pad not working until finger moves
A switch case fallthrough was overlooked when translating from Java to
Kotlin.
2023-06-13 20:37:59 +02:00
JosJuice
c961c6c35a Android: Fix pressing up on overlay d-pad 2023-06-13 20:37:59 +02:00
Lioncash
708c986693 PPCCache: Remove redundant reinterpret_casts
The pointer is being passed to functions that take arguments as void*,
so we don't need to cast here.
2023-06-13 08:25:26 -04:00
Admiral H. Curtiss
6d16a09707
Merge pull request #11941 from Dentomologist/convert_blockingloop_stopmode_to_enum_class
Common: Convert BlockingLoop::StopMode to enum class
2023-06-13 11:47:20 +02:00
Admiral H. Curtiss
74c0519c54
Merge pull request #11930 from iwubcode/game_texture_validation
VideoCommon: don't reject game textures which have the wrong size
2023-06-13 11:43:35 +02:00
iwubcode
3e27fc7c0b VideoCommon: don't treat incorrect aspect ratio or sizes that aren't a multiple of native textures as an error 2023-06-12 21:19:29 -05:00
Dentomologist
527f8e783c ControllerEmu: Convert Translatability to enum class 2023-06-12 18:11:04 -07:00
Dentomologist
3c80f821c0 Common: Convert BlockingLoop::StopMode to enum class 2023-06-12 17:12:25 -07:00
Admiral H. Curtiss
63090d411d
Merge pull request #11940 from lioncash/debugiface
Common: Move DebugInterface.h into Core
2023-06-13 01:59:33 +02:00
Dentomologist
4c2759f541 XEmitter: Add enum class Jump
Replace the bool parameter force5bytes in J, JMP, and J_CC with an enum
class Jump::Short/Near. Many callers set that parameter to the literal
'true', which was unclear if you didn't already know what it did.
2023-06-12 13:04:18 -07:00
JMC47
c8559a7933
Merge pull request #11863 from Minty-Meeo/nkit-extract
Remove NKit data when extracting a GCN/Wii disc volume
2023-06-12 15:37:02 -04:00