From e3ef115804b46e8bfc594987b04b1059aed5e002 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 18:56:47 +0100 Subject: 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. --- src/3d/renderer.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/3d/renderer.h') 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); -- cgit v1.2.3