refactor: eliminar sistema de shaders externos (ShaderManager + GpuShaderPreset)

Elimina el sistema multi-pass de shaders runtime en favor del PostFX nativo.
Queda solo el ciclo de 5 modos nativos: OFF → Vinyeta → Scanlines → Cromàtica → Complet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 17:08:08 +01:00
parent 8dde13409b
commit c052b45a60
24 changed files with 20 additions and 1512 deletions

View File

@@ -19,10 +19,8 @@
#include "gpu/gpu_ball_buffer.hpp" // for GpuBallBuffer, BallGPUData
#include "gpu/gpu_context.hpp" // for GpuContext
#include "gpu/gpu_pipeline.hpp" // for GpuPipeline
#include "gpu/gpu_shader_preset.hpp" // for NTSCParams, GpuShaderPreset
#include "gpu/gpu_sprite_batch.hpp" // for GpuSpriteBatch
#include "gpu/gpu_texture.hpp" // for GpuTexture
#include "gpu/shader_manager.hpp" // for ShaderManager
#include "input/input_handler.hpp" // for InputHandler
#include "scene/scene_manager.hpp" // for SceneManager
#include "shapes_mgr/shape_manager.hpp" // for ShapeManager
@@ -84,10 +82,8 @@ class Engine {
void setInitialPostFX(int mode);
void setPostFXParamOverrides(float vignette, float chroma);
// External shader presets (loaded from data/shaders/)
// Cicle PostFX nadiu (OFF → Vinyeta → Scanlines → Cromàtica → Complet)
void cycleShader();
void setInitialShader(const std::string& name);
std::string getActiveShaderName() const;
// Modo kiosko
void setKioskMode(bool enabled) { kiosk_mode_ = enabled; }
@@ -137,7 +133,6 @@ class Engine {
float getPostFXVignette() const { return postfx_uniforms_.vignette_strength; }
float getPostFXChroma() const { return postfx_uniforms_.chroma_strength; }
float getPostFXScanline() const { return postfx_uniforms_.scanline_strength; }
bool isExternalShaderActive() const { return active_shader_ != nullptr; }
private:
// === Componentes del sistema (Composición) ===
@@ -192,11 +187,8 @@ class Engine {
float postfx_override_vignette_ = -1.f; // -1 = sin override
float postfx_override_chroma_ = -1.f;
// External shader system
std::unique_ptr<ShaderManager> shader_manager_;
GpuShaderPreset* active_shader_ = nullptr; // null = native PostFX
int active_shader_idx_ = -1; // index into shader_manager_->names()
std::string initial_shader_name_; // set before initialize()
// Cicle PostFX natiu (0=OFF, 1=Vinyeta, 2=Scanlines, 3=Cromàtica, 4=Complet)
int postfx_cycle_idx_ = 0;
// Sistema de zoom dinámico
int current_window_zoom_ = DEFAULT_WINDOW_ZOOM;