diff options
Diffstat (limited to 'src/gpu/effects/post_process_helper.h')
| -rw-r--r-- | src/gpu/effects/post_process_helper.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/gpu/effects/post_process_helper.h b/src/gpu/effects/post_process_helper.h deleted file mode 100644 index 1c649e7..0000000 --- a/src/gpu/effects/post_process_helper.h +++ /dev/null @@ -1,37 +0,0 @@ -// This file is part of the 64k demo project. -// It declares helper functions for post-processing effects. - -#pragma once - -#include "gpu/gpu.h" -#include "util/mini_math.h" - -// Uniform data common to all post-processing effects -struct CommonPostProcessUniforms { - vec2 resolution; // Screen dimensions - float aspect_ratio; // Width/height ratio - float time; // Physical time in seconds (unaffected by tempo) - float beat_time; // Musical time in beats (absolute, tempo-scaled) - float beat_phase; // Fractional beat (0.0-1.0 within current beat) - float audio_intensity;// Audio peak for beat sync - float _pad; // Padding for 16-byte alignment -}; -static_assert(sizeof(CommonPostProcessUniforms) == 32, - "CommonPostProcessUniforms must be 32 bytes for WGSL alignment"); - -// Standard post-process bind group layout (group 0): -#define PP_BINDING_SAMPLER 0 // Sampler for input texture -#define PP_BINDING_TEXTURE 1 // Input texture (previous render pass) -#define PP_BINDING_UNIFORMS 2 // Custom uniforms buffer -#define PP_BINDING_EFFECT_PARAMS 3 // Effect-specific parameters - -// Helper to create a standard post-processing pipeline -// Uniforms are accessible to both vertex and fragment shaders -WGPURenderPipeline create_post_process_pipeline(WGPUDevice device, - WGPUTextureFormat format, - const char* shader_code); - -// Helper to update bind group for post-processing effects -void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline, - WGPUBindGroup* bind_group, WGPUTextureView input_view, - GpuBuffer uniforms, GpuBuffer effect_params); |
