From f80e37bd61e447f1d66fbb5eb4c1ab7a8a77cf0f Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 11:31:00 +0100 Subject: feat: Add seamless bump mapping with procedural noise - Replaced white noise with smooth value-like noise. - Implemented periodic texture generation (seam blending). - Integrated bump mapping into Renderer3D using finite difference of displaced SDF. - Updated test_3d_render with noise texture and multiple SDF shapes (Box, Sphere, Torus). --- src/gpu/gpu.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gpu/gpu.h') diff --git a/src/gpu/gpu.h b/src/gpu/gpu.h index b71e144..9ed1913 100644 --- a/src/gpu/gpu.h +++ b/src/gpu/gpu.h @@ -111,12 +111,13 @@ struct ResourceBinding { }; // Cross-platform helper for color attachment initialization -inline void gpu_init_color_attachment(WGPURenderPassColorAttachment& attachment, WGPUTextureView view) { - attachment.view = view; - attachment.loadOp = WGPULoadOp_Clear; - attachment.storeOp = WGPUStoreOp_Store; +inline void gpu_init_color_attachment(WGPURenderPassColorAttachment& attachment, + WGPUTextureView view) { + attachment.view = view; + attachment.loadOp = WGPULoadOp_Clear; + attachment.storeOp = WGPUStoreOp_Store; #if !defined(DEMO_CROSS_COMPILE_WIN32) - attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED; + attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED; #endif } -- cgit v1.2.3