// This file is part of the 64k demo project. // It declares the VignetteEffect. #pragma once #include "gpu/effect.h" #include "gpu/uniform_helper.h" // Parameters for VignetteEffect struct VignetteParams { float radius = 0.5f; // Radius of the clear center float softness = 0.5f; // Softness of the vignette edge }; class VignetteEffect : public PostProcessEffect { public: VignetteEffect(const GpuContext& ctx); VignetteEffect(const GpuContext& ctx, const VignetteParams& params); void render(WGPURenderPassEncoder pass, const CommonPostProcessUniforms& uniforms) override; void update_bind_group(WGPUTextureView input_view) override; private: VignetteParams params_; UniformBuffer params_buffer_; };