diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-17 08:16:03 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-17 08:16:03 +0100 |
| commit | 64f977f6fbedf75d5edbc3963e002b593c8428d8 (patch) | |
| tree | ef711b63d34b5c3f5ecc93d46a0a3ab0b6d26a6f /src/effects/gaussian_blur_effect.cc | |
| parent | 8c9332c16b44270921eb1b6a2886717eb3435d5d (diff) | |
style: Apply clang-format
Diffstat (limited to 'src/effects/gaussian_blur_effect.cc')
| -rw-r--r-- | src/effects/gaussian_blur_effect.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/effects/gaussian_blur_effect.cc b/src/effects/gaussian_blur_effect.cc index d163e51..b2713ae 100644 --- a/src/effects/gaussian_blur_effect.cc +++ b/src/effects/gaussian_blur_effect.cc @@ -1,21 +1,21 @@ // Gaussian blur effect implementation #include "effects/gaussian_blur_effect.h" -#include "util/fatal_error.h" -#include "gpu/post_process_helper.h" #include "effects/shaders.h" +#include "gpu/post_process_helper.h" +#include "util/fatal_error.h" GaussianBlur::GaussianBlur(const GpuContext& ctx, - const std::vector<std::string>& inputs, - const std::vector<std::string>& outputs) + const std::vector<std::string>& inputs, + const std::vector<std::string>& outputs) : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr), sampler_(nullptr) { // Headless mode: skip GPU resource creation (compiled out in STRIP_ALL) HEADLESS_RETURN_IF_NULL(ctx_.device); // Create pipeline - pipeline_ = create_post_process_pipeline(ctx_.device, WGPUTextureFormat_RGBA8Unorm, - gaussian_blur_shader_wgsl); + pipeline_ = create_post_process_pipeline( + ctx_.device, WGPUTextureFormat_RGBA8Unorm, gaussian_blur_shader_wgsl); // Create sampler WGPUSamplerDescriptor sampler_desc = {}; @@ -32,8 +32,8 @@ GaussianBlur::GaussianBlur(const GpuContext& ctx, } void GaussianBlur::render(WGPUCommandEncoder encoder, - const UniformsSequenceParams& params, - NodeRegistry& nodes) { + const UniformsSequenceParams& params, + NodeRegistry& nodes) { // Get input/output views WGPUTextureView input_view = nodes.get_view(input_nodes_[0]); WGPUTextureView output_view = nodes.get_view(output_nodes_[0]); @@ -77,7 +77,8 @@ void GaussianBlur::render(WGPUCommandEncoder encoder, pass_desc.colorAttachmentCount = 1; pass_desc.colorAttachments = &color_attachment; - WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc); + WGPURenderPassEncoder pass = + wgpuCommandEncoderBeginRenderPass(encoder, &pass_desc); wgpuRenderPassEncoderSetPipeline(pass, pipeline_); wgpuRenderPassEncoderSetBindGroup(pass, 0, bind_group_, 0, nullptr); wgpuRenderPassEncoderDraw(pass, 3, 1, 0, 0); |
