mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
52 lines
803 B
Plaintext
52 lines
803 B
Plaintext
{
|
|
"name": "sdf3d_capsule",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"l": 0.3,
|
|
"r": 0.15,
|
|
"sx": 0.25,
|
|
"sy": 0.25,
|
|
"sz": 0.5
|
|
},
|
|
"shader_model": {
|
|
"code": "vec3 $(name_uv)_p = $uv;\n$(name_uv)_p.y -= clamp($(name_uv)_p.y, -$l, $l);\n",
|
|
"global": "",
|
|
"inputs": [
|
|
|
|
],
|
|
"instance": "",
|
|
"name": "Capsule",
|
|
"outputs": [
|
|
{
|
|
"sdf3d": "length($(name_uv)_p)-$r",
|
|
"type": "sdf3d"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"control": "Rect1.y",
|
|
"default": 0.25,
|
|
"label": "Length",
|
|
"max": 1,
|
|
"min": 0,
|
|
"name": "l",
|
|
"step": 0.01,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "Rect1.x",
|
|
"default": 0.2,
|
|
"label": "Radius",
|
|
"max": 1,
|
|
"min": 0,
|
|
"name": "r",
|
|
"step": 0.01,
|
|
"type": "float"
|
|
}
|
|
]
|
|
},
|
|
"type": "shader"
|
|
} |