mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
{
|
|
"name": "sdf3d_boolean",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"bevel": 0,
|
|
"cx": 0,
|
|
"cy": 0,
|
|
"h": 0.08,
|
|
"op": 0,
|
|
"r": 0.3,
|
|
"w": 0.28
|
|
},
|
|
"shader_model": {
|
|
"code": "",
|
|
"global": "vec2 sdf3dc_union(vec2 a, vec2 b) {\n\treturn vec2(min(a.x, b.x), mix(b.y, a.y, step(a.x, b.x)));\n}\nvec2 sdf3dc_sub(vec2 a, vec2 b) {\n\treturn vec2(max(a.x, -b.x), a.y);\n}\nvec2 sdf3dc_inter(vec2 a, vec2 b) {\n\treturn vec2(max(a.x, b.x), mix(a.y, b.y, step(a.x, b.x)));\n}\n",
|
|
"inputs": [
|
|
{
|
|
"default": "vec2(0.0)",
|
|
"label": "",
|
|
"name": "in1",
|
|
"type": "sdf3dc"
|
|
},
|
|
{
|
|
"default": "vec2(0.0)",
|
|
"label": "",
|
|
"name": "in2",
|
|
"type": "sdf3dc"
|
|
}
|
|
],
|
|
"instance": "",
|
|
"name": "Boolean",
|
|
"outputs": [
|
|
{
|
|
"sdf3dc": "$op($in1($uv), $in2($uv))",
|
|
"type": "sdf3dc"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"default": 2,
|
|
"label": "",
|
|
"name": "op",
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"name": "Union",
|
|
"value": "sdf3dc_union"
|
|
},
|
|
{
|
|
"name": "Subtraction",
|
|
"value": "sdf3dc_sub"
|
|
},
|
|
{
|
|
"name": "Intersection",
|
|
"value": "sdf3dc_inter"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"type": "shader"
|
|
} |