mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-27 23:17:14 +01:00
53 lines
1002 B
Plaintext
53 lines
1002 B
Plaintext
|
{
|
||
|
"name": "mwf_mix_maps",
|
||
|
"node_position": {
|
||
|
"x": 0,
|
||
|
"y": 0
|
||
|
},
|
||
|
"parameters": {
|
||
|
"angle": 45,
|
||
|
"height": 0.8
|
||
|
},
|
||
|
"shader_model": {
|
||
|
"code": "",
|
||
|
"global": "vec3 matmap_mix(vec3 in1, vec3 in2) {\n\tfloat is_in1 = step(in2.x, in1.x);\n\t//return vec3(max(in1.x, in2.x), in1.yz*is_in1+in2.yz*(1.0-is_in1));\n\treturn vec3(max(in1.x, in2.x), mix(in2.yz, in1.yz, is_in1));\n}",
|
||
|
"inputs": [
|
||
|
{
|
||
|
"default": "vec3(0.0)",
|
||
|
"label": "",
|
||
|
"name": "in1",
|
||
|
"type": "rgb"
|
||
|
},
|
||
|
{
|
||
|
"default": "vec3(0.0)",
|
||
|
"label": "",
|
||
|
"name": "in2",
|
||
|
"type": "rgb"
|
||
|
},
|
||
|
{
|
||
|
"default": "vec3(0.0)",
|
||
|
"label": "",
|
||
|
"name": "in3",
|
||
|
"type": "rgb"
|
||
|
},
|
||
|
{
|
||
|
"default": "vec3(0.0)",
|
||
|
"label": "",
|
||
|
"name": "in4",
|
||
|
"type": "rgb"
|
||
|
}
|
||
|
],
|
||
|
"instance": "",
|
||
|
"name": "Mix maps",
|
||
|
"outputs": [
|
||
|
{
|
||
|
"rgb": "matmap_mix(matmap_mix($in1($uv), $in2($uv)), matmap_mix($in3($uv), $in4($uv)))",
|
||
|
"type": "rgb"
|
||
|
}
|
||
|
],
|
||
|
"parameters": [
|
||
|
|
||
|
]
|
||
|
},
|
||
|
"type": "shader"
|
||
|
}
|