summaryrefslogtreecommitdiff
path: root/src/gpu/effects/cnn_effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/cnn_effect.cc')
-rw-r--r--src/gpu/effects/cnn_effect.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/effects/cnn_effect.cc b/src/gpu/effects/cnn_effect.cc
index 3f6d3b3..84eb530 100644
--- a/src/gpu/effects/cnn_effect.cc
+++ b/src/gpu/effects/cnn_effect.cc
@@ -65,6 +65,15 @@ void CNNEffect::init(MainSequence* demo) {
params_buffer_.update(ctx_.queue, params);
}
+void CNNEffect::resize(int width, int height) {
+ PostProcessEffect::resize(width, height);
+
+ // Only layer 0 owns the captured_frame texture
+ if (layer_index_ == 0 && demo_) {
+ demo_->resize_auxiliary_texture("captured_frame", width, height);
+ }
+}
+
void CNNEffect::render(WGPURenderPassEncoder pass,
const CommonPostProcessUniforms& uniforms) {
(void)uniforms;