mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
286 lines
4.5 KiB
Plaintext
286 lines
4.5 KiB
Plaintext
{
|
|
"connections": [
|
|
{
|
|
"from": "nm_convolution",
|
|
"from_port": 0,
|
|
"to": "nm_postprocess",
|
|
"to_port": 0
|
|
},
|
|
{
|
|
"from": "nm_postprocess",
|
|
"from_port": 0,
|
|
"to": "gen_outputs",
|
|
"to_port": 0
|
|
},
|
|
{
|
|
"from": "gen_inputs",
|
|
"from_port": 0,
|
|
"to": "buffer",
|
|
"to_port": 0
|
|
},
|
|
{
|
|
"from": "buffer",
|
|
"from_port": 0,
|
|
"to": "nm_convolution",
|
|
"to_port": 0
|
|
}
|
|
],
|
|
"label": "Normal Map",
|
|
"name": "normal_map",
|
|
"node_position": {
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"nodes": [
|
|
{
|
|
"name": "buffer",
|
|
"node_position": {
|
|
"x": -687.663818,
|
|
"y": 125.60614
|
|
},
|
|
"parameters": {
|
|
"size": 10
|
|
},
|
|
"type": "buffer"
|
|
},
|
|
{
|
|
"convolution_params": {
|
|
"input_type": "f",
|
|
"matrix": [
|
|
[
|
|
[
|
|
-1,
|
|
-1,
|
|
0
|
|
],
|
|
[
|
|
0,
|
|
-2,
|
|
0
|
|
],
|
|
[
|
|
1,
|
|
-1,
|
|
0
|
|
]
|
|
],
|
|
[
|
|
[
|
|
-2,
|
|
0,
|
|
0
|
|
],
|
|
0,
|
|
[
|
|
2,
|
|
0,
|
|
0
|
|
]
|
|
],
|
|
[
|
|
[
|
|
-1,
|
|
1,
|
|
0
|
|
],
|
|
[
|
|
0,
|
|
2,
|
|
0
|
|
],
|
|
[
|
|
1,
|
|
1,
|
|
0
|
|
]
|
|
]
|
|
],
|
|
"output_type": "rgb",
|
|
"x": 1,
|
|
"y": 1
|
|
},
|
|
"name": "nm_convolution",
|
|
"node_position": {
|
|
"x": -690.25,
|
|
"y": 174.25
|
|
},
|
|
"parameters": {
|
|
"size": 10
|
|
},
|
|
"type": "convolution"
|
|
},
|
|
{
|
|
"name": "nm_postprocess",
|
|
"node_position": {
|
|
"x": -690.25,
|
|
"y": 222.25
|
|
},
|
|
"parameters": {
|
|
"amount": 1.02,
|
|
"format": 0,
|
|
"size": 10,
|
|
"type": 0
|
|
},
|
|
"shader_model": {
|
|
"code": "",
|
|
"global": "vec3 process_normal_default(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*multiplier+vec3(0.0, 0.0, -1.0))+vec3(0.5);\n}\n\nvec3 process_normal_opengl(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*multiplier+vec3(0.0, 0.0, 1.0))+vec3(0.5);\n}\n\nvec3 process_normal_directx(vec3 v, float multiplier) {\n\treturn 0.5*normalize(v.xyz*vec3(1.0, -1.0, 1.0)*multiplier+vec3(0.0, 0.0, 1.0))+vec3(0.5);\n}\n",
|
|
"inputs": [
|
|
{
|
|
"default": "vec3(0.0)",
|
|
"label": "",
|
|
"name": "in",
|
|
"type": "rgb"
|
|
}
|
|
],
|
|
"instance": "",
|
|
"name": "NormalMapPostProcess",
|
|
"outputs": [
|
|
{
|
|
"rgb": "process_normal_$format($in($uv).xyz, $amount*$size/128.0)",
|
|
"type": "rgb"
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"default": 0,
|
|
"label": "",
|
|
"name": "format",
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"name": "Default",
|
|
"value": "default"
|
|
},
|
|
{
|
|
"name": "OpenGL",
|
|
"value": "opengl"
|
|
},
|
|
{
|
|
"name": "DirectX",
|
|
"value": "directx"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"default": 9,
|
|
"first": 4,
|
|
"label": "",
|
|
"last": 11,
|
|
"name": "size",
|
|
"type": "size"
|
|
},
|
|
{
|
|
"default": 1,
|
|
"label": "",
|
|
"max": 2,
|
|
"min": 0,
|
|
"name": "amount",
|
|
"step": 0.005,
|
|
"type": "float"
|
|
}
|
|
]
|
|
},
|
|
"type": "shader"
|
|
},
|
|
{
|
|
"name": "gen_parameters",
|
|
"node_position": {
|
|
"x": -729.910156,
|
|
"y": -5.916687
|
|
},
|
|
"parameters": {
|
|
"amount": 0.5,
|
|
"param0": 10,
|
|
"param1": 1.02,
|
|
"param2": 0,
|
|
"size": 4
|
|
},
|
|
"type": "remote",
|
|
"widgets": [
|
|
{
|
|
"label": "",
|
|
"linked_widgets": [
|
|
{
|
|
"node": "nm_postprocess",
|
|
"widget": "format"
|
|
}
|
|
],
|
|
"name": "param2",
|
|
"type": "linked_control"
|
|
},
|
|
{
|
|
"label": "",
|
|
"linked_widgets": [
|
|
{
|
|
"node": "buffer",
|
|
"widget": "size"
|
|
},
|
|
{
|
|
"node": "nm_convolution",
|
|
"widget": "size"
|
|
},
|
|
{
|
|
"node": "nm_postprocess",
|
|
"widget": "size"
|
|
}
|
|
],
|
|
"name": "param0",
|
|
"type": "linked_control"
|
|
},
|
|
{
|
|
"label": "",
|
|
"linked_widgets": [
|
|
{
|
|
"node": "nm_postprocess",
|
|
"widget": "amount"
|
|
}
|
|
],
|
|
"name": "param1",
|
|
"type": "linked_control"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "gen_outputs",
|
|
"node_position": {
|
|
"x": -407.663818,
|
|
"y": 151.047363
|
|
},
|
|
"parameters": {
|
|
|
|
},
|
|
"ports": [
|
|
{
|
|
"name": "port0",
|
|
"type": "rgba"
|
|
}
|
|
],
|
|
"type": "ios"
|
|
},
|
|
{
|
|
"name": "gen_inputs",
|
|
"node_position": {
|
|
"x": -870.910156,
|
|
"y": 157.047363
|
|
},
|
|
"parameters": {
|
|
|
|
},
|
|
"ports": [
|
|
{
|
|
"name": "port0",
|
|
"type": "rgba"
|
|
}
|
|
],
|
|
"type": "ios"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"amount": 0.5,
|
|
"param0": 10,
|
|
"param1": 1.02,
|
|
"param2": 0,
|
|
"size": 4
|
|
},
|
|
"type": "graph"
|
|
} |