[EXPERIMENTAL] Added ability to load a shader as an image effect

This new feature allows users to load a .shader file (must be a GLES2 Godot shader) that will modify the image itself. This feature is experimental and possibly buggy, not all shaders are working properly and I'm not sure yet why. As such, this feature may not be included in v0.8 stable.
This commit is contained in:
OverloadedOrama 2020-07-25 16:26:57 +03:00
parent 59122f6a13
commit 186e2259ac
5 changed files with 209 additions and 6 deletions

View file

@ -94,7 +94,8 @@ func setup_image_menu() -> void:
"Desaturation" : 0,
"Outline" : 0,
"Adjust Hue/Saturation/Value" : 0,
"Gradient" : 0
"Gradient" : 0,
"Shader" : 0
}
var image_menu : PopupMenu = Global.image_menu.get_popup()
@ -333,6 +334,9 @@ func image_menu_id_pressed(id : int) -> void:
10: # Gradient
Global.control.get_node("Dialogs/ImageEffects/GradientDialog").popup_centered()
Global.dialog_open(true)
11: # Shader
Global.control.get_node("Dialogs/ImageEffects/ShaderEffect").popup_centered()
Global.dialog_open(true)
func show_scale_image_popup() -> void: