Skip to content

Commit 5c52174

Browse files
committed
Add Depth output to Normal Map node
1 parent c992426 commit 5c52174

File tree

1 file changed

+65
-5
lines changed

1 file changed

+65
-5
lines changed

addons/material_maker/nodes/normal_map2.mmg

+65-5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@
4141
"from_port": 0,
4242
"to": "switch",
4343
"to_port": 1
44+
},
45+
{
46+
"from": "math",
47+
"from_port": 0,
48+
"to": "gen_outputs",
49+
"to_port": 1
50+
},
51+
{
52+
"from": "gen_inputs",
53+
"from_port": 0,
54+
"to": "math_2",
55+
"to_port": 1
56+
},
57+
{
58+
"from": "math_2",
59+
"from_port": 0,
60+
"to": "math",
61+
"to_port": 0
4462
}
4563
],
4664
"label": "Normal Map",
@@ -117,6 +135,10 @@
117135
{
118136
"node": "edge_detect_1",
119137
"widget": "amount"
138+
},
139+
{
140+
"node": "math",
141+
"widget": "default_in2"
120142
}
121143
],
122144
"longdesc": "The strength of the normal map filter",
@@ -158,8 +180,8 @@
158180
{
159181
"name": "gen_outputs",
160182
"node_position": {
161-
"x": -445.663818,
162-
"y": 75.047363
183+
"x": -414.663818,
184+
"y": 77.047363
163185
},
164186
"parameters": {
165187

@@ -169,8 +191,14 @@
169191
"group_size": 0,
170192
"longdesc": "Shows the generated normal map",
171193
"name": "Normal",
172-
"shortdesc": "Output",
194+
"shortdesc": "Normal",
173195
"type": "rgb"
196+
},
197+
{
198+
"longdesc": "The corresponding depth map ready to be connected to the material",
199+
"name": "Depth",
200+
"shortdesc": "Depth",
201+
"type": "f"
174202
}
175203
],
176204
"seed": -6314,
@@ -180,8 +208,8 @@
180208
{
181209
"name": "gen_inputs",
182210
"node_position": {
183-
"x": -1094.910156,
184-
"y": 74.047363
211+
"x": -1119.910156,
212+
"y": 81.047363
185213
},
186214
"parameters": {
187215

@@ -319,6 +347,38 @@
319347
"seed": 0,
320348
"seed_locked": false,
321349
"type": "pack_2x16_to_1x32"
350+
},
351+
{
352+
"name": "math",
353+
"node_position": {
354+
"x": -581.165161,
355+
"y": 334.908386
356+
},
357+
"parameters": {
358+
"clamp": false,
359+
"default_in1": 0,
360+
"default_in2": 1,
361+
"op": 2
362+
},
363+
"seed": 0,
364+
"seed_locked": false,
365+
"type": "math"
366+
},
367+
{
368+
"name": "math_2",
369+
"node_position": {
370+
"x": -808.220703,
371+
"y": 334.130615
372+
},
373+
"parameters": {
374+
"clamp": false,
375+
"default_in1": 1,
376+
"default_in2": 1,
377+
"op": 1
378+
},
379+
"seed": 0,
380+
"seed_locked": false,
381+
"type": "math"
322382
}
323383
],
324384
"parameters": {

0 commit comments

Comments
 (0)