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.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gpu/effect.cc b/src/gpu/effect.cc
index a94b4a0..4230021 100644
--- a/src/gpu/effect.cc
+++ b/src/gpu/effect.cc
@@ -19,11 +19,10 @@ Effect::Effect(const GpuContext& ctx, const std::vector<std::string>& inputs,
}
void Effect::dispatch_render(WGPUCommandEncoder encoder,
- const UniformsSequenceParams& params,
- NodeRegistry& nodes) {
+ const UniformsSequenceParams& params,
+ NodeRegistry& nodes) {
// Check if effect is active at current time
- const bool active =
- (params.time >= start_time_ && params.time < end_time_);
+ const bool active = (params.time >= start_time_ && params.time < end_time_);
// Auto-passthrough for 1:1 input/output effects outside active range
if (!active && input_nodes_.size() == 1 && output_nodes_.size() == 1) {
@@ -32,11 +31,12 @@ void Effect::dispatch_render(WGPUCommandEncoder encoder,
uniforms_buffer_.update(ctx_.queue, params);
render(encoder, params, nodes);
}
- // Multi-output effects: output undefined when inactive (validated at compile time)
+ // Multi-output effects: output undefined when inactive (validated at compile
+ // time)
}
void Effect::blit_input_to_output(WGPUCommandEncoder encoder,
- NodeRegistry& nodes) {
+ NodeRegistry& nodes) {
HEADLESS_RETURN_IF_NULL(encoder);
WGPUTexture src = nodes.get_texture(input_nodes_[0]);
@@ -52,8 +52,7 @@ void Effect::blit_input_to_output(WGPUCommandEncoder encoder,
GpuTextureCopyInfo dst_copy = {
.texture = dst, .mipLevel = 0, .origin = {0, 0, 0}};
- WGPUExtent3D extent = {(unsigned int)(width_),
- (unsigned int)(height_), 1};
+ WGPUExtent3D extent = {(unsigned int)(width_), (unsigned int)(height_), 1};
wgpuCommandEncoderCopyTextureToTexture(encoder, &src_copy, &dst_copy,
&extent);