mirror of
https://github.com/Relintai/mat_maker_gd.git
synced 2025-04-30 10:57:56 +02:00
90 lines
1.8 KiB
Plaintext
90 lines
1.8 KiB
Plaintext
{
|
|
"name": "scale",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"cx": 0,
|
|
"cy": 0,
|
|
"scale_x": 1,
|
|
"scale_y": 1
|
|
},
|
|
"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}",
|
|
"inputs": [
|
|
{
|
|
"default": "vec4($uv, 0.0, 1.0)",
|
|
"label": "",
|
|
"longdesc": "The input image",
|
|
"name": "i",
|
|
"shortdesc": "Input",
|
|
"type": "rgba"
|
|
}
|
|
],
|
|
"instance": "",
|
|
"longdesc": "Scales its input",
|
|
"name": "Scale",
|
|
"outputs": [
|
|
{
|
|
"longdesc": "Shows the scaled image",
|
|
"rgba": "$i(scale($uv, vec2(0.5+$cx, 0.5+$cy), vec2($scale_x, $scale_y)))",
|
|
"shortdesc": "Output",
|
|
"type": "rgba"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"control": "P1.x",
|
|
"default": 0,
|
|
"label": "Center X:",
|
|
"longdesc": "The position of the scale center",
|
|
"max": 1,
|
|
"min": -1,
|
|
"name": "cx",
|
|
"shortdesc": "Center.x",
|
|
"step": 0.005,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "P1.y",
|
|
"default": 0,
|
|
"label": "Center Y:",
|
|
"longdesc": "The poisition of the scale center",
|
|
"max": 1,
|
|
"min": -1,
|
|
"name": "cy",
|
|
"shortdesc": "Center.y",
|
|
"step": 0.005,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "Scale1.x",
|
|
"default": 1,
|
|
"label": "Scale X:",
|
|
"longdesc": "The scale amount along the X axis",
|
|
"max": 50,
|
|
"min": 0,
|
|
"name": "scale_x",
|
|
"shortdesc": "Scale.x",
|
|
"step": 0.005,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "Scale1.y",
|
|
"default": 1,
|
|
"label": "Scale Y:",
|
|
"longdesc": "The scale amount along the Y axis",
|
|
"max": 50,
|
|
"min": 0,
|
|
"name": "scale_y",
|
|
"shortdesc": "Scale.y",
|
|
"step": 0.005,
|
|
"type": "float"
|
|
}
|
|
],
|
|
"shortdesc": "Scale"
|
|
},
|
|
"type": "shader"
|
|
} |