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
@@ -4,8 +4,10 @@
|
||||
#include <SDL3/SDL_gpu.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "core/rendering/sdl3gpu/pipelines/crtpi_pipeline.hpp"
|
||||
#include "core/rendering/shader_backend.hpp"
|
||||
|
||||
// Uniforms enviats al fragment stage cada frame.
|
||||
@@ -48,6 +50,8 @@ namespace Rendering {
|
||||
void uploadPixels(const std::uint32_t* pixels, int width, int height) override;
|
||||
void render() override;
|
||||
void setPostFXParams(const PostFXParams& params) override;
|
||||
void setActiveShader(ShaderType type) override { active_shader_ = type; }
|
||||
void setCrtPiParams(const CrtPiParams& params) override;
|
||||
void setVSync(bool vsync) override;
|
||||
void setPreferredDriver(const std::string& driver) override { preferred_driver_ = driver; }
|
||||
void cleanup() override;
|
||||
@@ -75,6 +79,8 @@ namespace Rendering {
|
||||
SDL_GPUTexture* scene_texture_{nullptr};
|
||||
SDL_GPUTransferBuffer* upload_buffer_{nullptr};
|
||||
SDL_GPUSampler* sampler_{nullptr};
|
||||
std::unique_ptr<CrtPiPipeline> crtpi_pipeline_;
|
||||
ShaderType active_shader_{ShaderType::POSTFX};
|
||||
|
||||
PostFXUniforms uniforms_{
|
||||
.vignette_strength = 0.0F,
|
||||
|
||||
Reference in new issue
Block a user