summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PostProcessing.cpp
AgeCommit message (Collapse)Author
2026-04-24VideoConfig: Rename StereoMode::TAB to StereoMode::TopAndBottomDentomologist
2026-04-23VideoConfig: Rename StereoMode::SBS to StereoMode::SideBySideDentomologist
2026-01-24Clean includesSintendo
2026-01-24Common/FileSearch: Refactor DoFileSearchSintendo
2026-01-17Fix various typos and spelling mistakesSintendo
2025-10-26VideoBackends / VideoCommon: add support for specifying include files in ↵iwubcode
shader code
2025-03-09VideoCommon: Move backend_info out of VideoConfig struct.Jordan Woyak
2024-12-30Core/VideoCommon: Fix some weird (!eof) logic.Jordan Woyak
2024-01-23PostProcessing: Don't potentially leak memory in BlitFromTexture()Lioncash
All release() does is relinquish the pointer, rather than free the memory associated with it.
2024-01-23PostProcessing: Remove unnecessary get() calls in BlitFromTexture()Lioncash
We can just use operator-> instead.
2023-12-15VideoBackends / VideoCommon: add type enum to dictate whether a texture is a ↵iwubcode
2D texture, a texture array, or a cube map; support 2D texture type across backends Co-authored-by: TellowKrinkle <tellowkrinkle@gmail.com>
2023-12-11PostProcessing: Mark helper functions as staticLioncash
These didn't have any prototypes and were generating -Wmissing-declaration warnings.
2023-08-18Video: fix post process shaders with parameters failing to build on OpenGLFiloppi
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-18Video: implement output resampling (upscaling/downscaling) methodsFiloppi
2023-06-19Video: implement color correction to match the NTSC and PAL color spaces ↵Filoppi
(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-08Video: Fix Post Process shader options issuesFilippo Tarpini
-An assert would be erroneously thrown when shaders declared an array of 4 int or float options, despite 4 being the max supported (a simple <= / < mistake) -When changing the type of a shader option (e.g. from bool to float), the serialization would be stuck appending the value from the previous option type, making the shader fail to build permanently until the cache were cleaned
2023-04-13Common/IniFile: Move interface into Common namespaceLioncash
Gets this out of the global namespace and into the Common namespace
2023-01-31Split AbstractGfx out of RendererScott Mansell
Almost all the virtual functions in Renderer are part of dolphin's "graphics api abstraction layer", which has slowly formed over the last decade or two. Most of the work was done previously with the introduction of the various "AbstractX" classes, associated with texture cache cleanups and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal). We are simply taking the last step and yeeting these functions out of Renderer. This "AbstractGfx" class is now completely agnostic of any details from the flipper/hollywood GPU we are emulating, though somewhat specialized. (Will not build, this commit only contains changes outside VideoBackends)
2023-01-31Move Presenting, Dumping and ImGui out of RendererScott Mansell
2023-01-29VideoCommon: Don't create pipelines with no render targetsTellowKrinkle
Some backends don't like it when you do that
2022-08-02Common::Timer: use chrono::steady_clock internallyShawn Hoffman
2022-06-24D3D / VideoCommon: generate HLSL from SPIRViwubcode
2022-02-17VideoCommon: Convert OptionType to enum classDentomologist
2022-01-01VideoCommon: Add names for textures and shadersPokechu22
2021-07-18PostProcessing: fix link error when switching shadersTillmann Karras
Switching to a post-processing shader with different configuration options will change the UBO, so we need to recompile the vertex shader as well.
2021-07-07PostProcessing: Fix OpenGL UBO linking with configuration optionsblåhaj
2021-07-06Merge pull request #9862 from delroth/spdx-tagsMai M
Use SPDX for Dolphin licensing info
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-04-13Allow shaders to query reciprocal of window resolutionValeri
2020-11-17VideoCommon: Migrate over to fmtLioncash
Migrates off the printf-based formatting where applicable.
2020-05-25VideoCommon/ShaderGenCommon: Make template functions regular functionsLioncash
These are only ever used with ShaderCode instances and nothing else. Given that, we can convert these helper functions to expect that type of object as an argument and remove the need for templates, improving compiler throughput a marginal amount, as the template instantiation process doesn't need to be performed. We can also move the definitions of these functions into the cpp file, which allows us to remove a few inclusions from the ShaderGenCommon header. This uncovered a few instances of indirect inclusions being relied upon in other source files. One other benefit is this allows changes to be made to the definitions of the functions without needing to recompile all translation units that make use of these functions, making change testing a little quicker. Moving the definitions into the cpp file also allows us to completely hide DefineOutputMember() from external view, given it's only ever used inside of GenerateVSOutputMembers().
2019-12-29Use std::istringstream or std::ostringstream instead of std::stringstream ↵David Korth
where possible. This removes std::iostream from the inheritance chain, which reduces overhead slightly.
2019-11-23VideoCommon: Make use of fmt outside of shader generatorsLioncash
Migrates most of VideoCommon over to using fmt, with the exception being the shader generator code. The shader generators are quite large and have more corner cases to deal with in terms of conversion (shaders have braces in them, so we need to make sure to escape them). Because of the large amount of code that would need to be converted, the conversion of VideoCommon will be in two parts: - This change (which converts over the general case string formatting), - A follow up change that will specifically deal with converting over the shader generators.
2019-10-02PostProcessing: Use interface blocks for shadersStenzek
2019-10-02Renderer: Draw ImGui interface to both eyesStenzek
2019-10-02PostProcessing: Use correct layer in quad-buffered modesStenzek
Previously, only the left eye was being used.
2019-10-02PostProcessing: Don't use GS expansion shader for quad buffering w/ OpenGLStenzek
OpenGL doesn't render to a 2-layer backbuffer like D3D/Vulkan for quad-buffered stereo, instead drawing twice with the eye selected by glDrawBuffer() (see OGL::Renderer::RenderXFBToScreen).
2019-07-23StringUtil: Use std::string_view moreJosJuice
2019-07-16VideoCommon: Remove unused MathUtil.h include from VideoCommon.hLioncash
This header doesn't actually make use of MathUtil.h within itself, so this can be removed. Many other source files used VideoCommon.h as an indirect include to include MathUtil.h, so these includes can also be adjusted. While we're at it, we can also migrate valid inclusions of VideoCommon.h into cpp files where it can feasibly be done to minimize propagating it via other headers.
2019-05-04VideoCommon: Implement passive stereoscopic 3Diwubcode
2019-04-30Remove redundant initializationFilip Gawin
2019-02-19Move most backend functionality to VideoCommonStenzek
2019-02-13Use empty instead of sizeFilip Gawin
2018-05-21PostProcessing: Default constructor and destructor of ↵Lioncash
PostProcessingShaderConfiguration Also ensure that all members of the class are initialized on construction as well. Previously the bool indicating if options are dirty wouldn't be initialized, which could be read uninitialized if an instance was constructed and then IsDirty() is called.
2017-11-18VideoConfig: Make StereoMode an enum classLioncash
Makes for more strongly-typed identifiers (and doesn't pollute surrounding namespaces)
2017-06-23replace DoFileSearch with optimized versionShawn Hoffman
2017-04-25VideoConfigDiag: Move post-processing shader list to post processorStenzek
The backends don't use this list at all, and since more than one backend supports post-processing now, it's duplicate code.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2015-05-28Pass strings by const reference where possibleLioncash