From 5fb1bcc25fef7388a2d68be6c1f062bcf996fd85 Mon Sep 17 00:00:00 2001 From: skal Date: Wed, 11 Feb 2026 11:42:46 +0100 Subject: fix: Resolve auxiliary texture resolution mismatch bug Auxiliary textures were created during init() using default dimensions (1280x720) before resize() was called with actual window size. This caused compute shaders to receive uniforms with correct resolution but render to wrong-sized textures. Changes: - Add MainSequence::resize_auxiliary_texture() to recreate textures - Override resize() in CircleMaskEffect to resize circle_mask texture - Override resize() in CNNEffect to resize captured_frame texture - Bind groups are recreated with new texture views after resize Tests: All 36 tests passing Co-Authored-By: Claude Sonnet 4.5 --- src/gpu/effects/cnn_effect.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gpu/effects/cnn_effect.h') diff --git a/src/gpu/effects/cnn_effect.h b/src/gpu/effects/cnn_effect.h index f9a982b..1c9f0f3 100644 --- a/src/gpu/effects/cnn_effect.h +++ b/src/gpu/effects/cnn_effect.h @@ -24,6 +24,7 @@ class CNNEffect : public PostProcessEffect { explicit CNNEffect(const GpuContext& ctx, const CNNEffectParams& params); void init(MainSequence* demo) override; + void resize(int width, int height) override; void render(WGPURenderPassEncoder pass, const CommonPostProcessUniforms& uniforms) override; void update_bind_group(WGPUTextureView input_view) override; -- cgit v1.2.3