summaryrefslogtreecommitdiff
path: root/src/3d/renderer.h
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-01 18:56:47 +0100
committerskal <pascal.massimino@gmail.com>2026-02-01 18:56:47 +0100
commite3ef115804b46e8bfc594987b04b1059aed5e002 (patch)
tree3670f718ee23cf34e94984568900eac23022d1f0 /src/3d/renderer.h
parent7fab8880cca269621cd32610b22f2820567771f2 (diff)
feat(gpu/assets): Fix tests, integrate bumpy 3D renderer and procedural assets
- Fixed test_sequence by restoring MainSequence::init_test for mocking. - Corrected CMakeLists.txt dependencies and source groupings to prevent duplicate symbols. - standardizing Effect constructor signature for seq_compiler compatibility. - Implemented Hybrid3DEffect using bumpy Renderer3D and procedural NOISE_TEX. - Updated MainSequence to support depth buffer for 3D elements. - Formatted all source files with clang-format.
Diffstat (limited to 'src/3d/renderer.h')
-rw-r--r--src/3d/renderer.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/3d/renderer.h b/src/3d/renderer.h
index e87d47a..8cb379b 100644
--- a/src/3d/renderer.h
+++ b/src/3d/renderer.h
@@ -28,25 +28,24 @@ class Renderer3D {
void init(WGPUDevice device, WGPUQueue queue, WGPUTextureFormat format);
void shutdown();
- // Renders the scene to the given texture view (Convenience: creates a pass)
+ // Renders the scene to the given texture view (Convenience: creates a pass)
- void render(const Scene& scene, const Camera& camera, float time,
+ void render(const Scene& scene, const Camera& camera, float time,
- WGPUTextureView target_view, WGPUTextureView depth_view_opt = nullptr);
+ WGPUTextureView target_view,
+ WGPUTextureView depth_view_opt = nullptr);
-
+ // Records draw commands to an existing pass.
- // Records draw commands to an existing pass.
+ // Assumes the pass has a compatible pipeline (or we set it here).
- // Assumes the pass has a compatible pipeline (or we set it here).
+ // Note: Caller must ensure depth/color attachments are set up correctly in
+ // the pass.
- // Note: Caller must ensure depth/color attachments are set up correctly in the pass.
+ void draw(WGPURenderPassEncoder pass, const Scene& scene,
+ const Camera& camera, float time);
- void draw(WGPURenderPassEncoder pass, const Scene& scene, const Camera& camera, float time);
-
-
-
- void set_noise_texture(WGPUTextureView noise_view);
+ void set_noise_texture(WGPUTextureView noise_view);
// Resize handler (if needed for internal buffers)
void resize(int width, int height);