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 Nov 6, 2024
1 parent 5dbd41d commit 2dd20e5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion 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 Down Expand Up @@ -38,7 +39,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 @@ -91,6 +92,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"
Expand Down

0 comments on commit 2dd20e5

Please sign in to comment.