summaryrefslogtreecommitdiff
path: root/src/gpu/effect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effect.cc')
-rw-r--r--src/gpu/effect.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc
index 0662f26..b50acce 100644
--- a/src/gpu/effect.cc
+++ b/src/gpu/effect.cc
@@ -349,8 +349,9 @@ void MainSequence::render_frame(float global_time, float beat, float peak,
WGPURenderPassColorAttachment capture_attachment = {};
capture_attachment.view = captured_view;
capture_attachment.resolveTarget = nullptr;
- capture_attachment.loadOp = WGPULoadOp_Load;
+ capture_attachment.loadOp = WGPULoadOp_Clear;
capture_attachment.storeOp = WGPUStoreOp_Store;
+ capture_attachment.clearValue = {0.0f, 0.0f, 0.0f, 1.0f};
#if !defined(DEMO_CROSS_COMPILE_WIN32)
capture_attachment.depthSlice = WGPU_DEPTH_SLICE_UNDEFINED;
#endif
@@ -362,10 +363,10 @@ void MainSequence::render_frame(float global_time, float beat, float peak,
(float)width_, (float)height_, 0.0f,
1.0f);
- // Use passthrough effect to copy current_input to captured_frame
+ // Use passthrough effect to copy framebuffer_a (scene) to captured_frame
PostProcessEffect* passthrough =
(PostProcessEffect*)passthrough_effect_.get();
- passthrough->update_bind_group(current_input);
+ passthrough->update_bind_group(framebuffer_view_a_);
passthrough->render(capture_pass, 0, 0, 0, aspect_ratio);
wgpuRenderPassEncoderEnd(capture_pass);