Shader CRT-Pi alternatiu en pipeline separat; selecció via config + presets (v0.6.0)
This commit is contained in:
1 parent
26b4d9e610
commit
ce5bec1b34
16 files changed
+11205
-8
No files matched your search
@@ -25,7 +25,9 @@ namespace Options {
|
||||
|
||||
struct Shader {
|
||||
bool enabled{Defaults::Video::SHADER_ENABLED};
|
||||
std::string current_shader{Defaults::Video::CURRENT_SHADER}; // "postfx" o "crtpi"
|
||||
std::string current_postfx_preset{Defaults::Video::POSTFX_DEFAULT_PRESET};
|
||||
std::string current_crtpi_preset{Defaults::Video::CRTPI_DEFAULT_PRESET};
|
||||
};
|
||||
|
||||
struct Video {
|
||||
@@ -49,6 +51,25 @@ namespace Options {
|
||||
float flicker{0.0F};
|
||||
};
|
||||
|
||||
// Preset del shader CRT-Pi (un per entrada a crtpi.yaml).
|
||||
struct CrtPiPreset {
|
||||
std::string name;
|
||||
float scanline_weight{6.0F};
|
||||
float scanline_gap_brightness{0.12F};
|
||||
float bloom_factor{3.5F};
|
||||
float input_gamma{2.4F};
|
||||
float output_gamma{2.2F};
|
||||
float mask_brightness{0.80F};
|
||||
float curvature_x{0.05F};
|
||||
float curvature_y{0.10F};
|
||||
int mask_type{2};
|
||||
bool enable_scanlines{true};
|
||||
bool enable_multisample{true};
|
||||
bool enable_gamma{true};
|
||||
bool enable_curvature{false};
|
||||
bool enable_sharper{false};
|
||||
};
|
||||
|
||||
struct Music {
|
||||
bool enabled{Defaults::Audio::MUSIC_ENABLED};
|
||||
float volume{Defaults::Audio::MUSIC_VOLUME};
|
||||
@@ -71,10 +92,12 @@ namespace Options {
|
||||
inline std::string config_version{};
|
||||
inline std::string config_file_path{};
|
||||
inline std::string postfx_file_path{};
|
||||
inline std::string crtpi_file_path{};
|
||||
inline Window window{};
|
||||
inline Video video{};
|
||||
inline Audio audio{};
|
||||
inline std::vector<PostFXPreset> postfx_presets{};
|
||||
inline std::vector<CrtPiPreset> crtpi_presets{};
|
||||
|
||||
// --- API pública ---
|
||||
void setConfigFile(const std::string& path);
|
||||
@@ -85,8 +108,14 @@ namespace Options {
|
||||
auto loadPostFXFromFile() -> bool;
|
||||
auto savePostFXToFile() -> bool;
|
||||
|
||||
void setCrtPiFile(const std::string& path);
|
||||
auto loadCrtPiFromFile() -> bool;
|
||||
auto saveCrtPiToFile() -> bool;
|
||||
|
||||
// --- Builders per als subsistemes ---
|
||||
[[nodiscard]] auto buildScreenConfig() -> Screen::Config;
|
||||
[[nodiscard]] auto buildPostFXParams() -> Rendering::PostFXParams;
|
||||
[[nodiscard]] auto buildCrtPiParams() -> Rendering::CrtPiParams;
|
||||
[[nodiscard]] auto buildActiveShader() -> Rendering::ShaderType;
|
||||
|
||||
} // namespace Options
|
||||
Reference in new issue
Block a user