material-maker/addons/material_maker/nodes/shear.mmg

83 lines
1.5 KiB
Plaintext
Raw Normal View History

2020-05-08 10:35:43 +02:00
{
"name": "shear",
"node_position": {
"x": 0,
"y": 0
},
"parameters": {
2020-09-29 22:27:10 +02:00
"amount": 0,
"center": 0,
"direction": 1
2020-05-08 10:35:43 +02:00
},
"shader_model": {
"code": "",
"global": "",
"inputs": [
{
"default": "vec4(1.0)",
"label": "",
2020-09-29 22:27:10 +02:00
"longdesc": "The input image",
2020-05-08 10:35:43 +02:00
"name": "in",
2020-09-29 22:27:10 +02:00
"shortdesc": "Input",
2020-05-08 10:35:43 +02:00
"type": "rgba"
}
],
"instance": "",
2020-09-29 22:27:10 +02:00
"longdesc": "A node that performs a shear stress transform on its input",
2020-05-08 10:35:43 +02:00
"name": "Shear",
"outputs": [
{
2020-09-29 22:27:10 +02:00
"longdesc": "Shows the transformed image",
"rgba": "$in($uv+$amount*($uv.yx-vec2($center))*vec2($direction))",
"shortdesc": "Output",
2020-05-08 10:35:43 +02:00
"type": "rgba"
}
],
"parameters": [
{
"default": 1,
"label": "",
2020-09-29 22:27:10 +02:00
"longdesc": "The direction of the shear transform (horizontal or vertical)",
2020-05-08 10:35:43 +02:00
"name": "direction",
2020-09-29 22:27:10 +02:00
"shortdesc": "Direction",
2020-05-08 10:35:43 +02:00
"type": "enum",
"values": [
{
"name": "Horizontal",
"value": "1.0, 0.0"
},
{
"name": "Vertical",
"value": "0.0, 1.0"
}
]
},
{
"control": "None",
"default": 0,
"label": "",
2020-09-29 22:27:10 +02:00
"longdesc": "The amount of the transform",
2020-05-08 10:35:43 +02:00
"max": 1,
"min": -1,
"name": "amount",
2020-09-29 22:27:10 +02:00
"shortdesc": "Amount",
"step": 0.01,
"type": "float"
},
{
"control": "None",
"default": 0,
"label": "",
"longdesc": "The position of the shear center",
"max": 1,
"min": 0,
"name": "center",
"shortdesc": "Center",
2020-05-08 10:35:43 +02:00
"step": 0.01,
"type": "float"
}
2020-09-29 22:27:10 +02:00
],
"shortdesc": "Shear"
2020-05-08 10:35:43 +02:00
},
"type": "shader"
}