From 56ffa441b9c0873d4526dd3b1997d91169f264e2 Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Mon, 30 Oct 2023 17:33:10 +0200 Subject: [PATCH] Cleanup: Use input reading shaders for Movie Clip node --- .../nodes/composite/nodes/node_composite_movieclip.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/blender/nodes/composite/nodes/node_composite_movieclip.cc b/source/blender/nodes/composite/nodes/node_composite_movieclip.cc index 6ed870593e8..2073247aeb7 100644 --- a/source/blender/nodes/composite/nodes/node_composite_movieclip.cc +++ b/source/blender/nodes/composite/nodes/node_composite_movieclip.cc @@ -126,9 +126,12 @@ class MovieClipOperation : public NodeOperation { GPU_texture_height(movie_clip_texture)); result.allocate_texture(Domain(size)); - GPUShader *shader = shader_manager().get("compositor_convert_color_to_half_color"); + GPUShader *shader = shader_manager().get("compositor_read_input_color"); GPU_shader_bind(shader); + const int2 lower_bound = int2(0); + GPU_shader_uniform_2iv(shader, "lower_bound", lower_bound); + const int input_unit = GPU_shader_get_sampler_binding(shader, "input_tx"); GPU_texture_bind(movie_clip_texture, input_unit); @@ -160,9 +163,12 @@ class MovieClipOperation : public NodeOperation { GPU_texture_height(movie_clip_texture)); result.allocate_texture(Domain(size)); - GPUShader *shader = shader_manager().get("compositor_extract_alpha_from_color"); + GPUShader *shader = shader_manager().get("compositor_read_input_alpha"); GPU_shader_bind(shader); + const int2 lower_bound = int2(0); + GPU_shader_uniform_2iv(shader, "lower_bound", lower_bound); + const int input_unit = GPU_shader_get_sampler_binding(shader, "input_tx"); GPU_texture_bind(movie_clip_texture, input_unit);