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/effect.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gpu/effect.h') diff --git a/src/gpu/effect.h b/src/gpu/effect.h index 29f8e85..e7453c7 100644 --- a/src/gpu/effect.h +++ b/src/gpu/effect.h @@ -33,6 +33,8 @@ class Effect { } virtual void render(WGPURenderPassEncoder pass, float time, float beat, float intensity, float aspect_ratio) = 0; + virtual void resize(int width, int height) {} + virtual void end() { } bool is_initialized = false; @@ -80,6 +82,7 @@ class Sequence { void add_effect(std::shared_ptr effect, float start_time, float end_time, int priority = 0); void update_active_list(float seq_time); + void resize(int width, int height); void collect_active_effects(std::vector& scene_effects, std::vector& post_effects); void reset(); @@ -105,6 +108,7 @@ class MainSequence { int priority = 0); void render_frame(float global_time, float beat, float peak, float aspect_ratio, WGPUSurface surface); + void resize(int width, int height); void shutdown(); #if !defined(STRIP_ALL) -- cgit v1.2.3