From 9a57dabe1ae473fe35bafa2f80e2d7f1702c264b Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 14:52:04 +0100 Subject: feat(3d): Use procedural grid for floor and revert object noise - Reverted test_3d_render to use the global 'noise' texture for floating objects, restoring their bump mapping. - Implemented a procedural grid directly in the fragment shader for rasterized objects (floor). - Inverted the grid color scheme (black lines on a lighter background) as requested. - This ensures accurate object bump mapping and clear shadow visibility on the floor without requiring multiple texture bindings. --- src/gpu/effects/hybrid_3d_effect.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gpu/effects/hybrid_3d_effect.cc') diff --git a/src/gpu/effects/hybrid_3d_effect.cc b/src/gpu/effects/hybrid_3d_effect.cc index 51dec52..af956cd 100644 --- a/src/gpu/effects/hybrid_3d_effect.cc +++ b/src/gpu/effects/hybrid_3d_effect.cc @@ -14,6 +14,12 @@ Hybrid3DEffect::Hybrid3DEffect(WGPUDevice device, WGPUQueue queue, (void)format; // Passed to base, not directly used here. } +void Hybrid3DEffect::resize(int width, int height) { + width_ = width; + height_ = height; + renderer_.resize(width_, height_); +} + void Hybrid3DEffect::init(MainSequence* demo) { (void)demo; WGPUTextureFormat format = -- cgit v1.2.3