Commit Graph

4877 Commits

Author SHA1 Message Date
JosJuice ba99d17ac0 VideoCommon: Fix custom shader constants on GLES 2023-08-22 19:38:18 +02:00
iwubcode 55fba7c0ed
VideoCommon/GraphicsModAsset: Error out if config key is not a string. 2023-08-22 02:40:08 +02:00
iwubcode 5506121685 VideoCommon: add support to graphics mod manager to load in assets and pass it to graphics actions 2023-08-20 18:53:27 -05:00
iwubcode 6ea0d17802 VideoCommon: when graphics settings change, trigger a reload of all custom shaders 2023-08-20 18:53:27 -05:00
iwubcode 931a8aa413 VideoCommon: add milliseconds elapsed time value to pixel shaders as a uniform to be able to support animation effects in custom shaders 2023-08-20 18:53:27 -05:00
iwubcode c7191382be VideoCommon: add custom pipeline action 2023-08-20 18:53:27 -05:00
iwubcode d320366954 VideoCommon: add custom shader cache to VertexManagerBase, supporting custom pixel shaders by replacing the existing pipeline with a modified one 2023-08-20 18:53:27 -05:00
iwubcode bedbf2b8c6 VideoCommon: add custom shader cache 2023-08-20 18:53:27 -05:00
iwubcode dbaf24ef09 VideoCommon: add data needed to support custom pixel shaders to graphics mod actions 2023-08-20 18:53:27 -05:00
iwubcode 4283d76718 VideoCommon: uber pixel shader gen changes needed to support custom pixel shaders in graphics mods 2023-08-20 18:53:27 -05:00
iwubcode e704385fce VideoCommon: pixel shader gen changes needed to support custom pixel shaders in graphics mods 2023-08-20 18:53:27 -05:00
iwubcode c3a370839a VideoCommon: add helper functions to handle generating custom lighting code for a custom pixel shader 2023-08-20 18:53:27 -05:00
iwubcode 0da5cf60a8 VideoCommon: add custom pixel shader definition and custom shader header to shadergen common as it will be used by both the special and uber shader variant of pixel shaders 2023-08-20 18:53:27 -05:00
Filoppi 80b453082d Video: fix post process shaders with parameters failing to build on OpenGL
This was because the shader uniforms between the pixel and vertex shaders
were willingly left different, to avoid filling the vertex shader with unnecessary
params. Turns out all backends are fine with this except OGL.
The new behaviour is now much more consistent and well explained,
the "default" shaders are the ones that always run, and the non default
ones are the user selected ones (if any).
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 a08792033a
Merge pull request #12103 from iwubcode/asset_load_system_time
VideoCommon: asset load time is now stored as a chrono system_clock time
2023-08-18 00:14:29 +02:00
Admiral H. Curtiss 23ae8c439c
Merge pull request #12112 from JosJuice/hires-texture-encoding
VideoCommon: Fix std::filesystem::path encoding conversion
2023-08-16 18:39:18 +02:00
JosJuice 86910f406e VideoCommon: Fix std::filesystem::path encoding conversion
In std::string, you can store strings using any encoding, but in Dolphin
we have decided to use UTF-8. The problem is that if you convert between
std::string and std::filesystem::path using the built-in methods, the
standard library will make up its own assumption of what encoding you're
using in the std::string. On most OSes this is UTF-8, but on Windows
it's whatever the user's code page is.

What I believe is the C++ standard authors' intended solution to this is
to use std::u8string instead of std::string, but that's a big hassle to
move over to, because there's no convenient way to convert between
std::string and std::u8string. Instead, in Dolphin, we have added helper
functions that convert between std::string and std::filesystem::path in
the manner we want. You *always* have to use these when converting
between std::string and std::filesystem::path, otherwise we get these
kinds of encoding problems that we've been having with custom textures.

