Skip to content

Commit

Permalink
Add "Log Scale" parameter to Scale node
Browse files Browse the repository at this point in the history
  • Loading branch information
myaaaaaaaaa committed Dec 19, 2022
1 parent 1b75a87 commit fb625c7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions addons/material_maker/nodes/scale.mmg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"parameters": {
"cx": 0,
"cy": 0,
"log_scale": 0,
"scale_x": 1,
"scale_y": 1
},
Expand All @@ -32,7 +33,7 @@
"outputs": [
{
"longdesc": "Shows a 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"
}
Expand Down Expand Up @@ -85,9 +86,21 @@
"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"
},
"type": "shader"
}
}

0 comments on commit fb625c7

Please sign in to comment.