94 Commits

Author SHA1 Message Date
Filippo Tarpini
0aa0071bec Update conversion matrix for NTSC-J
These were original calculated by @EndlesslyFlowering, and they've not came up with a new version that does chromatic adaptation (D93 to D65 white point) better, hence should be more accurate.

These are already in use in RenoDX:
283b859021/src/shaders/color.hlsl (L97C1-L103C49)
2025-12-21 04:13:46 +01:00
Filippo Tarpini
2049896cab Improve gamma corrected resampling by acknowledging the perceptual luminance 2025-04-30 15:22:06 -05:00
Luz Paz
cf1541a511 Data: fix various typos
Found via `codespell -q 3 -S "./Externals,./Data/Sys/wiitdb-??.txt,*.po,*.pot" -L andf,asnd,bootup,brocken,bufferin,clen,collet,datas,delt,diety,extint,fpr,inout,inport,interm,nd,nin,ontop,pixelx,re-use,re-used,sav,stateman,strat,transer,wil`
2025-03-10 16:54:34 -04:00
Sam Belliveau
fa4e45e915 Change the scaling process to be more uniform across color space 2024-04-04 00:27:01 -04:00
Sam Belliveau
069cf7e81f It's technically more correct to do it this way, difference is extremely subtle 2024-03-28 14:42:14 -04:00
Sam Belliveau
74a21a4d23 Increase Max Amplification 2024-03-27 00:55:46 -04:00
Sam Belliveau
50512366c3 Convert to Hybrid Log Gamma 2024-03-26 14:06:56 -04:00
Sam Belliveau
fba333dde5 Update PerceptualHDR with better color space 2024-03-10 12:52:54 -04:00
Sam Belliveau
f3d1cda672 Add PerceptualHDR 2024-03-10 03:25:20 -04:00
Filoppi
315992f254 Fix sharp bilinear using ceil instead of floor 2023-12-18 01:43:25 +02:00
Admiral H. Curtiss
6309aa0010 Merge pull request #12175 from Sam-Belliveau/correct-area-sampling
Corrected Area Sampling Range
2023-11-15 01:49:45 +01:00
Sam Belliveau
7894b40111 Fix inner area sampling loop from going beyond bounds 2023-11-14 12:05:12 -05:00
Filippo Tarpini
84c8eb5a01 Make AutoHDR work with color luminance instead of average
This gives more consistent results.
My main ReShade has also been updated with the same change: https://github.com/Filoppi/PumboAutoHDR
2023-09-09 18:12:47 +03:00
Sam Belliveau
d4f8c1b2bd fixed area sampling 2023-08-21 14:20:44 -04:00
Filoppi
fc3f7866f8 Video: Fix area/box resampling shifting the output by about one pixel when upscaling and downscaling 2023-08-18 02:00:56 +03:00
Sam Belliveau
39d96a21a8 Video: Improved Tooltips & Bicubic (#5)
Edited by Filoppi
2023-08-18 02:00:56 +03:00
Sam Belliveau
ca93a5191f Video: Added Box Resampling
Edited by Filoppi
2023-08-18 02:00:56 +03:00
Filoppi
2edf81cdb0 Video: implement output resampling (upscaling/downscaling) methods 2023-08-18 02:00:55 +03:00
Admiral H. Curtiss
1854ff0142 Merge pull request #12003 from Filoppi/auto_hdr
Add AutoHDR post process shader
2023-08-18 00:20:08 +02:00
Filoppi
a924483dc5 Add AutoHDR post process shader 2023-06-29 14:24:27 +03:00
TellowKrinkle
6ac20aea81 Video: Fix shaders on OpenGL 4.1 2023-06-28 01:08:08 -05:00
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
Filippo Tarpini
79120e0d33 Video: Fix lens_distortion post process shader not compiling
`any()` failed to build on my machine, but it doesn't seem to be necessary
2023-06-01 20:32:16 +02:00
degasus
57088ebb82 Shaders: Add error message for asciiart shader if shader_subgroup is missing.
This extension is currently required to get good performance.
So instead of maybe triggering a GPU hang, let's just disable the shader and show a warning instead.

Sadly our postprocessing framework does not support reporting a warning, so the way to display the warning is a bit hacky.
But this is an ascii-art shader, we already have a font in the shader, so let's use it.
2023-03-29 23:12:50 +02:00
degasus
4780953172 Shaders: Clang-format
With no modification.
2023-03-29 23:12:50 +02:00