mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
ff191538f6
Moved handling of the "global" definitions of shaders into main shader generation code. Added group creation (does not create inputs yet, and remotes should be cleaned). updated all preview meshes (to fix problems with depth).
1 line
629 B
Plaintext
1 line
629 B
Plaintext
{"name":"kaleidoscope","node_position":{"x":0,"y":0},"parameters":{"count":7,"direction":0,"offset":0},"shader_model":{"global":"vec2 kal_rotate(vec2 uv, float count) {\n\tuv -= vec2(0.5);\n\tfloat l = length(uv);\n\tfloat a = mod(atan(uv.y, uv.x), 6.28318530718/count);\n\treturn vec2(0.5)+l*vec2(cos(a), sin(a));\n}","inputs":[{"default":"vec4($uv, 0, 1)","label":"","name":"i","type":"rgba"}],"instance":"","name":"Kaleidoscope","outputs":[{"rgba":"$i(kal_rotate($uv, $count))","type":"rgba"}],"parameters":[{"default":0,"label":"","max":10,"min":2,"name":"count","step":1,"type":"float","widget":"spinbox"}]},"type":"shader"} |