summaryrefslogtreecommitdiff
path: root/src/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/gaussian_blur_effect.cc (renamed from src/effects/gaussian_blur_effect_v2.cc)8
-rw-r--r--src/effects/gaussian_blur_effect.h (renamed from src/effects/gaussian_blur_effect_v2.h)7
-rw-r--r--src/effects/heptagon_effect.cc (renamed from src/effects/heptagon_effect_v2.cc)10
-rw-r--r--src/effects/heptagon_effect.h (renamed from src/effects/heptagon_effect_v2.h)9
-rw-r--r--src/effects/hybrid3_d_effect.cc (renamed from src/effects/hybrid3_d_effect_v2.cc)14
-rw-r--r--src/effects/hybrid3_d_effect.h (renamed from src/effects/hybrid3_d_effect_v2.h)10
-rw-r--r--src/effects/particles_effect.cc (renamed from src/effects/particles_effect_v2.cc)10
-rw-r--r--src/effects/particles_effect.h (renamed from src/effects/particles_effect_v2.h)9
-rw-r--r--src/effects/passthrough_effect.cc (renamed from src/effects/passthrough_effect_v2.cc)8
-rw-r--r--src/effects/passthrough_effect.h (renamed from src/effects/passthrough_effect_v2.h)6
-rw-r--r--src/effects/placeholder_effect.cc (renamed from src/effects/placeholder_effect_v2.cc)8
-rw-r--r--src/effects/placeholder_effect.h (renamed from src/effects/placeholder_effect_v2.h)7
-rw-r--r--src/effects/rotating_cube_effect.cc (renamed from src/effects/rotating_cube_effect_v2.cc)14
-rw-r--r--src/effects/rotating_cube_effect.h (renamed from src/effects/rotating_cube_effect_v2.h)10
14 files changed, 67 insertions, 63 deletions
diff --git a/src/effects/gaussian_blur_effect_v2.cc b/src/effects/gaussian_blur_effect.cc
index 0c90fa2..17c657f 100644
--- a/src/effects/gaussian_blur_effect_v2.cc
+++ b/src/effects/gaussian_blur_effect.cc
@@ -1,13 +1,13 @@
// Gaussian blur effect v2 implementation
-#include "effects/gaussian_blur_effect_v2.h"
+#include "effects/gaussian_blur_effect.h"
#include "gpu/post_process_helper.h"
#include "gpu/shaders.h"
-GaussianBlurEffectV2::GaussianBlurEffectV2(const GpuContext& ctx,
+GaussianBlurEffect::GaussianBlurEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
- : EffectV2(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr),
+ : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr),
sampler_(nullptr) {
// Create pipeline
pipeline_ = create_post_process_pipeline(ctx_.device, WGPUTextureFormat_RGBA8Unorm,
@@ -27,7 +27,7 @@ GaussianBlurEffectV2::GaussianBlurEffectV2(const GpuContext& ctx,
uniforms_buffer_.init(ctx_.device);
}
-void GaussianBlurEffectV2::render(WGPUCommandEncoder encoder,
+void GaussianBlurEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
// Get input/output views
diff --git a/src/effects/gaussian_blur_effect_v2.h b/src/effects/gaussian_blur_effect.h
index c5d88ff..8bf34dc 100644
--- a/src/effects/gaussian_blur_effect_v2.h
+++ b/src/effects/gaussian_blur_effect.h
@@ -2,7 +2,7 @@
#pragma once
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
#include "gpu/uniform_helper.h"
struct GaussianBlurParams {
@@ -14,9 +14,9 @@ struct GaussianBlurParams {
static_assert(sizeof(GaussianBlurParams) == 16,
"GaussianBlurParams must be 16 bytes");
-class GaussianBlurEffectV2 : public EffectV2 {
+class GaussianBlurEffect : public Effect {
public:
- GaussianBlurEffectV2(const GpuContext& ctx,
+ GaussianBlurEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs);
@@ -31,3 +31,4 @@ class GaussianBlurEffectV2 : public EffectV2 {
UniformBuffer<GaussianBlurParams> params_buffer_;
UniformBuffer<UniformsSequenceParams> uniforms_buffer_;
};
+
diff --git a/src/effects/heptagon_effect_v2.cc b/src/effects/heptagon_effect.cc
index 6a2135e..27d59da 100644
--- a/src/effects/heptagon_effect_v2.cc
+++ b/src/effects/heptagon_effect.cc
@@ -1,14 +1,14 @@
// Heptagon effect v2 implementation
-#include "effects/heptagon_effect_v2.h"
+#include "effects/heptagon_effect.h"
#include "gpu/gpu.h"
#include "gpu/post_process_helper.h"
#include "gpu/shaders.h"
-HeptagonEffectV2::HeptagonEffectV2(const GpuContext& ctx,
+HeptagonEffect::HeptagonEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
- : EffectV2(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr), sampler_(nullptr) {
+ : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr), sampler_(nullptr) {
// Init uniforms
uniforms_buffer_.init(ctx_.device);
@@ -37,7 +37,7 @@ HeptagonEffectV2::HeptagonEffectV2(const GpuContext& ctx,
dummy_texture_view_ = wgpuTextureCreateView(dummy_texture_, nullptr);
}
-HeptagonEffectV2::~HeptagonEffectV2() {
+HeptagonEffect::~HeptagonEffect() {
if (bind_group_) wgpuBindGroupRelease(bind_group_);
if (pipeline_) wgpuRenderPipelineRelease(pipeline_);
if (sampler_) wgpuSamplerRelease(sampler_);
@@ -45,7 +45,7 @@ HeptagonEffectV2::~HeptagonEffectV2() {
if (dummy_texture_) wgpuTextureRelease(dummy_texture_);
}
-void HeptagonEffectV2::render(WGPUCommandEncoder encoder,
+void HeptagonEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
// Get output view (scene effects typically write to output, ignore input)
diff --git a/src/effects/heptagon_effect_v2.h b/src/effects/heptagon_effect.h
index 1737a46..9f148a1 100644
--- a/src/effects/heptagon_effect_v2.h
+++ b/src/effects/heptagon_effect.h
@@ -2,14 +2,14 @@
#pragma once
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
#include "gpu/uniform_helper.h"
-class HeptagonEffectV2 : public EffectV2 {
+class HeptagonEffect : public Effect {
public:
- HeptagonEffectV2(const GpuContext& ctx, const std::vector<std::string>& inputs,
+ HeptagonEffect(const GpuContext& ctx, const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs);
- ~HeptagonEffectV2();
+ ~HeptagonEffect();
void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params,
NodeRegistry& nodes) override;
@@ -22,3 +22,4 @@ class HeptagonEffectV2 : public EffectV2 {
WGPUTextureView dummy_texture_view_;
UniformBuffer<UniformsSequenceParams> uniforms_buffer_;
};
+
diff --git a/src/effects/hybrid3_d_effect_v2.cc b/src/effects/hybrid3_d_effect.cc
index 38e4e66..ced5b42 100644
--- a/src/effects/hybrid3_d_effect_v2.cc
+++ b/src/effects/hybrid3_d_effect.cc
@@ -1,14 +1,14 @@
// This file is part of the 64k demo project.
-// It implements Hybrid3DEffectV2 (simplified v2 port).
+// It implements Hybrid3DEffect (simplified v2 port).
// TODO: Full Renderer3D integration with texture manager, noise assets
-#include "effects/hybrid3_d_effect_v2.h"
+#include "effects/hybrid3_d_effect.h"
#include <cmath>
-Hybrid3DEffectV2::Hybrid3DEffectV2(const GpuContext& ctx,
+Hybrid3DEffect::Hybrid3DEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
- : EffectV2(ctx, inputs, outputs), depth_node_(outputs[0] + "_depth"),
+ : Effect(ctx, inputs, outputs), depth_node_(outputs[0] + "_depth"),
dummy_texture_(nullptr), dummy_texture_view_(nullptr) {
// Initialize renderer (format is always RGBA8Unorm for v2)
renderer_.init(ctx_.device, ctx_.queue, WGPUTextureFormat_RGBA8Unorm);
@@ -82,7 +82,7 @@ Hybrid3DEffectV2::Hybrid3DEffectV2(const GpuContext& ctx,
}
}
-Hybrid3DEffectV2::~Hybrid3DEffectV2() {
+Hybrid3DEffect::~Hybrid3DEffect() {
if (dummy_texture_view_)
wgpuTextureViewRelease(dummy_texture_view_);
if (dummy_texture_)
@@ -90,12 +90,12 @@ Hybrid3DEffectV2::~Hybrid3DEffectV2() {
renderer_.shutdown();
}
-void Hybrid3DEffectV2::declare_nodes(NodeRegistry& registry) {
+void Hybrid3DEffect::declare_nodes(NodeRegistry& registry) {
// Declare depth buffer node
registry.declare_node(depth_node_, NodeType::DEPTH24, -1, -1);
}
-void Hybrid3DEffectV2::render(WGPUCommandEncoder encoder,
+void Hybrid3DEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
// Update camera (orbiting)
diff --git a/src/effects/hybrid3_d_effect_v2.h b/src/effects/hybrid3_d_effect.h
index c8116b0..e6e0f49 100644
--- a/src/effects/hybrid3_d_effect_v2.h
+++ b/src/effects/hybrid3_d_effect.h
@@ -1,5 +1,5 @@
// This file is part of the 64k demo project.
-// It declares Hybrid3DEffectV2 (simplified v2 port).
+// It declares Hybrid3DEffect (simplified v2 port).
// TODO: Full Renderer3D integration with Scene/Camera
#pragma once
@@ -7,14 +7,14 @@
#include "3d/camera.h"
#include "3d/renderer.h"
#include "3d/scene.h"
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
-class Hybrid3DEffectV2 : public EffectV2 {
+class Hybrid3DEffect : public Effect {
public:
- Hybrid3DEffectV2(const GpuContext& ctx,
+ Hybrid3DEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs);
- ~Hybrid3DEffectV2() override;
+ ~Hybrid3DEffect() override;
void declare_nodes(NodeRegistry& registry) override;
void render(WGPUCommandEncoder encoder,
diff --git a/src/effects/particles_effect_v2.cc b/src/effects/particles_effect.cc
index 69da4da..9d73bf7 100644
--- a/src/effects/particles_effect_v2.cc
+++ b/src/effects/particles_effect.cc
@@ -1,15 +1,15 @@
// This file is part of the 64k demo project.
-// It implements the ParticlesEffectV2.
+// It implements the ParticlesEffect.
-#include "effects/particles_effect_v2.h"
+#include "effects/particles_effect.h"
#include "gpu/gpu.h"
#include "gpu/shaders.h"
#include <vector>
-ParticlesEffectV2::ParticlesEffectV2(const GpuContext& ctx,
+ParticlesEffect::ParticlesEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
- : EffectV2(ctx, inputs, outputs) {
+ : Effect(ctx, inputs, outputs) {
// Initialize uniforms
uniforms_.init(ctx_.device);
@@ -59,7 +59,7 @@ ParticlesEffectV2::ParticlesEffectV2(const GpuContext& ctx,
render_pass_.instance_count = NUM_PARTICLES;
}
-void ParticlesEffectV2::render(WGPUCommandEncoder encoder,
+void ParticlesEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
// Update uniforms
diff --git a/src/effects/particles_effect_v2.h b/src/effects/particles_effect.h
index f0f260c..76c2ef4 100644
--- a/src/effects/particles_effect_v2.h
+++ b/src/effects/particles_effect.h
@@ -1,9 +1,9 @@
// This file is part of the 64k demo project.
-// It declares the ParticlesEffectV2.
+// It declares the ParticlesEffect.
#pragma once
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
#include "gpu/gpu.h"
#include "gpu/uniform_helper.h"
#include <vector>
@@ -18,9 +18,9 @@ struct Particle {
float color[4];
};
-class ParticlesEffectV2 : public EffectV2 {
+class ParticlesEffect : public Effect {
public:
- ParticlesEffectV2(const GpuContext& ctx,
+ ParticlesEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs);
void render(WGPUCommandEncoder encoder,
@@ -33,3 +33,4 @@ class ParticlesEffectV2 : public EffectV2 {
GpuBuffer particles_buffer_;
UniformBuffer<UniformsSequenceParams> uniforms_;
};
+
diff --git a/src/effects/passthrough_effect_v2.cc b/src/effects/passthrough_effect.cc
index 38bb63a..ba98657 100644
--- a/src/effects/passthrough_effect_v2.cc
+++ b/src/effects/passthrough_effect.cc
@@ -1,13 +1,13 @@
// Passthrough effect v2 implementation
-#include "effects/passthrough_effect_v2.h"
+#include "effects/passthrough_effect.h"
#include "gpu/post_process_helper.h"
#include "gpu/shaders.h"
-PassthroughEffectV2::PassthroughEffectV2(const GpuContext& ctx,
+PassthroughEffect::PassthroughEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
- : EffectV2(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr),
+ : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr),
sampler_(nullptr) {
// Init uniform buffer
uniforms_buffer_.init(ctx_.device);
@@ -27,7 +27,7 @@ PassthroughEffectV2::PassthroughEffectV2(const GpuContext& ctx,
sampler_ = wgpuDeviceCreateSampler(ctx_.device, &sampler_desc);
}
-void PassthroughEffectV2::render(WGPUCommandEncoder encoder,
+void PassthroughEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
// Get input/output views
diff --git a/src/effects/passthrough_effect_v2.h b/src/effects/passthrough_effect.h
index a272b87..125ac5a 100644
--- a/src/effects/passthrough_effect_v2.h
+++ b/src/effects/passthrough_effect.h
@@ -2,12 +2,12 @@
#pragma once
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
#include "gpu/uniform_helper.h"
-class PassthroughEffectV2 : public EffectV2 {
+class PassthroughEffect : public Effect {
public:
- PassthroughEffectV2(const GpuContext& ctx, const std::vector<std::string>& inputs,
+ PassthroughEffect(const GpuContext& ctx, const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs);
void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params,
diff --git a/src/effects/placeholder_effect_v2.cc b/src/effects/placeholder_effect.cc
index d1fa212..d3308de 100644
--- a/src/effects/placeholder_effect_v2.cc
+++ b/src/effects/placeholder_effect.cc
@@ -1,15 +1,15 @@
// Placeholder effect v2 implementation - logs TODO warning once
-#include "effects/placeholder_effect_v2.h"
+#include "effects/placeholder_effect.h"
#include "gpu/post_process_helper.h"
#include "gpu/shaders.h"
#include <cstdio>
-PlaceholderEffectV2::PlaceholderEffectV2(const GpuContext& ctx,
+PlaceholderEffect::PlaceholderEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs,
const char* placeholder_name)
- : EffectV2(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr),
+ : Effect(ctx, inputs, outputs), pipeline_(nullptr), bind_group_(nullptr),
sampler_(nullptr), name_(placeholder_name) {
// Log once on construction
fprintf(stderr, "TODO: %s not yet ported to v2, using passthrough\n", name_);
@@ -29,7 +29,7 @@ PlaceholderEffectV2::PlaceholderEffectV2(const GpuContext& ctx,
sampler_ = wgpuDeviceCreateSampler(ctx_.device, &sampler_desc);
}
-void PlaceholderEffectV2::render(WGPUCommandEncoder encoder,
+void PlaceholderEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
WGPUTextureView input_view = nodes.get_view(input_nodes_[0]);
diff --git a/src/effects/placeholder_effect_v2.h b/src/effects/placeholder_effect.h
index aa9ed75..f7917ab 100644
--- a/src/effects/placeholder_effect_v2.h
+++ b/src/effects/placeholder_effect.h
@@ -3,12 +3,12 @@
#pragma once
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
#include "gpu/uniform_helper.h"
-class PlaceholderEffectV2 : public EffectV2 {
+class PlaceholderEffect : public Effect {
public:
- PlaceholderEffectV2(const GpuContext& ctx, const std::vector<std::string>& inputs,
+ PlaceholderEffect(const GpuContext& ctx, const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs,
const char* placeholder_name = "UnknownEffect");
@@ -22,3 +22,4 @@ class PlaceholderEffectV2 : public EffectV2 {
UniformBuffer<UniformsSequenceParams> uniforms_buffer_;
const char* name_;
};
+
diff --git a/src/effects/rotating_cube_effect_v2.cc b/src/effects/rotating_cube_effect.cc
index 1a28cad..3f1d445 100644
--- a/src/effects/rotating_cube_effect_v2.cc
+++ b/src/effects/rotating_cube_effect.cc
@@ -1,15 +1,15 @@
// This file is part of the 64k demo project.
-// It implements RotatingCubeEffectV2 (simplified v2 port).
+// It implements RotatingCubeEffect (simplified v2 port).
-#include "effects/rotating_cube_effect_v2.h"
+#include "effects/rotating_cube_effect.h"
#include "gpu/bind_group_builder.h"
#include "gpu/gpu.h"
#include "gpu/shaders.h"
-RotatingCubeEffectV2::RotatingCubeEffectV2(const GpuContext& ctx,
+RotatingCubeEffect::RotatingCubeEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs)
- : EffectV2(ctx, inputs, outputs), depth_node_(outputs[0] + "_depth") {
+ : Effect(ctx, inputs, outputs), depth_node_(outputs[0] + "_depth") {
// Create uniform buffers
uniform_buffer_ =
gpu_create_buffer(ctx_.device, sizeof(Uniforms),
@@ -96,19 +96,19 @@ RotatingCubeEffectV2::RotatingCubeEffectV2(const GpuContext& ctx,
wgpuBindGroupLayoutRelease(bgl);
}
-RotatingCubeEffectV2::~RotatingCubeEffectV2() {
+RotatingCubeEffect::~RotatingCubeEffect() {
if (bind_group_)
wgpuBindGroupRelease(bind_group_);
if (pipeline_)
wgpuRenderPipelineRelease(pipeline_);
}
-void RotatingCubeEffectV2::declare_nodes(NodeRegistry& registry) {
+void RotatingCubeEffect::declare_nodes(NodeRegistry& registry) {
// Declare depth buffer node
registry.declare_node(depth_node_, NodeType::DEPTH24, -1, -1);
}
-void RotatingCubeEffectV2::render(WGPUCommandEncoder encoder,
+void RotatingCubeEffect::render(WGPUCommandEncoder encoder,
const UniformsSequenceParams& params,
NodeRegistry& nodes) {
rotation_ += 0.016f * 1.5f;
diff --git a/src/effects/rotating_cube_effect_v2.h b/src/effects/rotating_cube_effect.h
index 19ef410..1c0155a 100644
--- a/src/effects/rotating_cube_effect_v2.h
+++ b/src/effects/rotating_cube_effect.h
@@ -1,19 +1,19 @@
// This file is part of the 64k demo project.
-// It declares RotatingCubeEffectV2 (simplified v2 port).
+// It declares RotatingCubeEffect (simplified v2 port).
#pragma once
-#include "gpu/effect_v2.h"
+#include "gpu/effect.h"
#include "gpu/gpu.h"
#include "gpu/uniform_helper.h"
#include "util/mini_math.h"
-class RotatingCubeEffectV2 : public EffectV2 {
+class RotatingCubeEffect : public Effect {
public:
- RotatingCubeEffectV2(const GpuContext& ctx,
+ RotatingCubeEffect(const GpuContext& ctx,
const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs);
- ~RotatingCubeEffectV2() override;
+ ~RotatingCubeEffect() override;
void declare_nodes(NodeRegistry& registry) override;
void render(WGPUCommandEncoder encoder,