From dcfbee7ffcc5054787abf4bc822486be1027b293 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Mon, 6 Jan 2020 21:02:25 +0100 Subject: [PATCH] Added 2D and 3D SDF morph operators --- addons/material_maker/nodes/sdf3d_morph.mmg | 57 +++++++++++++++++++++ addons/material_maker/nodes/sdmorph.mmg | 56 ++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 addons/material_maker/nodes/sdf3d_morph.mmg create mode 100644 addons/material_maker/nodes/sdmorph.mmg diff --git a/addons/material_maker/nodes/sdf3d_morph.mmg b/addons/material_maker/nodes/sdf3d_morph.mmg new file mode 100644 index 0000000..e9c3192 --- /dev/null +++ b/addons/material_maker/nodes/sdf3d_morph.mmg @@ -0,0 +1,57 @@ +{ + "name": "sdf3d_morph", + "node_position": { + "x": 0, + "y": 0 + }, + "parameters": { + "Amount": 0.5, + "amount": 0.5, + "bevel": 0, + "cx": 0, + "cy": 0, + "h": 0.08, + "op": 0, + "r": 0.3, + "w": 0.28 + }, + "shader_model": { + "code": "", + "global": "", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in1", + "type": "sdf3d" + }, + { + "default": "0.0", + "label": "", + "name": "in2", + "type": "sdf3d" + } + ], + "instance": "", + "name": "Morph", + "outputs": [ + { + "sdf3d": "mix($in1($uv), $in2($uv), $amount)", + "type": "sdf3d" + } + ], + "parameters": [ + { + "control": "None", + "default": 0.5, + "label": "", + "max": 1, + "min": 0, + "name": "amount", + "step": 0.01, + "type": "float" + } + ] + }, + "type": "shader" +} \ No newline at end of file diff --git a/addons/material_maker/nodes/sdmorph.mmg b/addons/material_maker/nodes/sdmorph.mmg new file mode 100644 index 0000000..ea79825 --- /dev/null +++ b/addons/material_maker/nodes/sdmorph.mmg @@ -0,0 +1,56 @@ +{ + "name": "sdmorph", + "node_position": { + "x": 0, + "y": 0 + }, + "parameters": { + "amount": 0.5, + "bevel": 0, + "cx": 0, + "cy": 0, + "h": 0.08, + "op": 0, + "r": 0.3, + "w": 0.28 + }, + "shader_model": { + "code": "", + "global": "", + "inputs": [ + { + "default": "0.0", + "label": "", + "name": "in1", + "type": "sdf2d" + }, + { + "default": "0.0", + "label": "", + "name": "in2", + "type": "sdf2d" + } + ], + "instance": "", + "name": "sdMorph", + "outputs": [ + { + "sdf2d": "mix($in1($uv), $in2($uv), $amount)", + "type": "sdf2d" + } + ], + "parameters": [ + { + "control": "None", + "default": 0.5, + "label": "", + "max": 1, + "min": 0, + "name": "amount", + "step": 0.01, + "type": "float" + } + ] + }, + "type": "shader" +} \ No newline at end of file