diff --git a/addons/material_maker/nodes/scale.mmg b/addons/material_maker/nodes/scale.mmg index d9c14486c..fbbd307a6 100644 --- a/addons/material_maker/nodes/scale.mmg +++ b/addons/material_maker/nodes/scale.mmg @@ -7,9 +7,11 @@ "parameters": { "cx": 0, "cy": 0, + "log_scale": 0, "scale_x": 1, "scale_y": 1 }, + "seed_int": 0, "shader_model": { "code": "", "global": "vec2 scale(vec2 uv, vec2 center, vec2 scale) {\n\tuv -= center;\n\tuv /= scale;\n\tuv += center;\n return uv;\n}", @@ -29,7 +31,7 @@ "outputs": [ { "longdesc": "Shows the scaled image", - "rgba": "$i(scale($uv, vec2(0.5+$cx, 0.5+$cy), vec2($scale_x, $scale_y)))", + "rgba": "$i(scale($uv, vec2(0.5+$cx, 0.5+$cy), vec2($scale_x, $scale_y) * pow(2.0, $log_scale)))", "shortdesc": "Output", "type": "rgba" } @@ -82,6 +84,18 @@ "shortdesc": "Scale.y", "step": 0.005, "type": "float" + }, + { + "control": "None", + "default": 0, + "label": "Log Scale", + "longdesc": "Adjust scale to very large or very small values", + "max": 6, + "min": -6, + "name": "log_scale", + "shortdesc": "Log Scale", + "step": 0.01, + "type": "float" } ], "shortdesc": "Scale"