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:
parent
cde2f0dc56
commit
c93a79f478
|
@ -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)
|
var image := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
|
||||||
image.copy_from(blended_frames[frame])
|
image.copy_from(blended_frames[frame])
|
||||||
if erase_unselected_area and project.has_selection:
|
if erase_unselected_area and project.has_selection:
|
||||||
var clipper = ShaderImageEffect.new()
|
var crop := Image.create(project.size.x, project.size.y, false, Image.FORMAT_RGBA8)
|
||||||
var ClipShader := preload("res://src/Shaders/SelectionClip.gdshader")
|
|
||||||
var selection_image = project.selection_map.return_cropped_copy(project.size)
|
var selection_image = project.selection_map.return_cropped_copy(project.size)
|
||||||
var selection_tex = ImageTexture.create_from_image(selection_image)
|
crop.blit_rect_mask(
|
||||||
clipper.generate_image(
|
image, selection_image, Rect2i(Vector2i.ZERO, image.get_size()), Vector2i.ZERO
|
||||||
image, ClipShader, {"selection": selection_tex}, project.size
|
|
||||||
)
|
)
|
||||||
|
image.copy_from(crop)
|
||||||
if trim_images:
|
if trim_images:
|
||||||
image = image.get_region(image.get_used_rect())
|
image = image.get_region(image.get_used_rect())
|
||||||
var duration := frame.duration * (1.0 / project.fps)
|
var duration := frame.duration * (1.0 / project.fps)
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue