1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-13 17:23:08 +00:00

removed shader

This commit is contained in:
Variable 2024-09-29 12:54:05 +05:00
parent cde2f0dc56
commit c93a79f478
2 changed files with 4 additions and 17 deletions

View file

@ -290,13 +290,12 @@ func process_animation(project := Global.current_project) -> void:
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
image.copy_from(blended_frames[frame])
if erase_unselected_area and project.has_selection:
var clipper = ShaderImageEffect.new()
var ClipShader := preload("res://src/Shaders/SelectionClip.gdshader")
var crop := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
var selection_image = project.selection_map.return_cropped_copy(project.size)
var selection_tex = ImageTexture.create_from_image(selection_image)
clipper.generate_image(
image, ClipShader, {"selection": selection_tex}, project.size
crop.blit_rect_mask(
image, selection_image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO
)
image.copy_from(crop)
if trim_images:
image = image.get_region(image.get_used_rect())
var duration := frame.duration * (1.0 / project.fps)

View file

@ -1,12 +0,0 @@
shader_type canvas_item;
render_mode unshaded;
uniform sampler2D selection : filter_nearest;
void fragment() {
vec4 selection_color = texture(selection, UV);
// Not using equality here because this alternative was recommended in Godot warning instead.
if (abs(selection_color.a) < 0.00001){
COLOR = vec4(0.0);
}
}