mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Optimize shader-based image effects when there is no selection
This commit is contained in:
parent
1e73ce5aa6
commit
7c6cdadb86
|
@ -30,9 +30,10 @@ func _confirmed() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||
var selection: Image = project.bitmap_to_image(project.selection_bitmap)
|
||||
var selection_tex := ImageTexture.new()
|
||||
selection_tex.create_from_image(selection)
|
||||
if selection_checkbox.pressed and project.has_selection:
|
||||
var selection: Image = project.bitmap_to_image(project.selection_bitmap)
|
||||
selection_tex.create_from_image(selection, 0)
|
||||
|
||||
if !confirmed:
|
||||
preview.material.set_shader_param("red", red)
|
||||
|
|
|
@ -37,9 +37,10 @@ func _confirmed() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||
var selection: Image = project.bitmap_to_image(project.selection_bitmap)
|
||||
var selection_tex := ImageTexture.new()
|
||||
selection_tex.create_from_image(selection)
|
||||
if selection_checkbox.pressed and project.has_selection:
|
||||
var selection: Image = project.bitmap_to_image(project.selection_bitmap)
|
||||
selection_tex.create_from_image(selection, 0)
|
||||
|
||||
if !confirmed:
|
||||
preview.material.set_shader_param("hue_shift_amount", hue_slider.value / 360)
|
||||
|
|
|
@ -30,9 +30,10 @@ func _confirmed() -> void:
|
|||
|
||||
|
||||
func commit_action(cel: Image, project: Project = Global.current_project) -> void:
|
||||
var selection: Image = project.bitmap_to_image(project.selection_bitmap)
|
||||
var selection_tex := ImageTexture.new()
|
||||
selection_tex.create_from_image(selection)
|
||||
if selection_checkbox.pressed and project.has_selection:
|
||||
var selection: Image = project.bitmap_to_image(project.selection_bitmap)
|
||||
selection_tex.create_from_image(selection, 0)
|
||||
|
||||
if !confirmed:
|
||||
preview.material.set_shader_param("red", red)
|
||||
|
|
Loading…
Reference in a new issue