mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Fixed generic node update and added weave generator
This commit is contained in:
parent
8651569f2b
commit
4cfd8fbc1e
@ -147,8 +147,8 @@ func update_node():
|
||||
preview_timer.stop()
|
||||
remove_child(preview_timer)
|
||||
for c in get_children():
|
||||
c.queue_free()
|
||||
yield(get_tree(), "idle_frame")
|
||||
remove_child(c)
|
||||
c.free()
|
||||
rect_size = Vector2(0, 0)
|
||||
# Rebuild node
|
||||
title = generator.get_type_name()
|
||||
|
1
addons/material_maker/nodes/weave.mmg
Normal file
1
addons/material_maker/nodes/weave.mmg
Normal file
@ -0,0 +1 @@
|
||||
{"name":"weave","node_position":{"x":0,"y":0},"parameters":{"columns":4,"rows":4},"shader_model":{"global":"float weave(vec2 uv) {\n\tvec2 v = sin(3.1415892*vec2(uv.x+floor(uv.y), 1.0+uv.y+floor(uv.x)));\n\treturn max(v.x, v.y)*0.5+0.5;\n}","inputs":[],"instance":"","name":"Weave","outputs":[{"f":"weave(vec2($columns, $rows)*$uv)","type":"f"}],"parameters":[{"default":0,"label":"","max":32,"min":2,"name":"rows","step":1,"type":"float","widget":"spinbox"},{"default":0,"label":"","max":32,"min":2,"name":"columns","step":1,"type":"float","widget":"spinbox"}]},"type":"shader"}
|
Loading…
Reference in New Issue
Block a user