material-maker/addons/material_maker/nodes/circle_map.mmg

64 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-10-27 14:36:16 +01:00
{
"name": "circle_map",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
"radius": 1,
"repeat": 1
2019-10-27 14:36:16 +01:00
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4($uv, 0.0, 1.0)",
"label": "",
2020-10-02 23:11:58 +02:00
"longdesc": "The input image to be remapped",
2019-10-27 14:36:16 +01:00
"name": "in",
2020-10-02 23:11:58 +02:00
"shortdesc": "Input",
2019-10-27 14:36:16 +01:00
"type": "rgba"
}
],
"instance": "",
2020-10-02 23:11:58 +02:00
"longdesc": "A node that maps its input into a circle",
2019-10-27 14:36:16 +01:00
"name": "CircleMap",
"outputs": [
{
2020-10-02 23:11:58 +02:00
"longdesc": "Shows the remapped image",
"rgba": "$in(vec2(fract($repeat*atan($uv.y-0.5, $uv.x-0.5)*0.15915494309), min(0.99999, 2.0/$radius*length($uv-vec2(0.5)))))",
2020-10-02 23:11:58 +02:00
"shortdesc": "Output",
2019-10-27 14:36:16 +01:00
"type": "rgba"
}
],
"parameters": [
{
"control": "None",
"default": 1,
"label": "Radius",
2020-10-02 23:11:58 +02:00
"longdesc": "The radius of the circle where the input is mapped",
"max": 1.5,
"min": 0,
"name": "radius",
2020-10-02 23:11:58 +02:00
"shortdesc": "Radius",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 1,
"label": "Repeat",
2020-10-02 23:11:58 +02:00
"longdesc": "The number of repetitions of the input image around the circle",
"max": 16,
"min": 0,
"name": "repeat",
2020-10-02 23:11:58 +02:00
"shortdesc": "Repeat",
"step": 1,
"type": "float"
}
2020-10-02 23:11:58 +02:00
],
"shortdesc": "CircleMap"
2019-10-27 14:36:16 +01:00
},
"type": "shader"
}