mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
60 lines
913 B
Plaintext
60 lines
913 B
Plaintext
{
|
|
"name": "mul_detect",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"parameters": {
|
|
"t": 0.01,
|
|
"v": 0.5
|
|
},
|
|
"shader_model": {
|
|
"code": "float $(name_uv)_d = ($in($uv)-$v)/$t;",
|
|
"global": "",
|
|
"inputs": [
|
|
{
|
|
"default": "1.0",
|
|
"label": "",
|
|
"name": "mul",
|
|
"type": "f"
|
|
},
|
|
{
|
|
"default": "0.0",
|
|
"label": "",
|
|
"name": "in",
|
|
"type": "f"
|
|
}
|
|
],
|
|
"instance": "",
|
|
"name": "MulDetect",
|
|
"outputs": [
|
|
{
|
|
"f": "$mul($uv)*clamp(1.0-$(name_uv)_d*$(name_uv)_d, 0.0, 1.0)",
|
|
"type": "f"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"control": "None",
|
|
"default": 0.5,
|
|
"label": "Value",
|
|
"max": 1,
|
|
"min": 0,
|
|
"name": "v",
|
|
"step": 0.01,
|
|
"type": "float"
|
|
},
|
|
{
|
|
"control": "None",
|
|
"default": 0.1,
|
|
"label": "Tolerance",
|
|
"max": 1,
|
|
"min": 0.01,
|
|
"name": "t",
|
|
"step": 0.001,
|
|
"type": "float"
|
|
}
|
|
]
|
|
},
|
|
"type": "shader"
|
|
} |