mirror of
https://github.com/Relintai/mat_maker_gd.git
synced 2025-04-30 10:57:56 +02:00
68 lines
1.3 KiB
Plaintext
68 lines
1.3 KiB
Plaintext
{
|
|
"name": "sphere",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"cx": 0.5,
|
|
"cy": 0.5,
|
|
"r": 0.5
|
|
},
|
|
"shader_model": {
|
|
"code": "",
|
|
"global": "float sphere(vec2 uv, vec2 c, float r) {\n\tuv -= c;\n\tuv /= r;\n\treturn 2.0*r*sqrt(max(0.0, 1.0-dot(uv, uv)));\n}\n",
|
|
"inputs": [
|
|
|
|
],
|
|
"instance": "",
|
|
"name": "Sphere",
|
|
"outputs": [
|
|
{
|
|
"f": "sphere($uv, vec2($cx, $cy), $r)",
|
|
"longdesc": "A heightmap of the specified sphere",
|
|
"shortdesc": "Output",
|
|
"type": "f"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"control": "None",
|
|
"default": 0.5,
|
|
"label": "Center X",
|
|
"longdesc": "Position of the center along the X axis",
|
|
"max": 1,
|
|
"min": 0,
|
|
"name": "cx",
|
|
"shortdesc": "Center.x",
|
|
"step": 0.01,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "None",
|
|
"default": 0.5,
|
|
"label": "Center Y",
|
|
"longdesc": "Position of the center along the Y axis",
|
|
"max": 1,
|
|
"min": 0,
|
|
"name": "cy",
|
|
"shortdesc": "Center.y",
|
|
"step": 0.01,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "None",
|
|
"default": 0.5,
|
|
"label": "Radius",
|
|
"longdesc": "Radius of the sphere",
|
|
"max": 1,
|
|
"min": 0,
|
|
"name": "r",
|
|
"shortdesc": "Radius",
|
|
"step": 0.01,
|
|
"type": "float"
|
|
}
|
|
]
|
|
},
|
|
"type": "shader"
|
|
} |