diff options
| author | CamilleLaVey <camillelavey99@gmail.com> | 2026-09-10 15:14:02 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-09-10 15:14:02 +0200 |
| commit | ed566919f468e45ecb56e4e61185d98142a2cd1c (patch) | |
| tree | 5e9a1756c2b3fe99c9beabea0144a0e88e227bcb /src/video_core/post_processing/fx_effect.h | |
| parent | 5f142c7926d0c7fcbbd0ce30794d72f638a43b2a (diff) | |
[vulkan, android] Add feature of post-processing shaders on Android (#4348)
Very self-explanatory; implementation of the feature for post-processing shaders for Android (at least for now); will allow users to enhance the graphic quality of video games based on the use of multiple shaders adjustable, presets and more, inspired on the PPSSPP implementation, this feature adds 22 customizable shaders (1 pass) that lives on the overlay of the screen, which means that aside of the capability to chain multiple shaders on the screen, this doesn't have depths (pixel/ depth z-buffer) so it ensures the performance with it's use. Few shaders were a faithful port from PPSSPP with their respective attribution on the shader headers for their respective owners; and there are adaptations from public references/ cinematographic (Anime4K) and the rest are my own addition.
_Special Credits:_
1.- PPSSPP Team for their contribution on the public references for shaders: Henrik Rydgard, ShadX, SimoneT, KillaMaaki and guest(r).
2.- Niklas Haas.
3.- bloc97.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4348
Reviewed-by: lizzie <lizzie@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/video_core/post_processing/fx_effect.h')
| -rw-r--r-- | src/video_core/post_processing/fx_effect.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/video_core/post_processing/fx_effect.h b/src/video_core/post_processing/fx_effect.h new file mode 100644 index 0000000000..bedf68809a --- /dev/null +++ b/src/video_core/post_processing/fx_effect.h @@ -0,0 +1,77 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include <array> +#include <filesystem> +#include <string> +#include <string_view> +#include <vector> + +#include "common/common_types.h" + +namespace VideoCore { + +enum class FxUniformKind { + Boolean, + Integer, + Floating, +}; + +enum class FxUiType { + Hidden, + Slider, + Drag, + Combo, + Radio, + CheckBox, + Color, + InputBox, +}; + +struct FxUniformDesc { + std::string name; + std::string label; + std::string tooltip; + std::string category; + FxUniformKind kind{FxUniformKind::Floating}; + u32 components{1}; + FxUiType ui_type{FxUiType::Hidden}; + f32 ui_min{0.0f}; + f32 ui_max{1.0f}; + f32 ui_step{0.01f}; + std::vector<std::string> items; + std::array<f32, 4> default_value{}; +}; + +struct FxEffectDesc { + std::string file; + std::string name; + std::string label; + std::string description; + std::vector<std::string> techniques; + std::vector<FxUniformDesc> uniforms; + std::string error; + + bool Valid() const { + return error.empty() && !techniques.empty(); + } +}; + +std::filesystem::path GetFxRootDirectory(); + +std::vector<std::filesystem::path> GetFxIncludePaths(const std::filesystem::path& effect_path); + +std::filesystem::path ResolveFxTexturePath(const std::filesystem::path& effect_path, + std::string_view source); + +void ReloadFxCatalog(); + +const std::vector<FxEffectDesc>& GetFxCatalog(); + +const FxEffectDesc* FindFxEffect(std::string_view file); + +const FxUniformDesc* FindFxUniform(const FxEffectDesc& effect, std::string_view name); + +} // namespace VideoCore |
