Skip to content

Commit

Permalink
Convert arguments in glsl.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbn42 committed May 6, 2020
1 parent 58d9bfe commit 515f49d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions panon/effect/build_shader_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ def hex2vec4(value):


def format_value(type_, value):
if type_ == 'int':
return f'int({value})'
if type_ == 'double':
return f'float({value})'
if type_ == 'float':
return f'float({value})'
if type_ == 'bool':
return f'bool({value})'
if type_ == 'color':
return hex2vec4(value)
return value
Expand Down
1 change: 1 addition & 0 deletions plasmoid/contents/ui/config/ConfigEffect.qml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Kirigami.FormLayout {
component= Qt.createComponent({
"int":"EffectArgumentInt.qml",
"double":"EffectArgumentDouble.qml",
"float":"EffectArgumentDouble.qml",
"bool":"EffectArgumentBool.qml",
"color":"EffectArgumentColor.qml",
}[arg["type"]]);
Expand Down

0 comments on commit 515f49d

Please sign in to comment.