{ "name": "sdroundedshape", "node_position": { "x": 0, "y": 0 }, "parameters": { "bevel": 0, "cx": 0, "cy": 0, "h": 0.08, "k": 0.15, "op": 0, "r": 0.2, "w": 0.28 }, "shader_model": { "code": "", "global": "float sdSmoothUnion( float d1, float d2, float k ) {\n float h = clamp( 0.5 + 0.5*(d2-d1)/k, 0.0, 1.0 );\n return mix( d2, d1, h ) - k*h*(1.0-h); }\n\nfloat sdSmoothSubtraction( float d1, float d2, float k ) {\n float h = clamp( 0.5 - 0.5*(d2+d1)/k, 0.0, 1.0 );\n return mix( d2, -d1, h ) + k*h*(1.0-h); }\n\nfloat sdSmoothIntersection( float d1, float d2, float k ) {\n float h = clamp( 0.5 - 0.5*(d2-d1)/k, 0.0, 1.0 );\n return mix( d2, d1, h ) + k*h*(1.0-h); }\n", "inputs": [ { "default": "0.0", "label": "", "name": "in", "type": "f" } ], "instance": "", "name": "sdRoundedShape", "outputs": [ { "f": "$in($uv) - $r", "type": "f" } ], "parameters": [ { "default": 0, "label": "", "max": 1, "min": 0, "name": "r", "step": 0.01, "type": "float" } ] }, "type": "shader" }