mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
59 lines
1.1 KiB
Plaintext
59 lines
1.1 KiB
Plaintext
{
|
|
"name": "sdf3d_boolean",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"op": 0
|
|
},
|
|
"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"
|
|
} |