diff options
Diffstat (limited to 'src/gpu/wgsl_effect.cc')
| -rw-r--r-- | src/gpu/wgsl_effect.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/wgsl_effect.cc b/src/gpu/wgsl_effect.cc index 1cb0ecb..4f658a5 100644 --- a/src/gpu/wgsl_effect.cc +++ b/src/gpu/wgsl_effect.cc @@ -10,13 +10,17 @@ WgslEffect::WgslEffect(const GpuContext& ctx, const std::vector<std::string>& outputs, float start_time, float end_time, const char* shader_code, WGPULoadOp load_op, - WgslEffectParams initial_params) + WgslEffectParams initial_params, + WgslSamplerType sampler_type) : Effect(ctx, inputs, outputs, start_time, end_time), effect_params(initial_params), load_op_(load_op) { HEADLESS_RETURN_IF_NULL(ctx_.device); - create_linear_sampler(); + if (sampler_type == WgslSamplerType::Nearest) + create_nearest_sampler(); + else + create_linear_sampler(); params_buffer_.init(ctx_.device); pipeline_.set(create_post_process_pipeline(ctx_.device, |
