Skip to content

Commit 5d19682

Browse files
committed
Add Depth output to Normal Map node
1 parent 5dbd41d commit 5d19682

File tree

1 file changed

+63
-5
lines changed

1 file changed

+63
-5
lines changed

addons/material_maker/nodes/normal_map2.mmg

+63-5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@
3535
"from_port": 0,
3636
"to": "switch",
3737
"to_port": 0
38+
},
39+
{
40+
"from": "math",
41+
"from_port": 0,
42+
"to": "gen_outputs",
43+
"to_port": 1
44+
},
45+
{
46+
"from": "gen_inputs",
47+
"from_port": 0,
48+
"to": "math_2",
49+
"to_port": 1
50+
},
51+
{
52+
"from": "math_2",
53+
"from_port": 0,
54+
"to": "math",
55+
"to_port": 0
3856
}
3957
],
4058
"label": "Normal Map",
@@ -96,6 +114,10 @@
96114
{
97115
"node": "edge_detect_1",
98116
"widget": "amount"
117+
},
118+
{
119+
"node": "math",
120+
"widget": "default_in2"
99121
}
100122
],
101123
"longdesc": "The strength of the normal map filter",
@@ -137,8 +159,8 @@
137159
{
138160
"name": "gen_outputs",
139161
"node_position": {
140-
"x": -458.663818359375,
141-
"y": 73.04736328125
162+
"x": -320,
163+
"y": 120
142164
},
143165
"parameters": {
144166

@@ -148,8 +170,14 @@
148170
"group_size": 0,
149171
"longdesc": "Shows the generated normal map",
150172
"name": "Normal",
151-
"shortdesc": "Output",
173+
"shortdesc": "Normal",
152174
"type": "rgb"
175+
},
176+
{
177+
"longdesc": "The corresponding depth map ready to be connected to the material",
178+
"name": "Depth",
179+
"shortdesc": "Depth",
180+
"type": "f"
153181
}
154182
],
155183
"seed": -6314,
@@ -158,8 +186,8 @@
158186
{
159187
"name": "gen_inputs",
160188
"node_position": {
161-
"x": -1147.91015625,
162-
"y": 77.9473648071289
189+
"x": -1200,
190+
"y": 140
163191
},
164192
"parameters": {
165193

@@ -336,6 +364,36 @@
336364
},
337365
"seed_int": 0,
338366
"type": "ensure_greyscale"
367+
},
368+
{
369+
"name": "math",
370+
"node_position": {
371+
"x": -600,
372+
"y": 380
373+
},
374+
"parameters": {
375+
"clamp": false,
376+
"default_in1": 0,
377+
"default_in2": 1,
378+
"op": 2
379+
},
380+
"seed_int": 0,
381+
"type": "math"
382+
},
383+
{
384+
"name": "math_2",
385+
"node_position": {
386+
"x": -820,
387+
"y": 380
388+
},
389+
"parameters": {
390+
"clamp": false,
391+
"default_in1": 1,
392+
"default_in2": 1,
393+
"op": 1
394+
},
395+
"seed_int": 0,
396+
"type": "math"
339397
}
340398
],
341399
"parameters": {

0 commit comments

Comments
 (0)