yta-editor-nodes-gpu 0.0.2__py3-none-any.whl → 0.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,19 +155,33 @@ class SlideTransitionProcessorGPU(_TransitionProcessorGPU):
155
155
  out vec4 output_color;
156
156
 
157
157
  void main() {
158
- // Horizontal version (right to left)
159
- vec2 uv_first = v_uv + vec2(-progress, 0.0);
160
- vec2 uv_second = v_uv + vec2(1.0 - progress, 0.0);
158
+ // Horizontal version (slide to right)
159
+ //vec2 uv_first = v_uv + vec2(-progress, 0.0);
160
+ //vec2 uv_second = v_uv + vec2(1.0 - progress, 0.0);
161
+
162
+ // Horizontal version (slide to left)
163
+ vec2 uv_first = v_uv + vec2(progress, 0.0);
164
+ vec2 uv_second = v_uv + vec2(-1.0 + progress, 0.0);
161
165
 
162
166
  vec4 color_first = texture(first_texture, uv_first);
163
167
  vec4 color_second = texture(second_texture, uv_second);
164
168
 
165
- if (uv_first.x < 0.0) {
169
+ // Horizontal version (slide to right)
170
+ //if (uv_first.x < 0.0) {
171
+ // output_color = color_second;
172
+ //} else if (uv_second.x > 1.0) {
173
+ // output_color = color_first;
174
+ //} else {
175
+ // // A and B frames are shown at the same time
176
+ // output_color = mix(color_first, color_second, progress);
177
+ //}
178
+
179
+ // Horizontal version (slide t o left)
180
+ if (uv_first.x > 1.0) {
166
181
  output_color = color_second;
167
- } else if (uv_second.x > 1.0) {
182
+ } else if (uv_second.x < 0.0) {
168
183
  output_color = color_first;
169
184
  } else {
170
- // A and B frames are shown at the same time
171
185
  output_color = mix(color_first, color_second, progress);
172
186
  }
173
187
  }
@@ -334,9 +348,9 @@ class AlphaPediaMaskTransitionProcessorGPU(_TransitionProcessorGPU):
334
348
 
335
349
  def process(
336
350
  self,
337
- input_a: Union[moderngl.Texture, 'np.ndarray'],
338
- input_b: Union[moderngl.Texture, 'np.ndarray'],
339
- input_mask: Union[moderngl.Texture, 'np.ndarray'],
351
+ first_input: Union[moderngl.Texture, 'np.ndarray'],
352
+ second_input: Union[moderngl.Texture, 'np.ndarray'],
353
+ mask_input: Union[moderngl.Texture, 'np.ndarray'],
340
354
  progress: float,
341
355
  output_size: Union[tuple[int, int], None] = None,
342
356
  **kwargs
@@ -354,15 +368,15 @@ class AlphaPediaMaskTransitionProcessorGPU(_TransitionProcessorGPU):
354
368
  We use and return textures to maintain
355
369
  the process in GPU and optimize it.
356
370
  """
357
- ParameterValidator.validate_mandatory_instance_of('input_a', input_a, [moderngl.Texture, np.ndarray])
358
- ParameterValidator.validate_mandatory_instance_of('input_b', input_b, [moderngl.Texture, np.ndarray])
359
- ParameterValidator.validate_mandatory_instance_of('input_mask', input_mask, [moderngl.Texture, np.ndarray])
371
+ ParameterValidator.validate_mandatory_instance_of('first_input', first_input, [moderngl.Texture, np.ndarray])
372
+ ParameterValidator.validate_mandatory_instance_of('second_input', second_input, [moderngl.Texture, np.ndarray])
373
+ ParameterValidator.validate_mandatory_instance_of('mask_input', mask_input, [moderngl.Texture, np.ndarray])
360
374
  ParameterValidator.validate_mandatory_positive_float('progress', progress, do_include_zero = True)
361
375
 
362
376
  textures_map = {
363
- 'first_texture': input_a,
364
- 'second_texture': input_b,
365
- 'mask_texture': input_mask
377
+ 'first_texture': first_input,
378
+ 'second_texture': second_input,
379
+ 'mask_texture': mask_input
366
380
  }
367
381
 
368
382
  # TODO: There is an 'use_alpha_channel' uniform to use
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yta-editor-nodes-gpu
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: Youtube Autonomous Main Editor Nodes GPU module
5
5
  License-File: LICENSE
6
6
  Author: danialcala94
@@ -4,8 +4,8 @@ yta_editor_nodes_gpu/processor/blender/__init__.py,sha256=fiDX0wxeks2o6BbINQaYrt
4
4
  yta_editor_nodes_gpu/processor/blender/utils.py,sha256=MpPMZ_pYpVUyIo-hcVQHKrbBWTpG1yEE8d80k9npJpI,1762
5
5
  yta_editor_nodes_gpu/processor/video/__init__.py,sha256=FwL8sbxu9EgBog-17_PF25O1iS-upHd3aGGB-UKKe4E,7009
6
6
  yta_editor_nodes_gpu/processor/video/experimental.py,sha256=BKOXlCZXuOhlcDC4pHcS2EoQI4_ur7971ktyteLklk0,21262
7
- yta_editor_nodes_gpu/processor/video/transitions/__init__.py,sha256=VR79hr0I7Oiuvt3ufKOwvkgwbywjXPj2sPfyLZHUeQw,22500
8
- yta_editor_nodes_gpu-0.0.2.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
9
- yta_editor_nodes_gpu-0.0.2.dist-info/METADATA,sha256=DctAdSG7Fiq3DFeIfgG8EOXyb_yqmTOxVuqzBQsVgEk,663
10
- yta_editor_nodes_gpu-0.0.2.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
11
- yta_editor_nodes_gpu-0.0.2.dist-info/RECORD,,
7
+ yta_editor_nodes_gpu/processor/video/transitions/__init__.py,sha256=IYMaBNeiVGNJQKLPHdN1T61n0IcadocIqIqcn-pWn3k,23170
8
+ yta_editor_nodes_gpu-0.0.4.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
9
+ yta_editor_nodes_gpu-0.0.4.dist-info/METADATA,sha256=NIXd6bg_0DNJCS069bxM0IwCU0oy4uinACQxGbm6FZA,663
10
+ yta_editor_nodes_gpu-0.0.4.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
11
+ yta_editor_nodes_gpu-0.0.4.dist-info/RECORD,,