diff options
| -rw-r--r-- | assets/final/demo_assets.txt | 6 | ||||
| -rw-r--r-- | src/gpu/effects/hybrid_3d_effect.h | 27 |
2 files changed, 30 insertions, 3 deletions
diff --git a/assets/final/demo_assets.txt b/assets/final/demo_assets.txt index 08f33ab..52dd77e 100644 --- a/assets/final/demo_assets.txt +++ b/assets/final/demo_assets.txt @@ -1,3 +1,3 @@ -KICK_1, kick1.spec, NONE, "Drum kick" -SNARE_1, snare1.spec, NONE, "Drum snare" -HIHAT_1, hihat1.spec, NONE, "Drum hihat" +# Asset Name, Compression Type, Filename/Placeholder, Description +KICK_1, NONE, kick1.spec, "A drum kick sample" +NOISE_TEX, PROC(gen_noise, 1234, 16), _, "Procedural noise texture for bump mapping"
\ No newline at end of file diff --git a/src/gpu/effects/hybrid_3d_effect.h b/src/gpu/effects/hybrid_3d_effect.h new file mode 100644 index 0000000..a0a82b5 --- /dev/null +++ b/src/gpu/effects/hybrid_3d_effect.h @@ -0,0 +1,27 @@ +// This file is part of the 64k demo project. +// It defines the Hybrid3DEffect, integrating the 3D renderer into the demo timeline. + +#pragma once + +#include "gpu/effect.h" +#include "3d/renderer.h" +#include "3d/scene.h" +#include "3d/camera.h" + +class Hybrid3DEffect : public Effect { + public: + Hybrid3DEffect(); + virtual ~Hybrid3DEffect() override = default; + + void init(WGPUDevice device, WGPUQueue queue, int width, int height) override; + void render(WGPURenderPassEncoder pass, float time, float beat, float alpha) override; + + private: + Renderer3D renderer_; + Scene scene_; + Camera camera_; + WGPUDevice device_ = nullptr; + WGPUQueue queue_ = nullptr; + int width_ = 0; + int height_ = 0; +}; |