Fixes https://bugs.dolphin-emu.org/issues/13328.
2023-08-16 09:56:56 +02:00
takayhan-AMD b969282b72 Remove out-dated hack of AMD driver issue WRT dual-source blending output index. 2023-08-15 23:58:29 -04:00
iwubcode eeb73460ab VideoCommon: asset load time is now stored as a chrono system_clock time, so that times can be fabricated in a future feature (without creating a file to do so) 2023-08-15 22:02:28 -05:00
Dentomologist 720191d1f7 AbstractFramebuffer: Fix Android reorder-ctor warning
Move declaration of m_additional_color_attachments so its initialization
order matches that of the constructor.
2023-08-12 20:48:47 -07:00
iwubcode 246b7c5bdb VideoCommon: fix regression with texture load order where the custom texture code was always updating the asset map for each texture with each entry, making it so the last value actually would be loaded instead of the first 2023-08-11 00:36:41 -05:00
JMC47 5512d19d4b
Merge pull request #12061 from iwubcode/cubemap_backends_only
VideoBackends: add support for cube maps for OGL, Vulkan, and D3D
2023-08-10 18:36:48 -04:00
iwubcode dca7c67105 VideoCommon: update NetplayChatUI's chat message input to use a hidden label. This avoids an error thrown by imgui 2023-07-29 00:27:07 -05:00
iwubcode 350e51951b VideoCommon: update imgui to 1.89.7 (and implot to 0.15); fix issues with upgrade; keep the demo code in case someone wants to reference it but don't compile it by enabling 'IMGUI_DISABLE_DEMO_WINDOWS' in config 2023-07-27 11:47:34 -05:00
Admiral H. Curtiss a76cc146e1
Merge pull request #12055 from iwubcode/skip_dump_async
VideoCommon: skip the texture dump if a custom texture is available, regardless if it is loaded or not
2023-07-23 19:53:25 +02:00
iwubcode fd74244339 VideoCommon: add custom texture message to provide a dirty means of debugging whether custom textures are installed correctly 2023-07-21 20:13:27 -05:00
iwubcode e892b7f1ac VideoBackends: add support for cube maps for OGL, Vulkan, and D3D 2023-07-21 19:09:40 -05:00
iwubcode f7e78742cf VideoCommon: skip the texture dump if the texture is using a custom texture, regardless of whether or not it is loaded yet 2023-07-19 23:44:41 -05:00
iwubcode 79f202ea5c VideoCommon: fix some compiler warnings for CustomAsset. FreeBSD compiler complained about a defaulted move constructor due to the mutex being implicitly deleted. Additionally, the const owning library deleted the copy constructor. 2023-07-16 19:45:55 -05:00
iwubcode 5740be15f9 VideoCommon: initialize load info variables 2023-07-16 12:56:03 -05:00
iwubcode 77511e8e7c VideoCommon: add material asset. A material is similar to other graphics engines where it provides data to be used in conjunction with a shader asset to generate a runtime AbstractShader 2023-07-09 12:21:34 -05:00
Admiral H. Curtiss 7bb04ff1dc
Merge pull request #12022 from iwubcode/texture_create_gmod_impl
VideoCommon: call into graphics mods create texture callback
2023-07-09 04:20:43 +02:00
Admiral H. Curtiss 0366122306
Merge pull request #12009 from iwubcode/shader_asset
VideoCommon: add a pixel shader asset
2023-07-03 03:24:11 +02:00
iwubcode a2ad3ca6f7 VideoCommon: don't do pointer copies during graphics mod callback iteration 2023-07-02 13:58:07 -05:00
iwubcode 0539bb4a3e VideoCommon: call into graphics mods create texture callback, providing additional asset dependencies that trigger the texture to be reloaded 2023-07-02 13:45:09 -05:00
Admiral H. Curtiss 6d7bf60071
Merge pull request #11991 from iwubcode/tcache_multiple_texture_dependencies
VideoCommon: allow multiple texture assets to associate with a texture cache entry
2023-07-02 20:14:32 +02:00
iwubcode a93e6e7397 VideoCommon: add support for allowing a TextureCache entry to be associated with multiple assets 2023-07-02 12:50:07 -05:00
Admiral H. Curtiss eedc1144c1
Merge pull request #11923 from iwubcode/multi-texture-compute-support
VideoBackends: support multiple compute images for some backends
2023-07-01 17:47:55 +02:00
Admiral H. Curtiss fa81006b51
Merge pull request #11955 from TellowKrinkle/CMakeDependencies
CMake: Allow ignoring system packages
2023-06-30 19:06:04 +02:00
iwubcode 6ea49c6746 VideoCommon: add a pixel shader asset 2023-06-30 01:32:53 -05:00
iwubcode 3627398cf5 VideoBackends: support multiple compute images for some backends (D3D, OGL, Vulkan) 2023-06-28 17:15:31 -05:00
Admiral H. Curtiss c04536c5d0
Merge pull request #11982 from iwubcode/graphics_mod_create_texture_callback
VideoCommon: add graphics mod callback interface for when a texture is created
2023-06-23 18:10:59 +02:00
Admiral H. Curtiss 02909bd1a5
Merge pull request #11850 from Filoppi/post_process_fixes
Video: implement color correction to match the Wii/GC NTSC/PAL color spaces (and gamma)
2023-06-23 18:08:23 +02:00
iwubcode 1d767c3a5b VideoCommon: add graphics mod callback interface for when a texture is created 2023-06-20 19:26:53 -05:00
iwubcode 2dc24a9148 VideoCommon: move cached texture asset to 'CustomAsset' common code 2023-06-20 18:59:55 -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
get 7523a62105 Change unnamed enum in NativeVertexFormat.h to u32 2023-06-17 08:13:57 -05:00