summaryrefslogtreecommitdiff
path: root/src/gpu/effects/hybrid_3d_effect.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-02 14:52:04 +0100
committerskal <pascal.massimino@gmail.com>2026-02-02 14:52:04 +0100
commit9a57dabe1ae473fe35bafa2f80e2d7f1702c264b (patch)
tree52e70ce9b603e0a84cc65a258354eb0e37a8dc20 /src/gpu/effects/hybrid_3d_effect.cc
parent43e257fab0ca544edbb36604a7871f96fd0142bf (diff)
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.
Diffstat (limited to 'src/gpu/effects/hybrid_3d_effect.cc')
-rw-r--r--src/gpu/effects/hybrid_3d_effect.cc6
1 files changed, 6 insertions, 0 deletions
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 =