mirror of
https://github.com/Relintai/mat_maker_gd.git
synced 2025-04-30 10:57:56 +02:00
61 lines
1.3 KiB
Plaintext
61 lines
1.3 KiB
Plaintext
{
|
|
"name": "fill_to_position",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"axis": 0
|
|
},
|
|
"shader_model": {
|
|
"code": "vec2 $(name_uv)_c = fract($in($uv).xy+0.5*$in($uv).zw);",
|
|
"global": "",
|
|
"inputs": [
|
|
{
|
|
"default": "vec4(0.0)",
|
|
"label": "",
|
|
"longdesc": "The input fill data, to be connected to the output of a Fill node",
|
|
"name": "in",
|
|
"shortdesc": "Input",
|
|
"type": "rgba"
|
|
}
|
|
],
|
|
"instance": "",
|
|
"longdesc": "A fill companion node that fills each area with a greyscale value that depends on its position",
|
|
"name": "Fill to Position",
|
|
"outputs": [
|
|
{
|
|
"f": "$axis",
|
|
"longdesc": "The generated output image",
|
|
"shortdesc": "Output",
|
|
"type": "f"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"default": 2,
|
|
"label": "",
|
|
"longdesc": "The position value to be used:\n- X for horizontal axis\n- Y for vertical axis\n- Radial for distance to center",
|
|
"name": "axis",
|
|
"shortdesc": "Position",
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"name": "X",
|
|
"value": "$(name_uv)_c.x"
|
|
},
|
|
{
|
|
"name": "Y",
|
|
"value": "$(name_uv)_c.y"
|
|
},
|
|
{
|
|
"name": "Radial",
|
|
"value": "length($(name_uv)_c-vec2(0.5))"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"shortdesc": "Fill to position"
|
|
},
|
|
"type": "shader"
|
|
} |