diff options
Diffstat (limited to 'src/gpu')
| -rw-r--r-- | src/gpu/demo_effects.h | 9 | ||||
| -rw-r--r-- | src/gpu/effects/fade_effect.h | 2 | ||||
| -rw-r--r-- | src/gpu/effects/heptagon_effect.cc | 10 | ||||
| -rw-r--r-- | src/gpu/effects/post_process_helper.cc | 3 | ||||
| -rw-r--r-- | src/gpu/effects/post_process_helper.h | 8 | ||||
| -rw-r--r-- | src/gpu/effects/solarize_effect.cc | 4 | ||||
| -rw-r--r-- | src/gpu/effects/theme_modulation_effect.h | 2 | ||||
| -rw-r--r-- | src/gpu/effects/vignette_effect.cc | 4 |
8 files changed, 22 insertions, 20 deletions
diff --git a/src/gpu/demo_effects.h b/src/gpu/demo_effects.h index 54bf657..ed6ee87 100644 --- a/src/gpu/demo_effects.h +++ b/src/gpu/demo_effects.h @@ -7,7 +7,7 @@ #include "3d/scene.h" #include "effect.h" #include "gpu/effects/circle_mask_effect.h" -#include "gpu/effects/fade_effect.h" // FadeEffect with full definition +#include "gpu/effects/fade_effect.h" // FadeEffect with full definition #include "gpu/effects/flash_effect.h" // FlashEffect with params support #include "gpu/effects/post_process_helper.h" #include "gpu/effects/rotating_cube_effect.h" @@ -199,9 +199,10 @@ class FlashCubeEffect : public Effect { float flash_intensity_; }; -// ThemeModulationEffect now defined in gpu/effects/theme_modulation_effect.h (included above) -// FadeEffect now defined in gpu/effects/fade_effect.h (included above) -// FlashEffect now defined in gpu/effects/flash_effect.h (included above) +// ThemeModulationEffect now defined in gpu/effects/theme_modulation_effect.h +// (included above) FadeEffect now defined in gpu/effects/fade_effect.h +// (included above) FlashEffect now defined in gpu/effects/flash_effect.h +// (included above) // Auto-generated functions void LoadTimeline(MainSequence& main_seq, const GpuContext& ctx); diff --git a/src/gpu/effects/fade_effect.h b/src/gpu/effects/fade_effect.h index 22b8f76..2e5a6a0 100644 --- a/src/gpu/effects/fade_effect.h +++ b/src/gpu/effects/fade_effect.h @@ -4,9 +4,9 @@ #pragma once #include "gpu/effect.h" +#include "gpu/effects/post_process_helper.h" #include "gpu/gpu.h" #include "gpu/uniform_helper.h" -#include "gpu/effects/post_process_helper.h" class FadeEffect : public PostProcessEffect { public: diff --git a/src/gpu/effects/heptagon_effect.cc b/src/gpu/effects/heptagon_effect.cc index b77ec53..f7a30eb 100644 --- a/src/gpu/effects/heptagon_effect.cc +++ b/src/gpu/effects/heptagon_effect.cc @@ -8,11 +8,11 @@ // Match CommonUniforms struct from main_shader.wgsl. // Padded to 32 bytes for WGSL alignment rules. struct HeptagonUniforms { - vec2 resolution; // 8 bytes - float _pad0[2]; // 8 bytes padding to align next float - float aspect_ratio; // 4 bytes - float time; // 4 bytes - float beat; // 4 bytes + vec2 resolution; // 8 bytes + float _pad0[2]; // 8 bytes padding to align next float + float aspect_ratio; // 4 bytes + float time; // 4 bytes + float beat; // 4 bytes float audio_intensity; // 4 bytes }; static_assert(sizeof(HeptagonUniforms) == 32, diff --git a/src/gpu/effects/post_process_helper.cc b/src/gpu/effects/post_process_helper.cc index 74e052d..bc66448 100644 --- a/src/gpu/effects/post_process_helper.cc +++ b/src/gpu/effects/post_process_helper.cc @@ -94,7 +94,8 @@ void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline, bge[2].buffer = uniforms.buffer; bge[2].size = uniforms.size; bge[3].binding = PP_BINDING_EFFECT_PARAMS; - bge[3].buffer = effect_params.buffer ? effect_params.buffer : g_dummy_buffer.buffer; + bge[3].buffer = + effect_params.buffer ? effect_params.buffer : g_dummy_buffer.buffer; bge[3].size = effect_params.buffer ? effect_params.size : g_dummy_buffer.size; WGPUBindGroupDescriptor bgd = { .layout = bgl, .entryCount = 4, .entries = bge}; diff --git a/src/gpu/effects/post_process_helper.h b/src/gpu/effects/post_process_helper.h index 77b184f..23cde0e 100644 --- a/src/gpu/effects/post_process_helper.h +++ b/src/gpu/effects/post_process_helper.h @@ -19,10 +19,10 @@ 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 +#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 diff --git a/src/gpu/effects/solarize_effect.cc b/src/gpu/effects/solarize_effect.cc index d74d708..7a94004 100644 --- a/src/gpu/effects/solarize_effect.cc +++ b/src/gpu/effects/solarize_effect.cc @@ -23,6 +23,6 @@ void SolarizeEffect::render(WGPURenderPassEncoder pass, float t, float b, PostProcessEffect::render(pass, t, b, i, a); } void SolarizeEffect::update_bind_group(WGPUTextureView v) { - pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, - uniforms_.get(), {}); + pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, uniforms_.get(), + {}); } diff --git a/src/gpu/effects/theme_modulation_effect.h b/src/gpu/effects/theme_modulation_effect.h index 107529b..474d6da 100644 --- a/src/gpu/effects/theme_modulation_effect.h +++ b/src/gpu/effects/theme_modulation_effect.h @@ -5,8 +5,8 @@ #pragma once #include "gpu/effect.h" -#include "gpu/uniform_helper.h" #include "gpu/effects/post_process_helper.h" +#include "gpu/uniform_helper.h" class ThemeModulationEffect : public PostProcessEffect { public: diff --git a/src/gpu/effects/vignette_effect.cc b/src/gpu/effects/vignette_effect.cc index a4967dd..1b9e36d 100644 --- a/src/gpu/effects/vignette_effect.cc +++ b/src/gpu/effects/vignette_effect.cc @@ -33,6 +33,6 @@ void VignetteEffect::render(WGPURenderPassEncoder pass, float t, float b, } void VignetteEffect::update_bind_group(WGPUTextureView v) { - pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, - uniforms_.get(), params_buffer_.get()); + pp_update_bind_group(ctx_.device, pipeline_, &bind_group_, v, uniforms_.get(), + params_buffer_.get()); } |
