reze-engine 0.65.0 → 0.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engine.d.ts +156 -42
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +876 -186
- package/dist/graph/compile.d.ts.map +1 -1
- package/dist/graph/compile.js +5 -0
- package/dist/graph/presets/body.d.ts.map +1 -1
- package/dist/graph/presets/body.js +26 -24
- package/dist/graph/presets/cloth_rough.js +8 -8
- package/dist/graph/presets/cloth_smooth.js +8 -8
- package/dist/graph/presets/default.js +4 -4
- package/dist/graph/presets/eye.js +10 -10
- package/dist/graph/presets/face.d.ts.map +1 -1
- package/dist/graph/presets/face.js +28 -26
- package/dist/graph/presets/hair.js +6 -6
- package/dist/graph/presets/metal.js +8 -8
- package/dist/graph/presets/stockings.d.ts.map +1 -1
- package/dist/graph/presets/stockings.js +4 -11
- package/dist/graph/presets/unlit.d.ts.map +1 -1
- package/dist/graph/presets/unlit.js +9 -13
- package/dist/graph/registry.d.ts.map +1 -1
- package/dist/graph/registry.js +128 -157
- package/dist/graph/render-class.d.ts +5 -2
- package/dist/graph/render-class.d.ts.map +1 -1
- package/dist/graph/slots.d.ts.map +1 -1
- package/dist/graph/slots.js +5 -1
- package/dist/model.d.ts +14 -1
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +27 -1
- package/dist/pmx-loader.d.ts +4 -0
- package/dist/pmx-loader.d.ts.map +1 -1
- package/dist/pmx-loader.js +11 -2
- package/dist/shaders/anchor-table.d.ts +11 -0
- package/dist/shaders/anchor-table.d.ts.map +1 -1
- package/dist/shaders/anchor-table.js +9 -3
- package/dist/shaders/directives.d.ts +42 -5
- package/dist/shaders/directives.d.ts.map +1 -1
- package/dist/shaders/directives.js +51 -4
- package/dist/shaders/lights.d.ts +11 -7
- package/dist/shaders/lights.d.ts.map +1 -1
- package/dist/shaders/lights.js +315 -271
- package/dist/shaders/materials/common.d.ts.map +1 -1
- package/dist/shaders/materials/common.js +26 -3
- package/dist/shaders/materials/nodes.d.ts +1 -1
- package/dist/shaders/materials/nodes.d.ts.map +1 -1
- package/dist/shaders/materials/nodes.js +191 -271
- package/dist/shaders/passes/composite.d.ts +1 -1
- package/dist/shaders/passes/composite.d.ts.map +1 -1
- package/dist/shaders/passes/composite.js +3 -5
- package/dist/shaders/passes/ground.js +1 -1
- package/dist/shaders/passes/particles.d.ts.map +1 -1
- package/dist/shaders/passes/particles.js +9 -3
- package/dist/shaders/passes/probe.d.ts +45 -0
- package/dist/shaders/passes/probe.d.ts.map +1 -0
- package/dist/shaders/passes/probe.js +230 -0
- package/dist/shaders/passes/scene-contract.d.ts +13 -0
- package/dist/shaders/passes/scene-contract.d.ts.map +1 -1
- package/dist/shaders/passes/scene-contract.js +4 -0
- package/dist/shaders/scene-light-api.d.ts.map +1 -1
- package/dist/shaders/scene-light-api.js +1 -0
- package/dist/unity/globals.d.ts +7 -0
- package/dist/unity/globals.d.ts.map +1 -1
- package/dist/unity/globals.js +4 -3
- package/dist/unity/host.d.ts +3 -0
- package/dist/unity/host.d.ts.map +1 -1
- package/dist/unity/host.js +41 -7
- package/dist/unity/looks.d.ts +42 -0
- package/dist/unity/looks.d.ts.map +1 -1
- package/dist/unity/looks.js +131 -4
- package/dist/unity/stage.d.ts +17 -0
- package/dist/unity/stage.d.ts.map +1 -1
- package/dist/unity/stage.js +22 -5
- package/package.json +1 -1
- package/src/engine.ts +949 -215
- package/src/graph/compile.ts +4 -0
- package/src/graph/presets/body.ts +26 -24
- package/src/graph/presets/cloth_rough.ts +8 -8
- package/src/graph/presets/cloth_smooth.ts +8 -8
- package/src/graph/presets/default.ts +4 -4
- package/src/graph/presets/eye.ts +10 -10
- package/src/graph/presets/face.ts +28 -26
- package/src/graph/presets/hair.ts +6 -6
- package/src/graph/presets/metal.ts +8 -8
- package/src/graph/presets/stockings.ts +4 -11
- package/src/graph/presets/unlit.ts +9 -13
- package/src/graph/registry.ts +133 -158
- package/src/graph/render-class.ts +5 -2
- package/src/graph/slots.ts +5 -1
- package/src/model.ts +33 -1
- package/src/pmx-loader.ts +11 -2
- package/src/shaders/anchor-table.ts +15 -3
- package/src/shaders/directives.ts +88 -6
- package/src/shaders/lights.ts +464 -415
- package/src/shaders/materials/common.ts +26 -3
- package/src/shaders/materials/nodes.ts +191 -271
- package/src/shaders/passes/composite.ts +3 -5
- package/src/shaders/passes/ground.ts +1 -1
- package/src/shaders/passes/particles.ts +9 -3
- package/src/shaders/passes/probe.ts +240 -0
- package/src/shaders/passes/scene-contract.ts +17 -0
- package/src/shaders/scene-light-api.ts +1 -0
- package/src/unity/globals.ts +7 -3
- package/src/unity/host.ts +36 -6
- package/src/unity/looks.ts +161 -7
- package/src/unity/stage.ts +28 -5
- package/dist/physics-debug.d.ts +0 -30
- package/dist/physics-debug.d.ts.map +0 -1
- package/dist/physics-debug.js +0 -526
- package/dist/shaders/agx-lut.d.ts +0 -11
- package/dist/shaders/agx-lut.d.ts.map +0 -1
- package/dist/shaders/agx-lut.js +0 -29
- package/dist/shaders/dfg_lut.d.ts +0 -3
- package/dist/shaders/dfg_lut.d.ts.map +0 -1
- package/dist/shaders/dfg_lut.js +0 -129
- package/dist/shaders/ltc_mag_lut.d.ts +0 -3
- package/dist/shaders/ltc_mag_lut.d.ts.map +0 -1
- package/dist/shaders/ltc_mag_lut.js +0 -1033
- package/dist/shaders/materials/body.d.ts +0 -2
- package/dist/shaders/materials/body.d.ts.map +0 -1
- package/dist/shaders/materials/body.js +0 -95
- package/dist/shaders/materials/cloth_rough.d.ts +0 -2
- package/dist/shaders/materials/cloth_rough.d.ts.map +0 -1
- package/dist/shaders/materials/cloth_rough.js +0 -69
- package/dist/shaders/materials/cloth_smooth.d.ts +0 -2
- package/dist/shaders/materials/cloth_smooth.d.ts.map +0 -1
- package/dist/shaders/materials/cloth_smooth.js +0 -61
- package/dist/shaders/materials/default.d.ts +0 -2
- package/dist/shaders/materials/default.d.ts.map +0 -1
- package/dist/shaders/materials/default.js +0 -43
- package/dist/shaders/materials/eye.d.ts +0 -2
- package/dist/shaders/materials/eye.d.ts.map +0 -1
- package/dist/shaders/materials/eye.js +0 -60
- package/dist/shaders/materials/face.d.ts +0 -2
- package/dist/shaders/materials/face.d.ts.map +0 -1
- package/dist/shaders/materials/face.js +0 -95
- package/dist/shaders/materials/hair.d.ts +0 -2
- package/dist/shaders/materials/hair.d.ts.map +0 -1
- package/dist/shaders/materials/hair.js +0 -90
- package/dist/shaders/materials/metal.d.ts +0 -2
- package/dist/shaders/materials/metal.d.ts.map +0 -1
- package/dist/shaders/materials/metal.js +0 -77
- package/dist/shaders/materials/mmd_classic.d.ts +0 -2
- package/dist/shaders/materials/mmd_classic.d.ts.map +0 -1
- package/dist/shaders/materials/mmd_classic.js +0 -66
- package/dist/shaders/materials/stockings.d.ts +0 -2
- package/dist/shaders/materials/stockings.d.ts.map +0 -1
- package/dist/shaders/materials/stockings.js +0 -122
- package/dist/shaders/passes/physics-debug.d.ts +0 -2
- package/dist/shaders/passes/physics-debug.d.ts.map +0 -1
- package/dist/shaders/passes/physics-debug.js +0 -69
- package/src/shaders/dfg_lut.ts +0 -131
- package/src/shaders/ltc_mag_lut.ts +0 -1035
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/graph/compile.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAA0B,WAAW,EAAE,MAAM,UAAU,CAAA;AAI7F,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAExE,MAAM,MAAM,cAAc,GAAG;IAC3B;8EAC0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;6DACyD;IACzD,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C;0EACsE;IACtE,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,wEAAwE;IACxE,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,yFAAyF;AACzF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,OAAO,CAAA;IACX,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB,CAAA;AAcD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,CAuBpE;AAID,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,GAAE,cAAmB,GAAG,UAAU,EAAE,CA4GzF;AAID,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,GAAE,cAAmB,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/graph/compile.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAA0B,WAAW,EAAE,MAAM,UAAU,CAAA;AAI7F,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAExE,MAAM,MAAM,cAAc,GAAG;IAC3B;8EAC0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;6DACyD;IACzD,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9C;0EACsE;IACtE,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,wEAAwE;IACxE,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED,yFAAyF;AACzF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,OAAO,CAAA;IACX,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB,CAAA;AAcD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,CAuBpE;AAID,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,GAAE,cAAmB,GAAG,UAAU,EAAE,CA4GzF;AAID,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,GAAE,cAAmB,GAAG,aAAa,CA4KzF"}
|
package/dist/graph/compile.js
CHANGED
|
@@ -291,6 +291,11 @@ export function compileGraph(graph, opts = {}) {
|
|
|
291
291
|
args.roughness.literal === 0.5 &&
|
|
292
292
|
args.distortion.literal === 0)
|
|
293
293
|
return `tex_noise_d2(${raw.vector}, ${raw.scale})`;
|
|
294
|
+
// Lit is the SURFACE only when it is the graph's output: then it shades the
|
|
295
|
+
// lamps' diffuse by its own albedo, as URP does. Mixed in as a layer (a
|
|
296
|
+
// toon look's gloss), the lamps stay the epilogue's, on the whole material.
|
|
297
|
+
if (node.type === "lit" && node.id !== out.node)
|
|
298
|
+
return spec(node).emit(raw).replace(/, true\)$/, ", false)");
|
|
294
299
|
return spec(node).emit(raw);
|
|
295
300
|
};
|
|
296
301
|
const lines = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/graph/presets/body.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/graph/presets/body.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,UAAU,EAAE,WAyGxB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// M_Body as a ShaderGraph — port of shaders/materials/body.ts (仿深空之眼 "M_Body").
|
|
2
|
-
// Toon + warm rim + rim1/rim2 stack mixed 50/50 against a
|
|
2
|
+
// Toon + warm rim + rim1/rim2 stack mixed 50/50 against a Lit layer with
|
|
3
3
|
// noise-bumped normal. The hand port's local ramp_ease is ramp_cardinal (identical
|
|
4
4
|
// smoothstep form); the Mapping node's zero loc/rot folds to a scale multiply.
|
|
5
5
|
export const BODY_GRAPH = {
|
|
@@ -15,13 +15,13 @@ export const BODY_GRAPH = {
|
|
|
15
15
|
{ id: "mat_diffuse", type: "material_diffuse" },
|
|
16
16
|
{ id: "tex_base", type: "mix/multiply", inputs: { fac: 1.0 } },
|
|
17
17
|
{ id: "geo", type: "geometry" },
|
|
18
|
-
{ id: "str", type: "
|
|
18
|
+
{ id: "str", type: "lambert" },
|
|
19
19
|
{ id: "toon", type: "ramp_cardinal", inputs: { pos0: 0.2466, pos1: 0.3466 } },
|
|
20
20
|
{ id: "shadow_tint", type: "hue_sat", inputs: { hue: 0.5, saturation: 2.0, value: 0.3499999940395355, fac: 1.0 } },
|
|
21
21
|
{ id: "lit_tint", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.5, value: 1.0, fac: 1.0 } },
|
|
22
22
|
{ id: "toon_color", type: "mix/blend" },
|
|
23
23
|
{ id: "bc", type: "bright_contrast", inputs: { bright: 0.1, contrast: 0.2 } },
|
|
24
|
-
{ id: "emission3", type: "
|
|
24
|
+
{ id: "emission3", type: "vector_math/scale", inputs: { scale: 4.0 } },
|
|
25
25
|
{ id: "warm_add", type: "math/add", inputs: { b: 0.5 } },
|
|
26
26
|
{ id: "warm_clamp", type: "math/clamp01" },
|
|
27
27
|
{
|
|
@@ -34,17 +34,18 @@ export const BODY_GRAPH = {
|
|
|
34
34
|
color1: [0.6677, 0.5024, 0.5126, 1.0],
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
-
{ id: "warm_emit", type: "
|
|
37
|
+
{ id: "warm_emit", type: "vector_math/scale", inputs: { scale: 0.30000001192092896 } },
|
|
38
38
|
{ id: "rim1_fres", type: "fresnel", inputs: { ior: 2.0 } },
|
|
39
39
|
{ id: "rim1_lw", type: "layer_weight/facing", inputs: { blend: 0.24000005424022675 } },
|
|
40
40
|
{ id: "rim1_str", type: "math/multiply" },
|
|
41
|
-
{ id: "rim1", type: "
|
|
41
|
+
{ id: "rim1", type: "vector_math/scale" },
|
|
42
|
+
{ id: "rim1_color", type: "rgb", inputs: { color: [0.984157919883728, 0.6110184788703918, 0.5736401677131653] } },
|
|
42
43
|
{ id: "rim2_lw", type: "layer_weight/facing", inputs: { blend: 0.20000000298023224 } },
|
|
43
44
|
{ id: "rim2_pow", type: "math/power", inputs: { b: 1.4300000667572021 } },
|
|
44
45
|
{ id: "rim2_ramp", type: "ramp_cardinal", inputs: { pos0: 0.0, pos1: 0.5052 } },
|
|
45
|
-
{ id: "rim2_mix", type: "
|
|
46
|
-
{ id: "npr_add1", type: "
|
|
47
|
-
{ id: "npr_stack", type: "
|
|
46
|
+
{ id: "rim2_mix", type: "mix/blend", inputs: { b: [1.0, 0.4303792119026184, 0.3315804898738861] } },
|
|
47
|
+
{ id: "npr_add1", type: "vector_math/add" },
|
|
48
|
+
{ id: "npr_stack", type: "vector_math/add" },
|
|
48
49
|
{ id: "map", type: "mapping", inputs: { scl: [1.0, 1.0, 1.5] } },
|
|
49
50
|
{ id: "noise", type: "tex_noise", inputs: { scale: 1.0 } },
|
|
50
51
|
{ id: "noise_ramp", type: "ramp_linear", inputs: { pos0: 0.0, pos1: 1.0 } },
|
|
@@ -54,14 +55,14 @@ export const BODY_GRAPH = {
|
|
|
54
55
|
type: "mix/blend",
|
|
55
56
|
inputs: { b: [0.6831911206245422, 0.19474034011363983, 0.13732507824897766] },
|
|
56
57
|
},
|
|
57
|
-
{ id: "p_emit", type: "
|
|
58
|
+
{ id: "p_emit", type: "vector_math/scale", inputs: { scale: 0.2 } },
|
|
58
59
|
{
|
|
59
60
|
id: "principled",
|
|
60
|
-
type: "
|
|
61
|
-
inputs: { metallic: 0.0,
|
|
61
|
+
type: "lit",
|
|
62
|
+
inputs: { metallic: 0.0, smoothness: 0.4523 },
|
|
62
63
|
},
|
|
63
|
-
{ id: "p_sum", type: "
|
|
64
|
-
{ id: "mix_shader_001", type: "
|
|
64
|
+
{ id: "p_sum", type: "vector_math/add" },
|
|
65
|
+
{ id: "mix_shader_001", type: "mix/blend", inputs: { fac: 0.5 } },
|
|
65
66
|
],
|
|
66
67
|
links: [
|
|
67
68
|
{ from: { node: "str", socket: "value" }, to: { node: "toon", socket: "fac" } },
|
|
@@ -73,22 +74,23 @@ export const BODY_GRAPH = {
|
|
|
73
74
|
{ from: { node: "shadow_tint", socket: "color" }, to: { node: "toon_color", socket: "a" } },
|
|
74
75
|
{ from: { node: "lit_tint", socket: "color" }, to: { node: "toon_color", socket: "b" } },
|
|
75
76
|
{ from: { node: "toon_color", socket: "color" }, to: { node: "bc", socket: "color" } },
|
|
76
|
-
{ from: { node: "bc", socket: "color" }, to: { node: "emission3", socket: "
|
|
77
|
+
{ from: { node: "bc", socket: "color" }, to: { node: "emission3", socket: "a" } },
|
|
77
78
|
{ from: { node: "toon", socket: "fac_out" }, to: { node: "warm_add", socket: "a" } },
|
|
78
79
|
{ from: { node: "warm_add", socket: "value" }, to: { node: "warm_clamp", socket: "a" } },
|
|
79
80
|
{ from: { node: "warm_clamp", socket: "value" }, to: { node: "warm_ramp", socket: "fac" } },
|
|
80
|
-
{ from: { node: "warm_ramp", socket: "color" }, to: { node: "warm_emit", socket: "
|
|
81
|
+
{ from: { node: "warm_ramp", socket: "color" }, to: { node: "warm_emit", socket: "a" } },
|
|
81
82
|
{ from: { node: "rim1_fres", socket: "value" }, to: { node: "rim1_str", socket: "a" } },
|
|
82
83
|
{ from: { node: "rim1_lw", socket: "value" }, to: { node: "rim1_str", socket: "b" } },
|
|
83
|
-
{ from: { node: "rim1_str", socket: "value" }, to: { node: "rim1", socket: "
|
|
84
|
+
{ from: { node: "rim1_str", socket: "value" }, to: { node: "rim1", socket: "scale" } },
|
|
84
85
|
{ from: { node: "rim2_lw", socket: "value" }, to: { node: "rim2_pow", socket: "a" } },
|
|
85
86
|
{ from: { node: "rim2_pow", socket: "value" }, to: { node: "rim2_ramp", socket: "fac" } },
|
|
86
|
-
{ from: { node: "emission3", socket: "
|
|
87
|
+
{ from: { node: "emission3", socket: "vector" }, to: { node: "rim2_mix", socket: "a" } },
|
|
87
88
|
{ from: { node: "rim2_ramp", socket: "fac_out" }, to: { node: "rim2_mix", socket: "fac" } },
|
|
88
|
-
{ from: { node: "
|
|
89
|
+
{ from: { node: "rim1_color", socket: "color" }, to: { node: "rim1", socket: "a" } },
|
|
90
|
+
{ from: { node: "rim1", socket: "vector" }, to: { node: "npr_add1", socket: "a" } },
|
|
89
91
|
{ from: { node: "rim2_mix", socket: "color" }, to: { node: "npr_add1", socket: "b" } },
|
|
90
|
-
{ from: { node: "npr_add1", socket: "
|
|
91
|
-
{ from: { node: "warm_emit", socket: "
|
|
92
|
+
{ from: { node: "npr_add1", socket: "vector" }, to: { node: "npr_stack", socket: "a" } },
|
|
93
|
+
{ from: { node: "warm_emit", socket: "vector" }, to: { node: "npr_stack", socket: "b" } },
|
|
92
94
|
{ from: { node: "geo", socket: "rest_pos" }, to: { node: "map", socket: "vector" } },
|
|
93
95
|
{ from: { node: "map", socket: "vector" }, to: { node: "noise", socket: "vector" } },
|
|
94
96
|
{ from: { node: "noise", socket: "value" }, to: { node: "noise_ramp", socket: "fac" } },
|
|
@@ -96,13 +98,13 @@ export const BODY_GRAPH = {
|
|
|
96
98
|
{ from: { node: "geo", socket: "normal" }, to: { node: "bump", socket: "normal" } },
|
|
97
99
|
{ from: { node: "noise_ramp", socket: "fac_out" }, to: { node: "principled_base", socket: "fac" } },
|
|
98
100
|
{ from: { node: "bc", socket: "color" }, to: { node: "principled_base", socket: "a" } },
|
|
99
|
-
{ from: { node: "bc", socket: "color" }, to: { node: "p_emit", socket: "
|
|
101
|
+
{ from: { node: "bc", socket: "color" }, to: { node: "p_emit", socket: "a" } },
|
|
100
102
|
{ from: { node: "principled_base", socket: "color" }, to: { node: "principled", socket: "base_color" } },
|
|
101
103
|
{ from: { node: "bump", socket: "vector" }, to: { node: "principled", socket: "normal" } },
|
|
102
104
|
{ from: { node: "principled", socket: "color" }, to: { node: "p_sum", socket: "a" } },
|
|
103
|
-
{ from: { node: "p_emit", socket: "
|
|
104
|
-
{ from: { node: "npr_stack", socket: "
|
|
105
|
-
{ from: { node: "p_sum", socket: "
|
|
105
|
+
{ from: { node: "p_emit", socket: "vector" }, to: { node: "p_sum", socket: "b" } },
|
|
106
|
+
{ from: { node: "npr_stack", socket: "vector" }, to: { node: "mix_shader_001", socket: "a" } },
|
|
107
|
+
{ from: { node: "p_sum", socket: "vector" }, to: { node: "mix_shader_001", socket: "b" } },
|
|
106
108
|
],
|
|
107
109
|
output: { node: "mix_shader_001", socket: "color" },
|
|
108
110
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// M_Rough_Cloth as a ShaderGraph — port of shaders/materials/cloth_rough.ts.
|
|
2
2
|
// NPR graph identical to M_Smooth_Cloth, but the noise bump subtree IS live on
|
|
3
|
-
//
|
|
3
|
+
// the Lit layer's normal (weave bump in rest space), and it is MATTE where smooth cloth
|
|
4
4
|
// shines: roughness 1, specular 0.25, and a wider toon band (0.20-0.45) so the
|
|
5
5
|
// light rolls off cotton instead of cutting. Smooth keeps 0.5 / 0.8 / 0.25-0.35.
|
|
6
6
|
// The tex_noise node hits the detail=2 peephole → tex_noise_d2.
|
|
@@ -17,7 +17,7 @@ export const CLOTH_ROUGH_GRAPH = {
|
|
|
17
17
|
{ id: "mat_diffuse", type: "material_diffuse" },
|
|
18
18
|
{ id: "tex_base", type: "mix/multiply", inputs: { fac: 1.0 } },
|
|
19
19
|
{ id: "geo", type: "geometry" },
|
|
20
|
-
{ id: "str", type: "
|
|
20
|
+
{ id: "str", type: "lambert" },
|
|
21
21
|
{ id: "ramp_008", type: "ramp_cardinal", inputs: { pos0: 0.2, pos1: 0.45 } },
|
|
22
22
|
{ id: "mix04_fac", type: "math/multiply", inputs: { b: 0.5 } },
|
|
23
23
|
{ id: "dark_tex", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 0.19999998807907104, fac: 1.0 } },
|
|
@@ -27,17 +27,17 @@ export const CLOTH_ROUGH_GRAPH = {
|
|
|
27
27
|
{ id: "mix_003", type: "mix/blend" },
|
|
28
28
|
{ id: "hue_004", type: "hue_sat", inputs: { hue: 0.5, saturation: 0.800000011920929, value: 2.0, fac: 1.0 } },
|
|
29
29
|
{ id: "npr_overlay", type: "mix/overlay", inputs: { fac: 1.0 } },
|
|
30
|
-
{ id: "npr_emit", type: "
|
|
30
|
+
{ id: "npr_emit", type: "vector_math/scale", inputs: { scale: 18.200000762939453 } },
|
|
31
31
|
{ id: "noise", type: "tex_noise", inputs: { scale: 17.7 } },
|
|
32
32
|
{ id: "noise_ramp", type: "ramp_linear", inputs: { pos0: 0.0, pos1: 1.0 } },
|
|
33
33
|
{ id: "bump", type: "bump", inputs: { strength: 1.0 } },
|
|
34
34
|
{ id: "principled_base", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 0.800000011920929, fac: 1.0 } },
|
|
35
35
|
{
|
|
36
36
|
id: "principled",
|
|
37
|
-
type: "
|
|
38
|
-
inputs: { metallic: 0.0,
|
|
37
|
+
type: "lit",
|
|
38
|
+
inputs: { metallic: 0.0, smoothness: 0.0, specular: 0.25 },
|
|
39
39
|
},
|
|
40
|
-
{ id: "mix_shader_001", type: "
|
|
40
|
+
{ id: "mix_shader_001", type: "mix/blend", inputs: { fac: 0.8999999761581421 } },
|
|
41
41
|
],
|
|
42
42
|
links: [
|
|
43
43
|
{ from: { node: "str", socket: "value" }, to: { node: "ramp_008", socket: "fac" } },
|
|
@@ -56,7 +56,7 @@ export const CLOTH_ROUGH_GRAPH = {
|
|
|
56
56
|
{ from: { node: "mix_003", socket: "color" }, to: { node: "hue_004", socket: "color" } },
|
|
57
57
|
{ from: { node: "mix_003", socket: "color" }, to: { node: "npr_overlay", socket: "a" } },
|
|
58
58
|
{ from: { node: "hue_004", socket: "color" }, to: { node: "npr_overlay", socket: "b" } },
|
|
59
|
-
{ from: { node: "npr_overlay", socket: "color" }, to: { node: "npr_emit", socket: "
|
|
59
|
+
{ from: { node: "npr_overlay", socket: "color" }, to: { node: "npr_emit", socket: "a" } },
|
|
60
60
|
{ from: { node: "geo", socket: "rest_pos" }, to: { node: "noise", socket: "vector" } },
|
|
61
61
|
{ from: { node: "noise", socket: "value" }, to: { node: "noise_ramp", socket: "fac" } },
|
|
62
62
|
{ from: { node: "noise_ramp", socket: "fac_out" }, to: { node: "bump", socket: "height" } },
|
|
@@ -64,7 +64,7 @@ export const CLOTH_ROUGH_GRAPH = {
|
|
|
64
64
|
{ from: { node: "tex_base", socket: "color" }, to: { node: "principled_base", socket: "color" } },
|
|
65
65
|
{ from: { node: "principled_base", socket: "color" }, to: { node: "principled", socket: "base_color" } },
|
|
66
66
|
{ from: { node: "bump", socket: "vector" }, to: { node: "principled", socket: "normal" } },
|
|
67
|
-
{ from: { node: "npr_emit", socket: "
|
|
67
|
+
{ from: { node: "npr_emit", socket: "vector" }, to: { node: "mix_shader_001", socket: "a" } },
|
|
68
68
|
{ from: { node: "principled", socket: "color" }, to: { node: "mix_shader_001", socket: "b" } },
|
|
69
69
|
],
|
|
70
70
|
output: { node: "mix_shader_001", socket: "color" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// M_Smooth_Cloth as a ShaderGraph — port of shaders/materials/cloth_smooth.ts.
|
|
2
2
|
// NPR toon + bevel + overlay-boosted emission (18.2×) mixed 10/90 against a plain
|
|
3
|
-
//
|
|
3
|
+
// Lit layer. The Blender graph's dead bump subtree is omitted (as in the hand
|
|
4
4
|
// port). hue_sat nodes with hue=0.5 compile to the hue_sat_id specialization.
|
|
5
5
|
export const CLOTH_SMOOTH_GRAPH = {
|
|
6
6
|
version: 1,
|
|
@@ -15,7 +15,7 @@ export const CLOTH_SMOOTH_GRAPH = {
|
|
|
15
15
|
{ id: "mat_diffuse", type: "material_diffuse" },
|
|
16
16
|
{ id: "tex_base", type: "mix/multiply", inputs: { fac: 1.0 } },
|
|
17
17
|
{ id: "geo", type: "geometry" },
|
|
18
|
-
{ id: "str", type: "
|
|
18
|
+
{ id: "str", type: "lambert" },
|
|
19
19
|
{ id: "ramp_008", type: "ramp_cardinal", inputs: { pos0: 0.2466, pos1: 0.3466 } },
|
|
20
20
|
{ id: "mix04_fac", type: "math/multiply", inputs: { b: 0.5 } },
|
|
21
21
|
{ id: "dark_tex", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 0.19999998807907104, fac: 1.0 } },
|
|
@@ -25,14 +25,14 @@ export const CLOTH_SMOOTH_GRAPH = {
|
|
|
25
25
|
{ id: "mix_003", type: "mix/blend" },
|
|
26
26
|
{ id: "hue_004", type: "hue_sat", inputs: { hue: 0.5, saturation: 0.800000011920929, value: 2.0, fac: 1.0 } },
|
|
27
27
|
{ id: "npr_overlay", type: "mix/overlay", inputs: { fac: 1.0 } },
|
|
28
|
-
{ id: "npr_emit", type: "
|
|
28
|
+
{ id: "npr_emit", type: "vector_math/scale", inputs: { scale: 18.200000762939453 } },
|
|
29
29
|
{ id: "principled_base", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 0.800000011920929, fac: 1.0 } },
|
|
30
30
|
{
|
|
31
31
|
id: "principled",
|
|
32
|
-
type: "
|
|
33
|
-
inputs: { metallic: 0.0,
|
|
32
|
+
type: "lit",
|
|
33
|
+
inputs: { metallic: 0.0, smoothness: 0.2929, specular: 0.8 },
|
|
34
34
|
},
|
|
35
|
-
{ id: "mix_shader_001", type: "
|
|
35
|
+
{ id: "mix_shader_001", type: "mix/blend", inputs: { fac: 0.8999999761581421 } },
|
|
36
36
|
],
|
|
37
37
|
links: [
|
|
38
38
|
{ from: { node: "str", socket: "value" }, to: { node: "ramp_008", socket: "fac" } },
|
|
@@ -51,10 +51,10 @@ export const CLOTH_SMOOTH_GRAPH = {
|
|
|
51
51
|
{ from: { node: "mix_003", socket: "color" }, to: { node: "hue_004", socket: "color" } },
|
|
52
52
|
{ from: { node: "mix_003", socket: "color" }, to: { node: "npr_overlay", socket: "a" } },
|
|
53
53
|
{ from: { node: "hue_004", socket: "color" }, to: { node: "npr_overlay", socket: "b" } },
|
|
54
|
-
{ from: { node: "npr_overlay", socket: "color" }, to: { node: "npr_emit", socket: "
|
|
54
|
+
{ from: { node: "npr_overlay", socket: "color" }, to: { node: "npr_emit", socket: "a" } },
|
|
55
55
|
{ from: { node: "tex_base", socket: "color" }, to: { node: "principled_base", socket: "color" } },
|
|
56
56
|
{ from: { node: "principled_base", socket: "color" }, to: { node: "principled", socket: "base_color" } },
|
|
57
|
-
{ from: { node: "npr_emit", socket: "
|
|
57
|
+
{ from: { node: "npr_emit", socket: "vector" }, to: { node: "mix_shader_001", socket: "a" } },
|
|
58
58
|
{ from: { node: "principled", socket: "color" }, to: { node: "mix_shader_001", socket: "b" } },
|
|
59
59
|
],
|
|
60
60
|
output: { node: "mix_shader_001", socket: "color" },
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Default material — the neutral base used two ways: the ungrouped fallback (a material
|
|
2
2
|
// in no style group renders this) and the blank-canvas starter the editor's "New graph"
|
|
3
3
|
// begins from, so the two always agree. MMD-correct PBSDF base: diffuse texture × the
|
|
4
|
-
// PMX material diffuse color →
|
|
4
|
+
// PMX material diffuse color → Lit (metallic 0, smoothness 0.29).
|
|
5
5
|
// The material-color multiply is what keeps untextured/solid-color materials from
|
|
6
6
|
// rendering white (they carry their color in material.diffuse, not a texture).
|
|
7
7
|
export const DEFAULT_GRAPH = {
|
|
8
8
|
version: 1,
|
|
9
|
-
name: "
|
|
9
|
+
name: "Lit",
|
|
10
10
|
tags: ["default"],
|
|
11
11
|
nodes: [
|
|
12
12
|
{ id: "tex", type: "texture" },
|
|
@@ -14,8 +14,8 @@ export const DEFAULT_GRAPH = {
|
|
|
14
14
|
{ id: "base", type: "mix/multiply", inputs: { fac: 1.0 } }, // texture × material diffuse
|
|
15
15
|
{
|
|
16
16
|
id: "principled",
|
|
17
|
-
type: "
|
|
18
|
-
inputs: { metallic: 0.0,
|
|
17
|
+
type: "lit",
|
|
18
|
+
inputs: { metallic: 0.0, smoothness: 0.2929 },
|
|
19
19
|
},
|
|
20
20
|
],
|
|
21
21
|
links: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Eye as a ShaderGraph — port of shaders/materials/eye.ts. The published preset
|
|
2
2
|
// author's instruction: "keep eyes in the default nodegraph, add emission 1.5".
|
|
3
|
-
// So it's the default
|
|
4
|
-
// 1.5× (
|
|
3
|
+
// So it's the default Lit plus an emission of the diffuse texture at
|
|
4
|
+
// 1.5× (the emission, decomposed as a separate scale +
|
|
5
5
|
// Add Shader — the emission feeds bloom pre-tonemap).
|
|
6
6
|
//
|
|
7
7
|
// The rear-view gate and the see-through stencil stamp are slot-owned (built-in eye
|
|
@@ -20,11 +20,11 @@ export const EYE_GRAPH = {
|
|
|
20
20
|
{ id: "tex_base", type: "mix/multiply", inputs: { fac: 1.0 } },
|
|
21
21
|
{
|
|
22
22
|
id: "principled",
|
|
23
|
-
type: "
|
|
24
|
-
inputs: { metallic: 0.0,
|
|
23
|
+
type: "lit",
|
|
24
|
+
inputs: { metallic: 0.0, smoothness: 0.2929 },
|
|
25
25
|
},
|
|
26
|
-
{ id: "emission", type: "
|
|
27
|
-
{ id: "add", type: "
|
|
26
|
+
{ id: "emission", type: "vector_math/scale", inputs: { scale: 1.5 } },
|
|
27
|
+
{ id: "add", type: "vector_math/add" },
|
|
28
28
|
// The iris glow follows the key round her head: full (1.5) lit from the
|
|
29
29
|
// front, easing to 0.2 of it lit from behind - a fixed 1.5 left the eyes
|
|
30
30
|
// bright white in a backlit face. head_basis.forward · L, half-Lambert,
|
|
@@ -41,9 +41,9 @@ export const EYE_GRAPH = {
|
|
|
41
41
|
{ from: { node: "tex", socket: "color" }, to: { node: "tex_base", socket: "a" } },
|
|
42
42
|
{ from: { node: "mat_diffuse", socket: "color" }, to: { node: "tex_base", socket: "b" } },
|
|
43
43
|
{ from: { node: "tex_base", socket: "color" }, to: { node: "principled", socket: "base_color" } },
|
|
44
|
-
{ from: { node: "tex_base", socket: "color" }, to: { node: "emission", socket: "
|
|
44
|
+
{ from: { node: "tex_base", socket: "color" }, to: { node: "emission", socket: "a" } },
|
|
45
45
|
{ from: { node: "principled", socket: "color" }, to: { node: "add", socket: "a" } },
|
|
46
|
-
{ from: { node: "emission", socket: "
|
|
46
|
+
{ from: { node: "emission", socket: "vector" }, to: { node: "add", socket: "b" } },
|
|
47
47
|
{ from: { node: "eye_hb", socket: "forward" }, to: { node: "eye_fl", socket: "a" } },
|
|
48
48
|
{ from: { node: "eye_lt", socket: "direction" }, to: { node: "eye_fl", socket: "b" } },
|
|
49
49
|
{ from: { node: "eye_fl", socket: "value" }, to: { node: "eye_half", socket: "a" } },
|
|
@@ -51,7 +51,7 @@ export const EYE_GRAPH = {
|
|
|
51
51
|
{ from: { node: "eye_lt", socket: "shadow" }, to: { node: "eye_sh", socket: "b" } },
|
|
52
52
|
{ from: { node: "eye_sh", socket: "value" }, to: { node: "eye_lvl", socket: "value" } },
|
|
53
53
|
{ from: { node: "eye_lvl", socket: "value" }, to: { node: "eye_str", socket: "a" } },
|
|
54
|
-
{ from: { node: "eye_str", socket: "value" }, to: { node: "emission", socket: "
|
|
54
|
+
{ from: { node: "eye_str", socket: "value" }, to: { node: "emission", socket: "scale" } },
|
|
55
55
|
],
|
|
56
|
-
output: { node: "add", socket: "
|
|
56
|
+
output: { node: "add", socket: "vector" },
|
|
57
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"face.d.ts","sourceRoot":"","sources":["../../../src/graph/presets/face.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"face.d.ts","sourceRoot":"","sources":["../../../src/graph/presets/face.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,UAAU,EAAE,WAuIxB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// M_Face as a ShaderGraph — port of shaders/materials/face.ts (仿深空之眼 "M_Face").
|
|
2
2
|
// Toon + warm rim + dual fresnel rim + BT.601 bright-tex gate, mixed 50/50 against a
|
|
3
|
-
//
|
|
3
|
+
// a Lit layer with noise bump. Structurally close to body, but: the toon uses the
|
|
4
4
|
// edge-AA ramp, hue tints are 0.46 (full hue_sat, not the 0.5 _id specialization),
|
|
5
5
|
// rim2 is the hair-style fresnel×layer_weight_fresnel rim, and there's an extra
|
|
6
6
|
// near-white texture gate that emits (freckle/highlight paint). Plain material — no
|
|
@@ -19,13 +19,13 @@ export const FACE_GRAPH = {
|
|
|
19
19
|
{ id: "tex_base", type: "mix/multiply", inputs: { fac: 1.0 } },
|
|
20
20
|
{ id: "geo", type: "geometry" },
|
|
21
21
|
// ── toon shading ──
|
|
22
|
-
{ id: "str", type: "
|
|
22
|
+
{ id: "str", type: "lambert" },
|
|
23
23
|
{ id: "toon", type: "ramp_cardinal", inputs: { pos0: 0.2466, pos1: 0.3466 } },
|
|
24
24
|
{ id: "shadow_tint", type: "hue_sat", inputs: { hue: 0.46000000834465027, saturation: 2.0, value: 0.3499999940395355, fac: 1.0 } },
|
|
25
25
|
{ id: "lit_tint", type: "hue_sat", inputs: { hue: 0.46000000834465027, saturation: 1.600000023841858, value: 1.5, fac: 1.0 } },
|
|
26
26
|
{ id: "toon_color", type: "mix/blend" },
|
|
27
27
|
{ id: "bc", type: "bright_contrast", inputs: { bright: 0.1, contrast: 0.2 } },
|
|
28
|
-
{ id: "emission3", type: "
|
|
28
|
+
{ id: "emission3", type: "vector_math/scale", inputs: { scale: 2.5 } },
|
|
29
29
|
// ── warm rim (toon*0.5+0.5 → cardinal ramp) ──
|
|
30
30
|
{ id: "warm_mul", type: "math/multiply", inputs: { b: 0.5 } },
|
|
31
31
|
{ id: "warm_add", type: "math/add", inputs: { b: 0.5 } },
|
|
@@ -40,39 +40,40 @@ export const FACE_GRAPH = {
|
|
|
40
40
|
color1: [0.6677, 0.5024, 0.5126, 1.0],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
-
{ id: "warm_emit", type: "
|
|
43
|
+
{ id: "warm_emit", type: "vector_math/scale", inputs: { scale: 0.30000001192092896 } },
|
|
44
44
|
// ── rim1: fresnel × facing ──
|
|
45
45
|
{ id: "rim1_fres", type: "fresnel", inputs: { ior: 2.0 } },
|
|
46
46
|
{ id: "rim1_lw", type: "layer_weight/facing", inputs: { blend: 0.24 } },
|
|
47
47
|
{ id: "rim1_str", type: "math/multiply" },
|
|
48
|
-
{ id: "rim1", type: "
|
|
48
|
+
{ id: "rim1", type: "vector_math/scale" },
|
|
49
|
+
{ id: "rim1_color", type: "rgb", inputs: { color: [0.984157919883728, 0.6110184788703918, 0.5736401677131653] } },
|
|
49
50
|
// ── rim2: fresnel × fresnel-layer-weight, powered (hair-style) ──
|
|
50
51
|
{ id: "rim2_fres", type: "fresnel", inputs: { ior: 1.45 } },
|
|
51
52
|
{ id: "rim2_lw", type: "layer_weight/fresnel", inputs: { blend: 0.61 } },
|
|
52
53
|
{ id: "rim2_raw", type: "math/multiply" },
|
|
53
54
|
{ id: "rim2_pow", type: "math/power", inputs: { b: 0.6300000548362732 } },
|
|
54
|
-
{ id: "rim2_mix", type: "
|
|
55
|
+
{ id: "rim2_mix", type: "mix/blend", inputs: { b: [1.0, 0.4684903025627136, 0.3698573112487793] } },
|
|
55
56
|
// ── near-white texture gate emission ──
|
|
56
57
|
{ id: "gate", type: "math/greater_than", inputs: { b: 0.9300000071525574 } },
|
|
57
58
|
{ id: "gate_scale", type: "math/multiply", inputs: { b: 3.0 } },
|
|
58
59
|
// ── npr stack (rim1 + rim2 + bright_emit + warm) ──
|
|
59
|
-
{ id: "npr_add1", type: "
|
|
60
|
-
{ id: "npr_add2", type: "
|
|
61
|
-
{ id: "npr_stack", type: "
|
|
60
|
+
{ id: "npr_add1", type: "vector_math/add" },
|
|
61
|
+
{ id: "npr_add2", type: "vector_math/add" },
|
|
62
|
+
{ id: "npr_stack", type: "vector_math/add" },
|
|
62
63
|
// ── principled with noise bump ──
|
|
63
64
|
{ id: "map", type: "mapping", inputs: { scl: [1.0, 1.0, 1.5] } },
|
|
64
65
|
{ id: "noise", type: "tex_noise", inputs: { scale: 1.0 } },
|
|
65
66
|
{ id: "noise_ramp", type: "ramp_linear", inputs: { pos0: 0.0, pos1: 1.0 } },
|
|
66
67
|
{ id: "bump", type: "bump", inputs: { strength: 0.324644535779953 } },
|
|
67
68
|
{ id: "principled_base", type: "mix/blend", inputs: { b: [0.6832, 0.1947, 0.1373] } },
|
|
68
|
-
{ id: "p_emit", type: "
|
|
69
|
+
{ id: "p_emit", type: "vector_math/scale", inputs: { scale: 0.2 } },
|
|
69
70
|
{
|
|
70
71
|
id: "principled",
|
|
71
|
-
type: "
|
|
72
|
-
inputs: { metallic: 0.0,
|
|
72
|
+
type: "lit",
|
|
73
|
+
inputs: { metallic: 0.0, smoothness: 0.4523 },
|
|
73
74
|
},
|
|
74
|
-
{ id: "p_sum", type: "
|
|
75
|
-
{ id: "mix_shader_001", type: "
|
|
75
|
+
{ id: "p_sum", type: "vector_math/add" },
|
|
76
|
+
{ id: "mix_shader_001", type: "mix/blend", inputs: { fac: 0.5 } },
|
|
76
77
|
],
|
|
77
78
|
links: [
|
|
78
79
|
// toon
|
|
@@ -85,33 +86,34 @@ export const FACE_GRAPH = {
|
|
|
85
86
|
{ from: { node: "shadow_tint", socket: "color" }, to: { node: "toon_color", socket: "a" } },
|
|
86
87
|
{ from: { node: "lit_tint", socket: "color" }, to: { node: "toon_color", socket: "b" } },
|
|
87
88
|
{ from: { node: "toon_color", socket: "color" }, to: { node: "bc", socket: "color" } },
|
|
88
|
-
{ from: { node: "bc", socket: "color" }, to: { node: "emission3", socket: "
|
|
89
|
+
{ from: { node: "bc", socket: "color" }, to: { node: "emission3", socket: "a" } },
|
|
89
90
|
// warm rim
|
|
90
91
|
{ from: { node: "toon", socket: "fac_out" }, to: { node: "warm_mul", socket: "a" } },
|
|
91
92
|
{ from: { node: "warm_mul", socket: "value" }, to: { node: "warm_add", socket: "a" } },
|
|
92
93
|
{ from: { node: "warm_add", socket: "value" }, to: { node: "warm_clamp", socket: "a" } },
|
|
93
94
|
{ from: { node: "warm_clamp", socket: "value" }, to: { node: "warm_ramp", socket: "fac" } },
|
|
94
|
-
{ from: { node: "warm_ramp", socket: "color" }, to: { node: "warm_emit", socket: "
|
|
95
|
+
{ from: { node: "warm_ramp", socket: "color" }, to: { node: "warm_emit", socket: "a" } },
|
|
95
96
|
// rim1
|
|
96
97
|
{ from: { node: "rim1_fres", socket: "value" }, to: { node: "rim1_str", socket: "a" } },
|
|
97
98
|
{ from: { node: "rim1_lw", socket: "value" }, to: { node: "rim1_str", socket: "b" } },
|
|
98
|
-
{ from: { node: "rim1_str", socket: "value" }, to: { node: "rim1", socket: "
|
|
99
|
+
{ from: { node: "rim1_str", socket: "value" }, to: { node: "rim1", socket: "scale" } },
|
|
99
100
|
// rim2
|
|
100
101
|
{ from: { node: "rim2_fres", socket: "value" }, to: { node: "rim2_raw", socket: "a" } },
|
|
101
102
|
{ from: { node: "rim2_lw", socket: "value" }, to: { node: "rim2_raw", socket: "b" } },
|
|
102
103
|
{ from: { node: "rim2_raw", socket: "value" }, to: { node: "rim2_pow", socket: "a" } },
|
|
103
|
-
{ from: { node: "emission3", socket: "
|
|
104
|
+
{ from: { node: "emission3", socket: "vector" }, to: { node: "rim2_mix", socket: "a" } },
|
|
104
105
|
{ from: { node: "rim2_pow", socket: "value" }, to: { node: "rim2_mix", socket: "fac" } },
|
|
105
106
|
// gate
|
|
106
107
|
{ from: { node: "tex", socket: "color" }, to: { node: "gate", socket: "a" } },
|
|
107
108
|
{ from: { node: "gate", socket: "value" }, to: { node: "gate_scale", socket: "a" } },
|
|
108
109
|
// npr stack
|
|
109
|
-
{ from: { node: "
|
|
110
|
+
{ from: { node: "rim1_color", socket: "color" }, to: { node: "rim1", socket: "a" } },
|
|
111
|
+
{ from: { node: "rim1", socket: "vector" }, to: { node: "npr_add1", socket: "a" } },
|
|
110
112
|
{ from: { node: "rim2_mix", socket: "color" }, to: { node: "npr_add1", socket: "b" } },
|
|
111
|
-
{ from: { node: "npr_add1", socket: "
|
|
113
|
+
{ from: { node: "npr_add1", socket: "vector" }, to: { node: "npr_add2", socket: "a" } },
|
|
112
114
|
{ from: { node: "gate_scale", socket: "value" }, to: { node: "npr_add2", socket: "b" } },
|
|
113
|
-
{ from: { node: "npr_add2", socket: "
|
|
114
|
-
{ from: { node: "warm_emit", socket: "
|
|
115
|
+
{ from: { node: "npr_add2", socket: "vector" }, to: { node: "npr_stack", socket: "a" } },
|
|
116
|
+
{ from: { node: "warm_emit", socket: "vector" }, to: { node: "npr_stack", socket: "b" } },
|
|
115
117
|
// principled + noise bump
|
|
116
118
|
{ from: { node: "geo", socket: "rest_pos" }, to: { node: "map", socket: "vector" } },
|
|
117
119
|
{ from: { node: "map", socket: "vector" }, to: { node: "noise", socket: "vector" } },
|
|
@@ -120,14 +122,14 @@ export const FACE_GRAPH = {
|
|
|
120
122
|
{ from: { node: "geo", socket: "normal" }, to: { node: "bump", socket: "normal" } },
|
|
121
123
|
{ from: { node: "noise_ramp", socket: "fac_out" }, to: { node: "principled_base", socket: "fac" } },
|
|
122
124
|
{ from: { node: "bc", socket: "color" }, to: { node: "principled_base", socket: "a" } },
|
|
123
|
-
{ from: { node: "bc", socket: "color" }, to: { node: "p_emit", socket: "
|
|
125
|
+
{ from: { node: "bc", socket: "color" }, to: { node: "p_emit", socket: "a" } },
|
|
124
126
|
{ from: { node: "principled_base", socket: "color" }, to: { node: "principled", socket: "base_color" } },
|
|
125
127
|
{ from: { node: "bump", socket: "vector" }, to: { node: "principled", socket: "normal" } },
|
|
126
128
|
{ from: { node: "principled", socket: "color" }, to: { node: "p_sum", socket: "a" } },
|
|
127
|
-
{ from: { node: "p_emit", socket: "
|
|
129
|
+
{ from: { node: "p_emit", socket: "vector" }, to: { node: "p_sum", socket: "b" } },
|
|
128
130
|
// final mix
|
|
129
|
-
{ from: { node: "npr_stack", socket: "
|
|
130
|
-
{ from: { node: "p_sum", socket: "
|
|
131
|
+
{ from: { node: "npr_stack", socket: "vector" }, to: { node: "mix_shader_001", socket: "a" } },
|
|
132
|
+
{ from: { node: "p_sum", socket: "vector" }, to: { node: "mix_shader_001", socket: "b" } },
|
|
131
133
|
],
|
|
132
134
|
output: { node: "mix_shader_001", socket: "color" },
|
|
133
135
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// (golden test #1 — see tests/graph.test.mjs).
|
|
5
5
|
//
|
|
6
6
|
// Inherited authoring decisions from the hand port: the noise→bump subtree on
|
|
7
|
-
//
|
|
7
|
+
// the Lit layer's normal is omitted (imperceptible at 0.2 mix weight), and Blender's bevel
|
|
8
8
|
// node is approximated by saturate(normal.y) — Blender Z-up ⇒ engine Y-up.
|
|
9
9
|
//
|
|
10
10
|
// The object is pure JSON (no functions/undefined) — JSON.stringify round-trips it,
|
|
@@ -25,7 +25,7 @@ export const HAIR_GRAPH = {
|
|
|
25
25
|
{ id: "hs_shadow", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.2, value: 0.5, fac: 1.0 } },
|
|
26
26
|
{ id: "hs_002", type: "hue_sat", inputs: { hue: 0.48, saturation: 1.2, value: 0.7, fac: 1.0 } },
|
|
27
27
|
{ id: "hs_001", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.5, value: 1.0, fac: 1.0 } },
|
|
28
|
-
{ id: "str", type: "
|
|
28
|
+
{ id: "str", type: "lambert" },
|
|
29
29
|
{ id: "ramp_008", type: "ramp_cardinal", inputs: { pos0: 0.2466, color0: [0, 0, 0, 1], pos1: 0.3466, color1: [1, 1, 1, 1] } },
|
|
30
30
|
{ id: "mix_004", type: "mix/blend" },
|
|
31
31
|
{ id: "bc", type: "bright_contrast", inputs: { bright: 0.1, contrast: 0.2 } },
|
|
@@ -38,7 +38,7 @@ export const HAIR_GRAPH = {
|
|
|
38
38
|
{ id: "rim_pow", type: "math/power", inputs: { b: 0.6300000548362732 } },
|
|
39
39
|
{
|
|
40
40
|
id: "mix_shader_002",
|
|
41
|
-
type: "
|
|
41
|
+
type: "mix/blend",
|
|
42
42
|
inputs: { b: [0.1673291176557541, 0.1673291176557541, 0.1673291176557541] },
|
|
43
43
|
},
|
|
44
44
|
{ id: "gate", type: "math/greater_than", inputs: { b: 0.15000000596046448 } },
|
|
@@ -46,10 +46,10 @@ export const HAIR_GRAPH = {
|
|
|
46
46
|
{ id: "npr_add", type: "mix/add_emit" },
|
|
47
47
|
{
|
|
48
48
|
id: "principled",
|
|
49
|
-
type: "
|
|
50
|
-
inputs: { metallic: 0.0,
|
|
49
|
+
type: "lit",
|
|
50
|
+
inputs: { metallic: 0.0, smoothness: 0.4523, specular: 1.0 },
|
|
51
51
|
},
|
|
52
|
-
{ id: "mix_shader_001", type: "
|
|
52
|
+
{ id: "mix_shader_001", type: "mix/blend", inputs: { fac: 0.2 } },
|
|
53
53
|
],
|
|
54
54
|
links: [
|
|
55
55
|
{ from: { node: "tex", socket: "color" }, to: { node: "tex_base", socket: "a" } },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// M_Metal as a ShaderGraph — port of shaders/materials/metal.ts.
|
|
2
|
-
//
|
|
2
|
+
// a metallic Lit (metallic 1, smoothness 0.45) with a
|
|
3
3
|
// reflection-coord voronoi driving base color (metallic sparkle), plus an NPR
|
|
4
4
|
// toon/overlay emission stack mixed at Fac=0.6967. The voronoi Color→ramp Fac
|
|
5
5
|
// link goes through Blender's implicit BT.601 conversion (color_to_value).
|
|
@@ -17,14 +17,14 @@ export const METAL_GRAPH = {
|
|
|
17
17
|
{ id: "tex_base", type: "mix/multiply", inputs: { fac: 1.0 } },
|
|
18
18
|
{ id: "geo", type: "geometry" },
|
|
19
19
|
{ id: "tex_tint", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 0.800000011920929, fac: 1.0 } },
|
|
20
|
-
{ id: "str", type: "
|
|
20
|
+
{ id: "str", type: "lambert" },
|
|
21
21
|
{ id: "ramp_008", type: "ramp_cardinal", inputs: { pos0: 0.2466, pos1: 0.3466 } },
|
|
22
22
|
{ id: "mix04_fac", type: "math/multiply", inputs: { b: 0.5 } },
|
|
23
23
|
{ id: "dark_tex", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 0.19999998807907104, fac: 1.0 } },
|
|
24
24
|
{ id: "mix_004", type: "mix/blend" },
|
|
25
25
|
{ id: "hue_004", type: "hue_sat", inputs: { hue: 0.5, saturation: 1.0, value: 2.0, fac: 1.0 } },
|
|
26
26
|
{ id: "npr_overlay", type: "mix/overlay", inputs: { fac: 1.0 } },
|
|
27
|
-
{ id: "npr_emit", type: "
|
|
27
|
+
{ id: "npr_emit", type: "vector_math/scale", inputs: { scale: 8.100000381469727 } },
|
|
28
28
|
{ id: "voro_cross", type: "vect_cross", inputs: { b: [0, 1, 0] } },
|
|
29
29
|
{ id: "voro", type: "tex_voronoi/color", inputs: { scale: 4.3 } },
|
|
30
30
|
{ id: "voro_ramp", type: "ramp_linear", inputs: { pos0: 0.0, pos1: 1.0 } },
|
|
@@ -32,10 +32,10 @@ export const METAL_GRAPH = {
|
|
|
32
32
|
{ id: "albedo", type: "mix/blend" },
|
|
33
33
|
{
|
|
34
34
|
id: "principled",
|
|
35
|
-
type: "
|
|
36
|
-
inputs: { metallic: 1.0,
|
|
35
|
+
type: "lit",
|
|
36
|
+
inputs: { metallic: 1.0, smoothness: 0.4523, specular: 1.0 },
|
|
37
37
|
},
|
|
38
|
-
{ id: "mix_shader_001", type: "
|
|
38
|
+
{ id: "mix_shader_001", type: "mix/blend", inputs: { fac: 0.6967 } },
|
|
39
39
|
],
|
|
40
40
|
links: [
|
|
41
41
|
{ from: { node: "tex", socket: "color" }, to: { node: "tex_base", socket: "a" } },
|
|
@@ -50,7 +50,7 @@ export const METAL_GRAPH = {
|
|
|
50
50
|
{ from: { node: "mix_004", socket: "color" }, to: { node: "hue_004", socket: "color" } },
|
|
51
51
|
{ from: { node: "mix_004", socket: "color" }, to: { node: "npr_overlay", socket: "a" } },
|
|
52
52
|
{ from: { node: "hue_004", socket: "color" }, to: { node: "npr_overlay", socket: "b" } },
|
|
53
|
-
{ from: { node: "npr_overlay", socket: "color" }, to: { node: "npr_emit", socket: "
|
|
53
|
+
{ from: { node: "npr_overlay", socket: "color" }, to: { node: "npr_emit", socket: "a" } },
|
|
54
54
|
{ from: { node: "geo", socket: "reflection" }, to: { node: "voro_cross", socket: "a" } },
|
|
55
55
|
{ from: { node: "voro_cross", socket: "vector" }, to: { node: "voro", socket: "vector" } },
|
|
56
56
|
{ from: { node: "voro", socket: "color" }, to: { node: "voro_ramp", socket: "fac" } },
|
|
@@ -59,7 +59,7 @@ export const METAL_GRAPH = {
|
|
|
59
59
|
{ from: { node: "voro_ramp", socket: "fac_out" }, to: { node: "albedo", socket: "a" } },
|
|
60
60
|
{ from: { node: "hue_006", socket: "color" }, to: { node: "albedo", socket: "b" } },
|
|
61
61
|
{ from: { node: "albedo", socket: "color" }, to: { node: "principled", socket: "base_color" } },
|
|
62
|
-
{ from: { node: "npr_emit", socket: "
|
|
62
|
+
{ from: { node: "npr_emit", socket: "vector" }, to: { node: "mix_shader_001", socket: "a" } },
|
|
63
63
|
{ from: { node: "principled", socket: "color" }, to: { node: "mix_shader_001", socket: "b" } },
|
|
64
64
|
],
|
|
65
65
|
output: { node: "mix_shader_001", socket: "color" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stockings.d.ts","sourceRoot":"","sources":["../../../src/graph/presets/stockings.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"stockings.d.ts","sourceRoot":"","sources":["../../../src/graph/presets/stockings.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,eAAO,MAAM,eAAe,EAAE,WA+C7B,CAAA"}
|