From 1522b95c838fc3e567066fd96dede3dca25cbc95 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 16:18:19 +0100 Subject: feat(gpu): Integrate bumpy 3D renderer into main demo - Added depth buffer support to MainSequence. - Implemented Hybrid3DEffect for the main timeline. - Fixed effect initialization order in MainSequence. - Ensured depth-stencil compatibility for all scene effects. - Updated demo sequence with 3D elements and post-processing. --- src/gpu/gpu.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gpu/gpu.cc') diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc index 3cdf9aa..17d32ee 100644 --- a/src/gpu/gpu.cc +++ b/src/gpu/gpu.cc @@ -147,6 +147,13 @@ RenderPass gpu_create_render_pass(WGPUDevice device, WGPUTextureFormat format, pipeline_desc.multisample.mask = 0xFFFFFFFF; pipeline_desc.fragment = &fragment_state; + // Depth Stencil State (Required for compatibility with MainSequence pass) + WGPUDepthStencilState depth_stencil = {}; + depth_stencil.format = WGPUTextureFormat_Depth24Plus; + depth_stencil.depthWriteEnabled = WGPUOptionalBool_False; + depth_stencil.depthCompare = WGPUCompareFunction_Always; + pipeline_desc.depthStencil = &depth_stencil; + pass.pipeline = wgpuDeviceCreateRenderPipeline(device, &pipeline_desc); return pass; -- cgit v1.2.3