mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
1 line
834 B
Plaintext
1 line
834 B
Plaintext
{"name":"weave","node_position":{"x":0,"y":0},"parameters":{"columns":8,"rows":8,"width":0.85},"shader_model":{"global":"float weave(vec2 uv, vec2 count, float width) {\n uv *= count;\n\tfloat c = (sin(3.1415926*(uv.x+floor(uv.y)))*0.5+0.5)*step(abs(fract(uv.y)-0.5), width*0.5);\n\tc = max(c, (sin(3.1415926*(1.0+uv.y+floor(uv.x)))*0.5+0.5)*step(abs(fract(uv.x)-0.5), width*0.5));\n\treturn c;\n}","inputs":[],"instance":"","name":"Weave","outputs":[{"f":"weave($uv, vec2($columns, $rows), $width)","type":"f"}],"parameters":[{"default":4,"label":"","max":32,"min":2,"name":"columns","step":1,"type":"float","widget":"spinbox"},{"default":4,"label":"","max":32,"min":2,"name":"rows","step":1,"type":"float","widget":"spinbox"},{"default":0.8,"label":"","max":1,"min":0,"name":"width","step":0.05,"type":"float"}]},"type":"shader"} |