mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:24:44 -04:00
Experimental shader feature: Expose shader's float uniforms to the UI
If the loaded shader has uniforms, they will be exposed to the UI, so the users will be able to modify the shader parameters easily. Currently only works with float uniforms.
This commit is contained in:
parent
86ee5d1abf
commit
ec81950139
3 changed files with 86 additions and 22 deletions
|
@ -226,6 +226,5 @@ func load_shader() -> void:
|
|||
shader.code = file_data
|
||||
|
||||
var shader_effect_dialog = Global.control.get_node("Dialogs/ImageEffects/ShaderEffect")
|
||||
shader_effect_dialog.preview.material.shader = shader
|
||||
shader_effect_dialog.shader_loaded_label.text = tr("Shader loaded:") + " " + file_name.get_basename()
|
||||
shader_effect_dialog.change_shader(shader, file_name.get_basename())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue