-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed broken compatibility with new variadic nodes (restored original…
… nodes and renamed new ones)
- Loading branch information
Showing
11 changed files
with
532 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"generic_size": 1, | ||
"name": "sdboolean", | ||
"node_position": { | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"parameters": { | ||
"op1": 0 | ||
}, | ||
"seed_int": 0, | ||
"shader_model": { | ||
"code": [ | ||
"float $(name_uv)_b = $b($uv);", | ||
"", | ||
"#for", | ||
"$(name_uv)_b = $op# $s#($uv), $(name_uv)_b);", | ||
"#end" | ||
], | ||
"global": "", | ||
"inputs": [ | ||
{ | ||
"default": "0.0", | ||
"label": "", | ||
"longdesc": "The first shape, defined as a signed distance function", | ||
"name": "b", | ||
"shortdesc": "Base Shape", | ||
"type": "sdf2d" | ||
}, | ||
{ | ||
"default": "0.0", | ||
"label": "", | ||
"longdesc": "The subsequent shape, defined as a signed distance function", | ||
"name": "s#", | ||
"shortdesc": "Shape#", | ||
"type": "sdf2d" | ||
} | ||
], | ||
"instance": "", | ||
"longdesc": "Performs boolean operation(s) (union, intersection or difference) between two or more shapes", | ||
"name": "sdBoolean", | ||
"outputs": [ | ||
{ | ||
"longdesc": "The shape generated by the boolean operation(s)", | ||
"sdf2d": "$(name_uv)_b", | ||
"shortdesc": "Output", | ||
"type": "sdf2d" | ||
} | ||
], | ||
"parameters": [ | ||
{ | ||
"default": 0, | ||
"label": "2:", | ||
"longdesc": "The operation performed by this node", | ||
"name": "op#", | ||
"shortdesc": "Operation", | ||
"type": "enum", | ||
"values": [ | ||
{ | ||
"name": "Union", | ||
"value": "min(" | ||
}, | ||
{ | ||
"name": "Subtraction", | ||
"value": "max(-" | ||
}, | ||
{ | ||
"name": "Intersection", | ||
"value": "max(" | ||
} | ||
] | ||
} | ||
], | ||
"shortdesc": "sdBoolean" | ||
}, | ||
"type": "shader" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"generic_size": 1, | ||
"name": "sdf3d_boolean", | ||
"node_position": { | ||
"x": 0, | ||
"y": 0 | ||
}, | ||
"parameters": { | ||
"op1": 0 | ||
}, | ||
"seed_int": 0, | ||
"shader_model": { | ||
"code": [ | ||
"vec2 $(name_uv)_b = $b($uv);", | ||
"", | ||
"#for", | ||
"$(name_uv)_b = $op#($s#($uv), $(name_uv)_b);", | ||
"#end" | ||
], | ||
"global": [ | ||
"vec2 sdf3dc_union(vec2 a, vec2 b) {", | ||
"\treturn vec2(min(a.x, b.x), mix(b.y, a.y, step(a.x, b.x)));", | ||
"}", | ||
"vec2 sdf3dc_sub(vec2 a, vec2 b) {", | ||
"\treturn vec2(max(-a.x, b.x), a.y);", | ||
"}", | ||
"vec2 sdf3dc_inter(vec2 a, vec2 b) {", | ||
"\treturn vec2(max(a.x, b.x), mix(a.y, b.y, step(a.x, b.x)));", | ||
"}", | ||
"" | ||
], | ||
"inputs": [ | ||
{ | ||
"default": "vec2(100.0, 0.0)", | ||
"label": "", | ||
"longdesc": "The first shape, defined as a signed distance function", | ||
"name": "b", | ||
"shortdesc": "Base Shape", | ||
"type": "sdf3dc" | ||
}, | ||
{ | ||
"default": "vec2(100.0, 0.0)", | ||
"label": "", | ||
"longdesc": "The subsequent shape, defined as a signed distance function", | ||
"name": "s#", | ||
"shortdesc": "Shape#", | ||
"type": "sdf3dc" | ||
} | ||
], | ||
"instance": "", | ||
"longdesc": "Performs boolean operation(s) (union, intersection or difference) between two or more shapes", | ||
"name": "Boolean", | ||
"outputs": [ | ||
{ | ||
"longdesc": "The shape generated by the boolean operation(s)", | ||
"sdf3dc": "$(name_uv)_b", | ||
"shortdesc": "Output", | ||
"type": "sdf3dc" | ||
} | ||
], | ||
"parameters": [ | ||
{ | ||
"default": 0, | ||
"label": "2:", | ||
"longdesc": "The operation performed by this node", | ||
"name": "op#", | ||
"shortdesc": "Operation", | ||
"type": "enum", | ||
"values": [ | ||
{ | ||
"name": "Union", | ||
"value": "sdf3dc_union" | ||
}, | ||
{ | ||
"name": "Subtraction", | ||
"value": "sdf3dc_sub" | ||
}, | ||
{ | ||
"name": "Intersection", | ||
"value": "sdf3dc_inter" | ||
} | ||
] | ||
} | ||
], | ||
"shortdesc": "Boolean" | ||
}, | ||
"type": "shader" | ||
} |
Oops, something went wrong.