reze-engine 0.69.3 → 0.69.5
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 +23 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +90 -7
- package/dist/graph/slots.d.ts.map +1 -1
- package/dist/graph/slots.js +6 -2
- package/dist/model.d.ts +7 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +68 -23
- package/dist/shaders/directives.d.ts +14 -0
- package/dist/shaders/directives.d.ts.map +1 -1
- package/dist/shaders/directives.js +12 -0
- package/dist/shaders/materials/common.d.ts +10 -1
- package/dist/shaders/materials/common.d.ts.map +1 -1
- package/dist/shaders/materials/common.js +24 -1
- package/dist/shaders/passes/depth-prepass.d.ts.map +1 -1
- package/dist/shaders/passes/depth-prepass.js +4 -2
- package/dist/shaders/passes/morph.d.ts +1 -1
- package/dist/shaders/passes/morph.d.ts.map +1 -1
- package/dist/shaders/passes/morph.js +26 -20
- package/dist/shaders/passes/outline.d.ts.map +1 -1
- package/dist/shaders/passes/outline.js +7 -1
- package/dist/shaders/passes/shadow.d.ts +1 -1
- package/dist/shaders/passes/shadow.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/engine.ts +95 -7
- package/src/graph/slots.ts +6 -2
- package/src/model.ts +60 -20
- package/src/shaders/directives.ts +21 -0
- package/src/shaders/materials/common.ts +25 -1
- package/src/shaders/passes/depth-prepass.ts +4 -2
- package/src/shaders/passes/morph.ts +26 -20
- package/src/shaders/passes/outline.ts +7 -1
package/dist/model.js
CHANGED
|
@@ -692,7 +692,9 @@ export class Model {
|
|
|
692
692
|
}
|
|
693
693
|
/** A PMX additional UV channel (1–4) as loaded, four floats a vertex — or
|
|
694
694
|
* null when the file has fewer. Its morphs (types 4–7) are in getMorphing(),
|
|
695
|
-
* with uvOffsets; the engine applies neither, a native look reads both.
|
|
695
|
+
* with uvOffsets; the engine applies neither, a native look reads both. The
|
|
696
|
+
* base UV's own morphs (type 3) the engine does apply, with the vertex
|
|
697
|
+
* morphs. */
|
|
696
698
|
getAdditionalUv(channel) {
|
|
697
699
|
return this.additionalUvs[channel - 1] ?? null;
|
|
698
700
|
}
|
|
@@ -1416,6 +1418,30 @@ export class Model {
|
|
|
1416
1418
|
curMaxVert = vIdx;
|
|
1417
1419
|
}
|
|
1418
1420
|
}
|
|
1421
|
+
// UV morphs: the base UV moved, the same way a vertex morph moves the
|
|
1422
|
+
// position, into the same touched range.
|
|
1423
|
+
for (let morphIdx = 0; morphIdx < morphCount; morphIdx++) {
|
|
1424
|
+
const effectiveWeight = effectiveWeights[morphIdx];
|
|
1425
|
+
if (effectiveWeight < 0.0001)
|
|
1426
|
+
continue;
|
|
1427
|
+
const morph = this.morphing.morphs[morphIdx];
|
|
1428
|
+
if (morph.type !== 3 || !morph.uvOffsets)
|
|
1429
|
+
continue;
|
|
1430
|
+
for (const o of morph.uvOffsets) {
|
|
1431
|
+
const vIdx = o.vertexIndex;
|
|
1432
|
+
if (vIdx < 0 || vIdx >= vertexCount)
|
|
1433
|
+
continue;
|
|
1434
|
+
if (Math.abs(o.offset[0]) < 0.0001 && Math.abs(o.offset[1]) < 0.0001)
|
|
1435
|
+
continue;
|
|
1436
|
+
const vertexIdx = vIdx * VERTEX_STRIDE;
|
|
1437
|
+
this.vertexData[vertexIdx + 6] += o.offset[0] * effectiveWeight;
|
|
1438
|
+
this.vertexData[vertexIdx + 7] += o.offset[1] * effectiveWeight;
|
|
1439
|
+
if (curMinVert < 0 || vIdx < curMinVert)
|
|
1440
|
+
curMinVert = vIdx;
|
|
1441
|
+
if (vIdx > curMaxVert)
|
|
1442
|
+
curMaxVert = vIdx;
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1419
1445
|
let dirtyMin = curMinVert;
|
|
1420
1446
|
let dirtyMax = curMaxVert;
|
|
1421
1447
|
if (this.morphPrevMaxVert >= 0) {
|
|
@@ -1466,14 +1492,20 @@ export class Model {
|
|
|
1466
1492
|
(Math.abs(o.positionOffset[0]) >= EPS ||
|
|
1467
1493
|
Math.abs(o.positionOffset[1]) >= EPS ||
|
|
1468
1494
|
Math.abs(o.positionOffset[2]) >= EPS);
|
|
1495
|
+
// A UV morph (type 3) moves the base UV: a scrolling or spinning texture,
|
|
1496
|
+
// a pattern swapped by sliding to another part of the sheet.
|
|
1497
|
+
const isLiveUv = (o) => o.vertexIndex >= 0 && o.vertexIndex < V && (Math.abs(o.offset[0]) >= EPS || Math.abs(o.offset[1]) >= EPS);
|
|
1469
1498
|
const counts = new Uint32Array(V);
|
|
1470
1499
|
for (let m = 0; m < M; m++) {
|
|
1471
1500
|
const morph = morphs[m];
|
|
1472
|
-
if (morph.type
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1501
|
+
if (morph.type === 1)
|
|
1502
|
+
for (const o of morph.vertexOffsets)
|
|
1503
|
+
if (isLive(o))
|
|
1504
|
+
counts[o.vertexIndex]++;
|
|
1505
|
+
if (morph.type === 3)
|
|
1506
|
+
for (const o of morph.uvOffsets ?? [])
|
|
1507
|
+
if (isLiveUv(o))
|
|
1508
|
+
counts[o.vertexIndex]++;
|
|
1477
1509
|
}
|
|
1478
1510
|
const rowStart = new Uint32Array(V + 1);
|
|
1479
1511
|
let acc = 0;
|
|
@@ -1486,31 +1518,44 @@ export class Model {
|
|
|
1486
1518
|
if (E === 0)
|
|
1487
1519
|
return null;
|
|
1488
1520
|
const colMorph = new Uint32Array(E);
|
|
1489
|
-
const colOffset = new Float32Array(E *
|
|
1521
|
+
const colOffset = new Float32Array(E * 5);
|
|
1490
1522
|
const fill = new Uint32Array(V);
|
|
1491
1523
|
for (let m = 0; m < M; m++) {
|
|
1492
1524
|
const morph = morphs[m];
|
|
1493
|
-
if (morph.type
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1525
|
+
if (morph.type === 1) {
|
|
1526
|
+
for (const o of morph.vertexOffsets) {
|
|
1527
|
+
if (!isLive(o))
|
|
1528
|
+
continue;
|
|
1529
|
+
const v = o.vertexIndex;
|
|
1530
|
+
const p = rowStart[v] + fill[v]++;
|
|
1531
|
+
colMorph[p] = m;
|
|
1532
|
+
colOffset[p * 5] = o.positionOffset[0];
|
|
1533
|
+
colOffset[p * 5 + 1] = o.positionOffset[1];
|
|
1534
|
+
colOffset[p * 5 + 2] = o.positionOffset[2];
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
else if (morph.type === 3) {
|
|
1538
|
+
for (const o of morph.uvOffsets ?? []) {
|
|
1539
|
+
if (!isLiveUv(o))
|
|
1540
|
+
continue;
|
|
1541
|
+
const v = o.vertexIndex;
|
|
1542
|
+
const p = rowStart[v] + fill[v]++;
|
|
1543
|
+
colMorph[p] = m;
|
|
1544
|
+
colOffset[p * 5 + 3] = o.offset[0];
|
|
1545
|
+
colOffset[p * 5 + 4] = o.offset[1];
|
|
1546
|
+
}
|
|
1504
1547
|
}
|
|
1505
1548
|
}
|
|
1506
|
-
const
|
|
1549
|
+
const base = new Float32Array(V * 5);
|
|
1507
1550
|
for (let v = 0; v < V; v++) {
|
|
1508
1551
|
const vi = v * VERTEX_STRIDE;
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1552
|
+
base[v * 5] = this.baseVertexData[vi];
|
|
1553
|
+
base[v * 5 + 1] = this.baseVertexData[vi + 1];
|
|
1554
|
+
base[v * 5 + 2] = this.baseVertexData[vi + 2];
|
|
1555
|
+
base[v * 5 + 3] = this.baseVertexData[vi + 6];
|
|
1556
|
+
base[v * 5 + 4] = this.baseVertexData[vi + 7];
|
|
1512
1557
|
}
|
|
1513
|
-
return {
|
|
1558
|
+
return { base, rowStart, colMorph, colOffset, morphCount: M, vertexCount: V, entryCount: E };
|
|
1514
1559
|
}
|
|
1515
1560
|
// Consume the pending morph vertex-upload range for the engine. Returns null when a
|
|
1516
1561
|
// full upload is needed (first time after load, or nothing tracked), else the inclusive
|
|
@@ -140,6 +140,20 @@ export type EffectDirectives = {
|
|
|
140
140
|
* the engine's STEPPED_DIALS.
|
|
141
141
|
*/
|
|
142
142
|
stepped: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* `#xray X Y WIDTH HEIGHT` — a see-through window held in front of the
|
|
145
|
+
* lens, as X-ray glasses are: a rectangle on the frame, four float dials in
|
|
146
|
+
* fractions of the frame — X and Y its offset from the frame's centre (Y
|
|
147
|
+
* up), WIDTH and HEIGHT its size. Behind it, the materials the host marks on the characters it is aimed
|
|
148
|
+
* at (setXrayMaterials — their clothes) are not drawn, so what is under them
|
|
149
|
+
* shows. Whole while the effect plays at all. Null without.
|
|
150
|
+
*/
|
|
151
|
+
xray: {
|
|
152
|
+
x: string;
|
|
153
|
+
y: string;
|
|
154
|
+
width: string;
|
|
155
|
+
height: string;
|
|
156
|
+
} | null;
|
|
143
157
|
/**
|
|
144
158
|
* How long ONE firing of this effect lasts, in seconds. 0 = undeclared.
|
|
145
159
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../../src/shaders/directives.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1F,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;IAC7E;;oBAEgB;IAChB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;IACjD,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;yEAEqE;IACrE,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,0EAA0E;IAC1E,UAAU,EAAE,CAAC,GAAG,CAAC,CAAA;IACjB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAA;IACtB,wEAAwE;IACxE;;;;iFAI6E;IAC7E,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;IAC9C;;;;kDAI8C;IAC9C,UAAU,EAAE,UAAU,GAAG,MAAM,CAAA;IAC/B;;4EAEwE;IACxE,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ;kFAC8E;IAC9E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAA;IACjB;;;;;;;4CAOwC;IACxC,MAAM,EAAE;QAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACjE;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;;;;OAOG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;
|
|
1
|
+
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../../src/shaders/directives.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1F,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhE;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;IAC7E;;oBAEgB;IAChB,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;IACjD,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,8CAA8C;IAC9C,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;yEAEqE;IACrE,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,0EAA0E;IAC1E,UAAU,EAAE,CAAC,GAAG,CAAC,CAAA;IACjB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAA;IACtB,wEAAwE;IACxE;;;;iFAI6E;IAC7E,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;IAC9C;;;;kDAI8C;IAC9C,UAAU,EAAE,UAAU,GAAG,MAAM,CAAA;IAC/B;;4EAEwE;IACxE,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ;kFAC8E;IAC9E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAA;IACjB;;;;;;;4CAOwC;IACxC,MAAM,EAAE;QAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACjE;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;;;;OAOG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;;;OAOG;IACH,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACpE;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAwBD;;;+BAG+B;AAC/B,eAAO,MAAM,cAAc,QAAmC,CAAA;AAG9D;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAA8B,CAAA;AAmCzD,MAAM,MAAM,eAAe,GAAG;IAAE,UAAU,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAEhF,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CA8T7D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD"}
|
|
@@ -44,6 +44,7 @@ const SPEC = {
|
|
|
44
44
|
dissolve: 0,
|
|
45
45
|
mirror: 0,
|
|
46
46
|
stepped: 0,
|
|
47
|
+
xray: 4,
|
|
47
48
|
duration: 1,
|
|
48
49
|
ground: "rest",
|
|
49
50
|
};
|
|
@@ -116,6 +117,7 @@ export function parseDirectives(wgsl) {
|
|
|
116
117
|
ground: null,
|
|
117
118
|
mirror: false,
|
|
118
119
|
stepped: false,
|
|
120
|
+
xray: null,
|
|
119
121
|
duration: 0,
|
|
120
122
|
};
|
|
121
123
|
const errors = [];
|
|
@@ -364,6 +366,9 @@ export function parseDirectives(wgsl) {
|
|
|
364
366
|
case "stepped":
|
|
365
367
|
d.stepped = true;
|
|
366
368
|
return;
|
|
369
|
+
case "xray":
|
|
370
|
+
d.xray = { x: args[0], y: args[1], width: args[2], height: args[3] };
|
|
371
|
+
return;
|
|
367
372
|
case "duration": {
|
|
368
373
|
// SECONDS, like every other time a directive states (see #dissolve).
|
|
369
374
|
// The document above works in frames and converts once; an author
|
|
@@ -394,6 +399,13 @@ export function parseDirectives(wgsl) {
|
|
|
394
399
|
}
|
|
395
400
|
}
|
|
396
401
|
});
|
|
402
|
+
// #xray names four dials, which have to be there and be numbers.
|
|
403
|
+
if (d.xray) {
|
|
404
|
+
for (const name of [d.xray.x, d.xray.y, d.xray.width, d.xray.height]) {
|
|
405
|
+
if (d.params.find((p) => p.name === name)?.kind !== "float")
|
|
406
|
+
errors.push(`#xray: ${name} has to be a #param float`);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
397
409
|
// Duplicates are an author editing one line and forgetting another; last-wins
|
|
398
410
|
// is a coin toss they never see resolved.
|
|
399
411
|
const names = new Set();
|
|
@@ -6,7 +6,16 @@
|
|
|
6
6
|
export declare const JELLY_VERTEX_WGSL = "\nfn _rzJellyTurn(q: vec2f, a: f32) -> vec2f {\n let c = cos(a);\n let s = sin(a);\n return vec2f(c * q.x - s * q.y, s * q.x + c * q.y);\n}\n\n/**\n * Where the jelly puts an iris vertex. The iris is the part of the eye the eye\n * bones carry, so it is moved as a whole, in bind space before skinning:\n * scaled about its centre (the CPU composes the blink's spring, the lid's\n * press and her motion's knock into one scale), turned and drifted a hair on\n * the spring, brought forward a hair, and rolled about the eye bone with a\n * closing expression \u2014 inside the white, which stays where it is. A highlight\n * layer (this draw's material is one of jelly[1].w's) takes the iris's move,\n * then its own scale, turn and tremble, before the roll. Vertices take it by their weight on the eye bones\n * (jelly[2].w, jelly[3].w), so nothing else on the face moves.\n */\nfn rzJellyVertex(p: vec3f, joints: vec4<u32>, nw: vec4f) -> vec3f {\n let j = objectLight.jelly;\n let ids = u32(j[1].w);\n let mid = u32(material.materialId);\n let hl = mid > 0u && (mid == (ids & 4095u) || mid == (ids >> 12u));\n var out = p;\n for (var e = 0u; e < 2u; e++) {\n let bone = j[2u + e].w;\n if (bone < 0.0) { continue; }\n let b = u32(bone);\n let w = dot(nw, select(vec4f(0.0), vec4f(1.0), joints == vec4<u32>(b)));\n if (w <= 0.0) { continue; }\n let c = j[e].xyz;\n // A rig that carries both eyes on one bone: each vertex follows its own side.\n if (j[2].w == j[3].w && e == 0u && distance(p.xy, j[1].xy) < distance(p.xy, j[0].xy)) { continue; }\n if (j[2].w == j[3].w && e == 1u && distance(p.xy, j[0].xy) <= distance(p.xy, j[1].xy)) { continue; }\n let t = j[4u + e];\n let m = j[6u + e];\n let h = j[10u + e];\n var q = _rzJellyTurn((p.xy - c.xy) * t.xy, t.z) + m.xy;\n // Forward is \u2212Z (MMD faces \u2212Z).\n var push = h.z;\n if (hl) {\n // Sliding over the iris's dome on its own, a highlight sheet a hair in\n // front of it would sink into it where the dome bulges more and the two\n // fight for depth; so it comes forward by as far as it slid \u2014 a slope of\n // one, steeper than the dome anywhere it draws.\n let before = q;\n q = _rzJellyTurn(q * h.xy, t.w) + m.zw;\n push += length(q - before);\n }\n var moved = vec3f(c.xy + q, p.z - push);\n let roll = j[8u + e];\n if (roll.w != 0.0) {\n let d = moved - roll.xyz;\n let rd = _rzJellyTurn(d.yz, roll.w);\n moved = roll.xyz + vec3f(d.x, rd.x, rd.y);\n }\n out = mix(p, moved, w);\n }\n return out;\n}\n";
|
|
7
7
|
/** A model's ObjectLight as WGSL declares it (see the layout below). One copy
|
|
8
8
|
* for every pass that binds it, so their layouts cannot drift. */
|
|
9
|
-
export declare const OBJECT_LIGHT_STRUCT_WGSL = "struct ObjectLight { layers: vec4u, ambient: vec4f, sh: array<vec4f, 9>, fill: vec4f, jelly: array<vec4f, 12>, bloom: vec4f }";
|
|
9
|
+
export declare const OBJECT_LIGHT_STRUCT_WGSL = "struct ObjectLight { layers: vec4u, ambient: vec4f, sh: array<vec4f, 9>, fill: vec4f, jelly: array<vec4f, 12>, bloom: vec4f, xray: array<vec4f, 4>, xrayMask: array<vec4u, 16> }";
|
|
10
|
+
/**
|
|
11
|
+
* The see-through window (#xray): a rectangle on the frame, in pixels —
|
|
12
|
+
* xray[0] is (left, top, right, bottom), xray[3].x is 1 while a window is open
|
|
13
|
+
* on this model — and which of the model's materials it cuts: a bit a
|
|
14
|
+
* material, by its 1-based draw index (materialId), up to 512. Tested against
|
|
15
|
+
* the fragment's own position, so it sits where the lens is, whatever moves
|
|
16
|
+
* behind it. Declared after the pass's own `objectLight` binding.
|
|
17
|
+
*/
|
|
18
|
+
export declare const XRAY_WGSL = "\nfn rz_xray_inside(fp: vec4f) -> bool {\n if (objectLight.xray[3].x < 0.5) { return false; }\n let r = objectLight.xray[0];\n return fp.x >= r.x && fp.y >= r.y && fp.x <= r.z && fp.y <= r.w;\n}\nfn rz_xray_cut(fp: vec4f, materialId: f32) -> bool {\n let i = u32(materialId);\n if (i >= 512u) { return false; }\n let word = objectLight.xrayMask[i / 128u][(i / 32u) % 4u];\n if (((word >> (i % 32u)) & 1u) == 0u) { return false; }\n return rz_xray_inside(fp);\n}\n";
|
|
10
19
|
export declare const COMMON_BINDINGS_WGSL: string;
|
|
11
20
|
export declare function commonFsOutWgsl(): string;
|
|
12
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/shaders/materials/common.ts"],"names":[],"mappings":"AA4BA;;;;uBAIuB;AACvB,eAAO,MAAM,iBAAiB,8iFA4D7B,CAAA;AAED;mEACmE;AACnE,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/shaders/materials/common.ts"],"names":[],"mappings":"AA4BA;;;;uBAIuB;AACvB,eAAO,MAAM,iBAAiB,8iFA4D7B,CAAA;AAED;mEACmE;AACnE,eAAO,MAAM,wBAAwB,qLAC+I,CAAA;AAEpL;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,4dAarB,CAAA;AAED,eAAO,MAAM,oBAAoB,QAkQhC,CAAC;AA2JF,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAGD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,orMAgHzB,CAAA;AAQD,eAAO,MAAM,4BAA4B,QAC6H,CAAA"}
|
|
@@ -91,7 +91,29 @@ fn rzJellyVertex(p: vec3f, joints: vec4<u32>, nw: vec4f) -> vec3f {
|
|
|
91
91
|
`;
|
|
92
92
|
/** A model's ObjectLight as WGSL declares it (see the layout below). One copy
|
|
93
93
|
* for every pass that binds it, so their layouts cannot drift. */
|
|
94
|
-
export const OBJECT_LIGHT_STRUCT_WGSL = "struct ObjectLight { layers: vec4u, ambient: vec4f, sh: array<vec4f, 9>, fill: vec4f, jelly: array<vec4f, 12>, bloom: vec4f }";
|
|
94
|
+
export const OBJECT_LIGHT_STRUCT_WGSL = "struct ObjectLight { layers: vec4u, ambient: vec4f, sh: array<vec4f, 9>, fill: vec4f, jelly: array<vec4f, 12>, bloom: vec4f, xray: array<vec4f, 4>, xrayMask: array<vec4u, 16> }";
|
|
95
|
+
/**
|
|
96
|
+
* The see-through window (#xray): a rectangle on the frame, in pixels —
|
|
97
|
+
* xray[0] is (left, top, right, bottom), xray[3].x is 1 while a window is open
|
|
98
|
+
* on this model — and which of the model's materials it cuts: a bit a
|
|
99
|
+
* material, by its 1-based draw index (materialId), up to 512. Tested against
|
|
100
|
+
* the fragment's own position, so it sits where the lens is, whatever moves
|
|
101
|
+
* behind it. Declared after the pass's own `objectLight` binding.
|
|
102
|
+
*/
|
|
103
|
+
export const XRAY_WGSL = /* wgsl */ `
|
|
104
|
+
fn rz_xray_inside(fp: vec4f) -> bool {
|
|
105
|
+
if (objectLight.xray[3].x < 0.5) { return false; }
|
|
106
|
+
let r = objectLight.xray[0];
|
|
107
|
+
return fp.x >= r.x && fp.y >= r.y && fp.x <= r.z && fp.y <= r.w;
|
|
108
|
+
}
|
|
109
|
+
fn rz_xray_cut(fp: vec4f, materialId: f32) -> bool {
|
|
110
|
+
let i = u32(materialId);
|
|
111
|
+
if (i >= 512u) { return false; }
|
|
112
|
+
let word = objectLight.xrayMask[i / 128u][(i / 32u) % 4u];
|
|
113
|
+
if (((word >> (i % 32u)) & 1u) == 0u) { return false; }
|
|
114
|
+
return rz_xray_inside(fp);
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
95
117
|
export const COMMON_BINDINGS_WGSL = /* wgsl */ `
|
|
96
118
|
|
|
97
119
|
struct CameraUniforms {
|
|
@@ -291,6 +313,7 @@ fn _rzCastShadow(wp: vec3f) -> f32 {
|
|
|
291
313
|
// outlines write.
|
|
292
314
|
${OBJECT_LIGHT_STRUCT_WGSL}
|
|
293
315
|
@group(1) @binding(1) var<uniform> objectLight: ObjectLight;
|
|
316
|
+
${XRAY_WGSL}
|
|
294
317
|
|
|
295
318
|
${JELLY_VERTEX_WGSL}
|
|
296
319
|
/** The light arriving at a surface of this object facing n: its own ambient
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depth-prepass.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/depth-prepass.ts"],"names":[],"mappings":"AAgCA,wBAAgB,2BAA2B,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"depth-prepass.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/depth-prepass.ts"],"names":[],"mappings":"AAgCA,wBAAgB,2BAA2B,IAAI,MAAM,CAgGpD"}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// one: the fragment outputs below depend on whether the device carries the id
|
|
27
27
|
// attachment, and that answer does not exist at import time. The constant could
|
|
28
28
|
// not have taken the outputs at all, which is most of why it did not have them.
|
|
29
|
-
import { DISSOLVE_WGSL, JELLY_VERTEX_WGSL } from "../materials/common";
|
|
29
|
+
import { DISSOLVE_WGSL, JELLY_VERTEX_WGSL, OBJECT_LIGHT_STRUCT_WGSL, XRAY_WGSL } from "../materials/common";
|
|
30
30
|
import { sceneFsOutWgsl, sceneIdPadWgsl } from "./scene-contract";
|
|
31
31
|
export function transparentDepthPrepassWgsl() {
|
|
32
32
|
return /* wgsl */ `
|
|
@@ -53,8 +53,9 @@ struct MaterialUniforms {
|
|
|
53
53
|
@group(1) @binding(0) var<storage, read> skinMats: array<mat4x4f>;
|
|
54
54
|
// The model's ObjectLight, for its jelly eyes: depth goes down where the colour
|
|
55
55
|
// pass will draw the iris.
|
|
56
|
-
|
|
56
|
+
${OBJECT_LIGHT_STRUCT_WGSL}
|
|
57
57
|
@group(1) @binding(1) var<uniform> objectLight: ObjectLight;
|
|
58
|
+
${XRAY_WGSL}
|
|
58
59
|
${JELLY_VERTEX_WGSL}
|
|
59
60
|
@group(2) @binding(0) var diffuseTexture: texture_2d<f32>;
|
|
60
61
|
@group(2) @binding(1) var<uniform> material: MaterialUniforms;
|
|
@@ -116,6 +117,7 @@ override CUTOFF: f32 = 0.5;
|
|
|
116
117
|
// her: you would see sky through her, which is the failure this line exists
|
|
117
118
|
// to prevent.
|
|
118
119
|
if (material.dissolve < 0.9995 && rz_dissolve_threshold(in.restPos) > material.dissolve) { discard; }
|
|
120
|
+
if (rz_xray_cut(in.position, material.materialId)) { discard; }
|
|
119
121
|
var out: PrepassOut;
|
|
120
122
|
out.color = vec4f(0.0);
|
|
121
123
|
out.mask = vec4f(0.0);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const MORPH_COMPUTE_WGSL = "\nstruct Params { vertexCount: u32 };\n\n@group(0) @binding(0) var<storage, read>
|
|
1
|
+
export declare const MORPH_COMPUTE_WGSL = "\nstruct Params { vertexCount: u32 };\n\n@group(0) @binding(0) var<storage, read> base: array<f32>; // vertexCount * 5 (xyz uv)\n@group(0) @binding(1) var<storage, read> rowStart: array<u32>; // vertexCount + 1\n@group(0) @binding(2) var<storage, read> colMorph: array<u32>; // entryCount\n@group(0) @binding(3) var<storage, read> colOffset: array<f32>; // entryCount * 5 (xyz uv)\n@group(0) @binding(4) var<storage, read> weights: array<f32>; // morphCount (effective)\n@group(0) @binding(5) var<storage, read_write> vtx: array<f32>; // vertexCount * 8\n@group(0) @binding(6) var<uniform> params: Params;\n\n@compute @workgroup_size(64)\nfn cs(@builtin(global_invocation_id) gid: vec3<u32>) {\n let v = gid.x;\n if (v >= params.vertexCount) { return; }\n\n let b5 = v * 5u;\n var px = base[b5];\n var py = base[b5 + 1u];\n var pz = base[b5 + 2u];\n var tu = base[b5 + 3u];\n var tv = base[b5 + 4u];\n\n let s = rowStart[v];\n let e = rowStart[v + 1u];\n for (var i = s; i < e; i = i + 1u) {\n let w = weights[colMorph[i]];\n if (w != 0.0) {\n let o5 = i * 5u;\n px = px + w * colOffset[o5];\n py = py + w * colOffset[o5 + 1u];\n pz = pz + w * colOffset[o5 + 2u];\n tu = tu + w * colOffset[o5 + 3u];\n tv = tv + w * colOffset[o5 + 4u];\n }\n }\n\n let vo = v * 8u; // VERTEX_STRIDE \u2014 the position and UV slots; the normal is left alone\n vtx[vo] = px;\n vtx[vo + 1u] = py;\n vtx[vo + 2u] = pz;\n vtx[vo + 6u] = tu;\n vtx[vo + 7u] = tv;\n}\n";
|
|
2
2
|
//# sourceMappingURL=morph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/morph.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/morph.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,kBAAkB,8/CA4C9B,CAAA"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
// GPU vertex-morph compute pass. Produces per-vertex morphed positions and writes
|
|
2
|
-
// straight into the interleaved vertex buffer (stride 8: pos3 + normal3 + uv2), so
|
|
3
|
-
// downstream pass (main / shadow / outline / pick) sees the morphed geometry with no
|
|
4
|
-
// change. Runs once per frame only when a model's morph weights changed.
|
|
1
|
+
// GPU vertex-morph compute pass. Produces per-vertex morphed positions and UVs and writes
|
|
2
|
+
// them straight into the interleaved vertex buffer (stride 8: pos3 + normal3 + uv2), so
|
|
3
|
+
// every downstream pass (main / shadow / outline / pick) sees the morphed geometry with no
|
|
4
|
+
// VS change. Runs once per frame only when a model's morph weights changed.
|
|
5
5
|
//
|
|
6
|
-
// Morph data is a CSR (compressed sparse row) inversion of the per-morph
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// order the CPU path
|
|
10
|
-
// weights on the CPU and uploaded in `weights`.
|
|
6
|
+
// Morph data is a CSR (compressed sparse row) inversion of the per-morph offset lists: for
|
|
7
|
+
// vertex v, its entries live in [rowStart[v], rowStart[v+1]); each entry is a morph index
|
|
8
|
+
// and five offsets — xyz for a vertex morph, uv for a UV morph (type 3) — ordered by
|
|
9
|
+
// ascending morph index, the same accumulation order the CPU path uses, so results match.
|
|
10
|
+
// Group morphs are resolved to effective weights on the CPU and uploaded in `weights`.
|
|
11
11
|
export const MORPH_COMPUTE_WGSL = /* wgsl */ `
|
|
12
12
|
struct Params { vertexCount: u32 };
|
|
13
13
|
|
|
14
|
-
@group(0) @binding(0) var<storage, read>
|
|
14
|
+
@group(0) @binding(0) var<storage, read> base: array<f32>; // vertexCount * 5 (xyz uv)
|
|
15
15
|
@group(0) @binding(1) var<storage, read> rowStart: array<u32>; // vertexCount + 1
|
|
16
16
|
@group(0) @binding(2) var<storage, read> colMorph: array<u32>; // entryCount
|
|
17
|
-
@group(0) @binding(3) var<storage, read> colOffset: array<f32>; // entryCount *
|
|
17
|
+
@group(0) @binding(3) var<storage, read> colOffset: array<f32>; // entryCount * 5 (xyz uv)
|
|
18
18
|
@group(0) @binding(4) var<storage, read> weights: array<f32>; // morphCount (effective)
|
|
19
19
|
@group(0) @binding(5) var<storage, read_write> vtx: array<f32>; // vertexCount * 8
|
|
20
20
|
@group(0) @binding(6) var<uniform> params: Params;
|
|
@@ -24,26 +24,32 @@ fn cs(@builtin(global_invocation_id) gid: vec3<u32>) {
|
|
|
24
24
|
let v = gid.x;
|
|
25
25
|
if (v >= params.vertexCount) { return; }
|
|
26
26
|
|
|
27
|
-
let
|
|
28
|
-
var px =
|
|
29
|
-
var py =
|
|
30
|
-
var pz =
|
|
27
|
+
let b5 = v * 5u;
|
|
28
|
+
var px = base[b5];
|
|
29
|
+
var py = base[b5 + 1u];
|
|
30
|
+
var pz = base[b5 + 2u];
|
|
31
|
+
var tu = base[b5 + 3u];
|
|
32
|
+
var tv = base[b5 + 4u];
|
|
31
33
|
|
|
32
34
|
let s = rowStart[v];
|
|
33
35
|
let e = rowStart[v + 1u];
|
|
34
36
|
for (var i = s; i < e; i = i + 1u) {
|
|
35
37
|
let w = weights[colMorph[i]];
|
|
36
38
|
if (w != 0.0) {
|
|
37
|
-
let
|
|
38
|
-
px = px + w * colOffset[
|
|
39
|
-
py = py + w * colOffset[
|
|
40
|
-
pz = pz + w * colOffset[
|
|
39
|
+
let o5 = i * 5u;
|
|
40
|
+
px = px + w * colOffset[o5];
|
|
41
|
+
py = py + w * colOffset[o5 + 1u];
|
|
42
|
+
pz = pz + w * colOffset[o5 + 2u];
|
|
43
|
+
tu = tu + w * colOffset[o5 + 3u];
|
|
44
|
+
tv = tv + w * colOffset[o5 + 4u];
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
let vo = v * 8u; // VERTEX_STRIDE —
|
|
48
|
+
let vo = v * 8u; // VERTEX_STRIDE — the position and UV slots; the normal is left alone
|
|
45
49
|
vtx[vo] = px;
|
|
46
50
|
vtx[vo + 1u] = py;
|
|
47
51
|
vtx[vo + 2u] = pz;
|
|
52
|
+
vtx[vo + 6u] = tu;
|
|
53
|
+
vtx[vo + 7u] = tv;
|
|
48
54
|
}
|
|
49
55
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/outline.ts"],"names":[],"mappings":"AAqBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAC5C;yCACyC;AACzC,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC;mEACmE;AACnE,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC;;yCAEyC;AACzC,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAC5C,eAAO,MAAM,wBAAwB,KAAK,CAAA;AAC1C,uCAAuC;AACvC,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,wBAAgB,iBAAiB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"outline.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/outline.ts"],"names":[],"mappings":"AAqBA;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAC5C;yCACyC;AACzC,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC;mEACmE;AACnE,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC;;yCAEyC;AACzC,eAAO,MAAM,0BAA0B,KAAK,CAAA;AAC5C,eAAO,MAAM,wBAAwB,KAAK,CAAA;AAC1C,uCAAuC;AACvC,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C,wBAAgB,iBAAiB,IAAI,MAAM,CA+P1C"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// fragment outputs depend on whether the device carries the id attachment, and
|
|
16
16
|
// a string baked at import cannot know what the device said.
|
|
17
17
|
import { sceneFsOutWgsl, sceneIdPadWgsl } from "./scene-contract";
|
|
18
|
-
import { DISSOLVE_WGSL, OBJECT_LIGHT_STRUCT_WGSL } from "../materials/common";
|
|
18
|
+
import { DISSOLVE_WGSL, OBJECT_LIGHT_STRUCT_WGSL, XRAY_WGSL } from "../materials/common";
|
|
19
19
|
/**
|
|
20
20
|
* Where `dissolve` sits in the outline's own uniform, in bytes.
|
|
21
21
|
*
|
|
@@ -75,6 +75,9 @@ struct MaterialUniforms {
|
|
|
75
75
|
* material's own alpha still holds — a line its author made sheer stays so. */
|
|
76
76
|
colorOverride: vec4f,
|
|
77
77
|
shadowColor: vec4f,
|
|
78
|
+
/** x: the material's 1-based draw index, as the colour pass's materialId —
|
|
79
|
+
* what lets the see-through window cut a garment's line and keep hers. */
|
|
80
|
+
xray: vec4f,
|
|
78
81
|
};
|
|
79
82
|
|
|
80
83
|
struct OutlineLight { direction: vec4f, color: vec4f, };
|
|
@@ -87,6 +90,7 @@ struct OutlineLights { ambientColor: vec4f, lights: array<OutlineLight, 4>, };
|
|
|
87
90
|
@group(1) @binding(0) var<storage, read> skinMats: array<mat4x4f>;
|
|
88
91
|
${OBJECT_LIGHT_STRUCT_WGSL}
|
|
89
92
|
@group(1) @binding(1) var<uniform> objectLight: ObjectLight;
|
|
93
|
+
${XRAY_WGSL}
|
|
90
94
|
@group(2) @binding(0) var<uniform> material: MaterialUniforms;
|
|
91
95
|
@group(2) @binding(1) var diffuseTexture: texture_2d<f32>;
|
|
92
96
|
/** A look's outline tint (ShaderGraph.outline.tint): one of its images, white
|
|
@@ -265,6 +269,8 @@ ${sceneFsOutWgsl({ name: "FSOut", aux: "mask" })}
|
|
|
265
269
|
// bind-pose position — three passes, one rule, or they disagree about which
|
|
266
270
|
// pieces are still there.
|
|
267
271
|
if (material.dissolve < 0.9995 && rz_dissolve_threshold(input.restPos) > material.dissolve) { discard; }
|
|
272
|
+
// The see-through window cuts the lines of what it cuts, and keeps hers.
|
|
273
|
+
if (rz_xray_cut(input.position, material.xray.x)) { discard; }
|
|
268
274
|
let tex = textureSample(diffuseTexture, edgeSampler, input.uv);
|
|
269
275
|
let texA = tex.a;
|
|
270
276
|
if (texA < 0.05) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SHADOW_DEPTH_SHADER_WGSL = "\n\n/** Clump size, in object-space units \u2014 MMD's are roughly centimetres.\n *\n * Raised from 0.42: at that size the pieces are near enough to speckle that a\n * departure reads as a fade rather than as a body coming apart, which is the\n * thing the clumping exists to avoid. Hand-sized pieces are visible ones. */\nconst RZ_DISSOLVE_GRAIN: f32 = 1.2;\n/** How much the clumps pull a fragment off its own grit value \u2014 the whole of\n * the LOOK, and none of the rate. See rz_dissolve_threshold. */\nconst RZ_DISSOLVE_CLUMP: f32 = 0.6;\n/** Grit cell, as a fraction of a clump. See rz_dissolve_threshold: this is what\n * keeps a material SMALLER than a clump from having one threshold for all of\n * it, and it has to be smaller than the SMALLEST material a model carries \u2014\n * an eye highlight, a button, a buckle \u2014 not merely small. Two and a half\n * millimetres on a normal model, which is under all of them. */\nconst RZ_DISSOLVE_GRIT: f32 = 0.021;\n/** How wide the glowing front is, in threshold units. Thin: the front is a\n * rim, and a wide one lights whole limbs at once. */\nconst RZ_DISSOLVE_EDGE: f32 = 0.11;\n/** What the front burns with. Emission, added after lighting and after the\n * graph \u2014 a colour that ramps or takes a shadow reads as paint, not as heat.\n * Above 1 on purpose: it is meant to reach the bloom pyramid. Blue-violet,\n * the same light the motes leaving her are drawn and lit with. */\nconst RZ_BURN_COLOR: vec3f = vec3f(0.45, 0.62, 2.40);\n\nfn rz_dissolve_hash(p: vec3f) -> f32 {\n // INTEGER, for exactly the reason _hash33 in nodes.ts is, and its comment\n // says it: above 24 bits an f32 loses the low ones. The float hash this\n // replaces multiplied three terms into the hundreds of millions and took\n // fract() of the product \u2014 which past 2^24 is not noise, it is a quantised\n // staircase, and wherever that staircase landed on zero the threshold was\n // zero. A surface whose threshold is zero never crosses it: it stays behind\n // while the rest of her leaves, and it sits inside the burning front the\n // whole time she is gone. Those were the white pieces that would not go.\n //\n // Floored first, unlike _hash33: vec3i() truncates toward zero, so -0.5 and\n // +0.5 are the same cell, and half this model is at negative x.\n var h = vec3u(vec3i(floor(p)) + vec3i(32768));\n h = h * vec3u(1664525u, 1013904223u, 2654435761u);\n h = (h.yzx ^ h) * vec3u(2246822519u, 3266489917u, 668265263u);\n h = h ^ (h >> vec3u(16u));\n return f32((h.x ^ h.y ^ h.z) & 16777215u) * (1.0 / 16777216.0);\n}\n\n/** Value noise over that hash \u2014 smooth within a flake, uncorrelated between. */\nfn rz_dissolve_field(p: vec3f) -> f32 {\n let i = floor(p);\n let f = fract(p);\n let u = f * f * (3.0 - 2.0 * f);\n let c000 = rz_dissolve_hash(i);\n let c100 = rz_dissolve_hash(i + vec3f(1.0, 0.0, 0.0));\n let c010 = rz_dissolve_hash(i + vec3f(0.0, 1.0, 0.0));\n let c110 = rz_dissolve_hash(i + vec3f(1.0, 1.0, 0.0));\n let c001 = rz_dissolve_hash(i + vec3f(0.0, 0.0, 1.0));\n let c101 = rz_dissolve_hash(i + vec3f(1.0, 0.0, 1.0));\n let c011 = rz_dissolve_hash(i + vec3f(0.0, 1.0, 1.0));\n let c111 = rz_dissolve_hash(i + vec3f(1.0, 1.0, 1.0));\n let x00 = mix(c000, c100, u.x);\n let x10 = mix(c010, c110, u.x);\n let x01 = mix(c001, c101, u.x);\n let x11 = mix(c011, c111, u.x);\n return mix(mix(x00, x10, u.y), mix(x01, x11, u.y), u.z);\n}\n\n/**\n * The threshold this fragment is measured against.\n *\n * NOISE ALONE, so the whole body comes apart at once \u2014 a hand, a shoulder and\n * an ankle all thinning together rather than a line travelling up her. It was\n * tilted by height at first, on the argument that a sweep reads as something\n * happening TO her; what it actually reads as is a wipe, and a wipe has a\n * direction, an edge and a speed the rest of the effect knows nothing about.\n * Everywhere at once is also the honest match for what leaves: the motes are\n * shed from every limb in the same breath.\n *\n * TWO SCALES. Clumps alone meant every fragment of a material SMALLER than one\n * cell shared a single threshold: an eye highlight, a brow, a button, a hair\n * clip. All of it sat inside the glowing front at once, so the piece flashed\n * white as a whole and then popped \u2014 the two things a disintegration must never\n * do. The grit is a per-cell hash at a fraction of the clump, so a part a few\n * millimetres across still comes apart in pieces.\n *\n * THE GRIT IS THE BASE, though, and the clumps only push a fragment off it.\n * That ordering is what makes the dissolve smooth, and it is not obvious: the\n * two used to be WEIGHTED AND ADDED, and a sum is not uniformly distributed\n * however uniform each half is. It piles up in the middle, so most of the\n * surface had a threshold near a half \u2014 all of it went as the dissolve swept\n * through the middle, and what remained was the thin tail near zero. That tail\n * was the second stage everyone could see: a body that mostly vanished, then a\n * scatter of glowing scraps, then nothing.\n *\n * WRAPPED, not added. Offsetting a uniform value and taking fract() leaves it\n * EXACTLY uniform, where scaling a sum back into range only flattens the middle\n * \u2014 measured over four hundred thousand samples, the sum removed 12% of her per\n * step at the halfway mark and 0.1% at each end (a 110x swing), the scaled sum\n * still swung 89x, and the wrap is flat: 5.0% per step from the first flake to\n * the last, a ratio of 1.0.\n *\n * That flatness IS the smoothness. An uneven rate is what produced the two\n * stages you could see \u2014 a body that mostly vanished at once, then a scatter of\n * scraps that took as long again to follow.\n *\n * The clumping survives the wrap: neighbouring fragments share a clump value,\n * so the offset moves them together. What wraps past 1 comes back at 0 and goes\n * at the other end instead, which costs a little speckle in a region and buys\n * an even rate everywhere.\n */\nfn rz_dissolve_threshold(restPos: vec3f) -> f32 {\n let grit = rz_dissolve_hash(floor(restPos / (RZ_DISSOLVE_GRAIN * RZ_DISSOLVE_GRIT)));\n let clump = rz_dissolve_field(restPos / RZ_DISSOLVE_GRAIN) - 0.5;\n return fract(grit + clump * RZ_DISSOLVE_CLUMP);\n}\n\nstruct LightVP { viewProj: mat4x4f, };\n@group(0) @binding(0) var<uniform> lp: LightVP;\n@group(0) @binding(1) var<storage, read> skinMats: array<mat4x4f>;\n@group(0) @binding(2) var texSampler: sampler;\n@group(1) @binding(0) var diffuseTexture: texture_2d<f32>;\n// The head of the material block and the one field at its tail \u2014 the same\n// reach the depth prepass takes, and for the same reason: a shadow cast by a\n// body that is no longer drawn is the tell that the vanishing is a trick.\nstruct MaterialDiffuse {\n diffuse: vec4f,\n _skip0: vec4f,\n _skip1: vec4f,\n _skip2: f32,\n materialId: f32,\n _skip3: f32,\n dissolve: f32,\n};\n@group(1) @binding(1) var<uniform> material: MaterialDiffuse;\n// The model's ObjectLight, for its jelly eyes: the map must hold the iris where\n// the colour pass draws it.\nstruct ObjectLight { layers: vec4u, ambient: vec4f, sh: array<vec4f, 9>, fill: vec4f, jelly: array<vec4f, 12>, bloom: vec4f }\n@group(0) @binding(3) var<uniform> objectLight: ObjectLight;\n\nfn _rzJellyTurn(q: vec2f, a: f32) -> vec2f {\n let c = cos(a);\n let s = sin(a);\n return vec2f(c * q.x - s * q.y, s * q.x + c * q.y);\n}\n\n/**\n * Where the jelly puts an iris vertex. The iris is the part of the eye the eye\n * bones carry, so it is moved as a whole, in bind space before skinning:\n * scaled about its centre (the CPU composes the blink's spring, the lid's\n * press and her motion's knock into one scale), turned and drifted a hair on\n * the spring, brought forward a hair, and rolled about the eye bone with a\n * closing expression \u2014 inside the white, which stays where it is. A highlight\n * layer (this draw's material is one of jelly[1].w's) takes the iris's move,\n * then its own scale, turn and tremble, before the roll. Vertices take it by their weight on the eye bones\n * (jelly[2].w, jelly[3].w), so nothing else on the face moves.\n */\nfn rzJellyVertex(p: vec3f, joints: vec4<u32>, nw: vec4f) -> vec3f {\n let j = objectLight.jelly;\n let ids = u32(j[1].w);\n let mid = u32(material.materialId);\n let hl = mid > 0u && (mid == (ids & 4095u) || mid == (ids >> 12u));\n var out = p;\n for (var e = 0u; e < 2u; e++) {\n let bone = j[2u + e].w;\n if (bone < 0.0) { continue; }\n let b = u32(bone);\n let w = dot(nw, select(vec4f(0.0), vec4f(1.0), joints == vec4<u32>(b)));\n if (w <= 0.0) { continue; }\n let c = j[e].xyz;\n // A rig that carries both eyes on one bone: each vertex follows its own side.\n if (j[2].w == j[3].w && e == 0u && distance(p.xy, j[1].xy) < distance(p.xy, j[0].xy)) { continue; }\n if (j[2].w == j[3].w && e == 1u && distance(p.xy, j[0].xy) <= distance(p.xy, j[1].xy)) { continue; }\n let t = j[4u + e];\n let m = j[6u + e];\n let h = j[10u + e];\n var q = _rzJellyTurn((p.xy - c.xy) * t.xy, t.z) + m.xy;\n // Forward is \u2212Z (MMD faces \u2212Z).\n var push = h.z;\n if (hl) {\n // Sliding over the iris's dome on its own, a highlight sheet a hair in\n // front of it would sink into it where the dome bulges more and the two\n // fight for depth; so it comes forward by as far as it slid \u2014 a slope of\n // one, steeper than the dome anywhere it draws.\n let before = q;\n q = _rzJellyTurn(q * h.xy, t.w) + m.zw;\n push += length(q - before);\n }\n var moved = vec3f(c.xy + q, p.z - push);\n let roll = j[8u + e];\n if (roll.w != 0.0) {\n let d = moved - roll.xyz;\n let rd = _rzJellyTurn(d.yz, roll.w);\n moved = roll.xyz + vec3f(d.x, rd.x, rd.y);\n }\n out = mix(p, moved, w);\n }\n return out;\n}\n\n\nstruct VSOut {\n @builtin(position) position: vec4f,\n @location(0) uv: vec2f,\n /** Bind-pose position, for the dissolve test \u2014 object space, as everywhere.\n * A flake that is gone must stop casting. */\n @location(1) restPos: vec3f,\n};\n\n@vertex fn vs(@location(0) position: vec3f, @location(1) normal: vec3f, @location(2) uv: vec2f,\n @location(3) joints0: vec4<u32>, @location(4) weights0: vec4<f32>) -> VSOut {\n let ws = weights0.x + weights0.y + weights0.z + weights0.w;\n let inv = select(1.0, 1.0 / ws, ws > 0.0001);\n let nw = select(vec4f(1.0,0.0,0.0,0.0), weights0 * inv, ws > 0.0001);\n var pos4 = vec4f(position, 1.0);\n if (objectLight.jelly[0].w > 0.0) { pos4 = vec4f(rzJellyVertex(position, joints0, nw), 1.0); }\n var sp = vec4f(0.0);\n for (var i = 0u; i < 4u; i++) { sp += (skinMats[joints0[i]] * pos4) * nw[i]; }\n var out: VSOut;\n out.position = lp.viewProj * vec4f(sp.xyz, 1.0);\n out.uv = uv;\n out.restPos = position;\n return out;\n}\n\n@fragment fn fs(in: VSOut) {\n let alpha = textureSample(diffuseTexture, texSampler, in.uv).a * material.diffuse.a;\n if (alpha < 0.5) { discard; }\n // The dissolve, run as the colour pass runs it. A flake that is gone stops\n // casting: without this she leaves a whole shadow standing on the floor while\n // her body is in the air.\n if (material.dissolve < 0.9995 && rz_dissolve_threshold(in.restPos) > material.dissolve) { discard; }\n}\n";
|
|
1
|
+
export declare const SHADOW_DEPTH_SHADER_WGSL = "\n\n/** Clump size, in object-space units \u2014 MMD's are roughly centimetres.\n *\n * Raised from 0.42: at that size the pieces are near enough to speckle that a\n * departure reads as a fade rather than as a body coming apart, which is the\n * thing the clumping exists to avoid. Hand-sized pieces are visible ones. */\nconst RZ_DISSOLVE_GRAIN: f32 = 1.2;\n/** How much the clumps pull a fragment off its own grit value \u2014 the whole of\n * the LOOK, and none of the rate. See rz_dissolve_threshold. */\nconst RZ_DISSOLVE_CLUMP: f32 = 0.6;\n/** Grit cell, as a fraction of a clump. See rz_dissolve_threshold: this is what\n * keeps a material SMALLER than a clump from having one threshold for all of\n * it, and it has to be smaller than the SMALLEST material a model carries \u2014\n * an eye highlight, a button, a buckle \u2014 not merely small. Two and a half\n * millimetres on a normal model, which is under all of them. */\nconst RZ_DISSOLVE_GRIT: f32 = 0.021;\n/** How wide the glowing front is, in threshold units. Thin: the front is a\n * rim, and a wide one lights whole limbs at once. */\nconst RZ_DISSOLVE_EDGE: f32 = 0.11;\n/** What the front burns with. Emission, added after lighting and after the\n * graph \u2014 a colour that ramps or takes a shadow reads as paint, not as heat.\n * Above 1 on purpose: it is meant to reach the bloom pyramid. Blue-violet,\n * the same light the motes leaving her are drawn and lit with. */\nconst RZ_BURN_COLOR: vec3f = vec3f(0.45, 0.62, 2.40);\n\nfn rz_dissolve_hash(p: vec3f) -> f32 {\n // INTEGER, for exactly the reason _hash33 in nodes.ts is, and its comment\n // says it: above 24 bits an f32 loses the low ones. The float hash this\n // replaces multiplied three terms into the hundreds of millions and took\n // fract() of the product \u2014 which past 2^24 is not noise, it is a quantised\n // staircase, and wherever that staircase landed on zero the threshold was\n // zero. A surface whose threshold is zero never crosses it: it stays behind\n // while the rest of her leaves, and it sits inside the burning front the\n // whole time she is gone. Those were the white pieces that would not go.\n //\n // Floored first, unlike _hash33: vec3i() truncates toward zero, so -0.5 and\n // +0.5 are the same cell, and half this model is at negative x.\n var h = vec3u(vec3i(floor(p)) + vec3i(32768));\n h = h * vec3u(1664525u, 1013904223u, 2654435761u);\n h = (h.yzx ^ h) * vec3u(2246822519u, 3266489917u, 668265263u);\n h = h ^ (h >> vec3u(16u));\n return f32((h.x ^ h.y ^ h.z) & 16777215u) * (1.0 / 16777216.0);\n}\n\n/** Value noise over that hash \u2014 smooth within a flake, uncorrelated between. */\nfn rz_dissolve_field(p: vec3f) -> f32 {\n let i = floor(p);\n let f = fract(p);\n let u = f * f * (3.0 - 2.0 * f);\n let c000 = rz_dissolve_hash(i);\n let c100 = rz_dissolve_hash(i + vec3f(1.0, 0.0, 0.0));\n let c010 = rz_dissolve_hash(i + vec3f(0.0, 1.0, 0.0));\n let c110 = rz_dissolve_hash(i + vec3f(1.0, 1.0, 0.0));\n let c001 = rz_dissolve_hash(i + vec3f(0.0, 0.0, 1.0));\n let c101 = rz_dissolve_hash(i + vec3f(1.0, 0.0, 1.0));\n let c011 = rz_dissolve_hash(i + vec3f(0.0, 1.0, 1.0));\n let c111 = rz_dissolve_hash(i + vec3f(1.0, 1.0, 1.0));\n let x00 = mix(c000, c100, u.x);\n let x10 = mix(c010, c110, u.x);\n let x01 = mix(c001, c101, u.x);\n let x11 = mix(c011, c111, u.x);\n return mix(mix(x00, x10, u.y), mix(x01, x11, u.y), u.z);\n}\n\n/**\n * The threshold this fragment is measured against.\n *\n * NOISE ALONE, so the whole body comes apart at once \u2014 a hand, a shoulder and\n * an ankle all thinning together rather than a line travelling up her. It was\n * tilted by height at first, on the argument that a sweep reads as something\n * happening TO her; what it actually reads as is a wipe, and a wipe has a\n * direction, an edge and a speed the rest of the effect knows nothing about.\n * Everywhere at once is also the honest match for what leaves: the motes are\n * shed from every limb in the same breath.\n *\n * TWO SCALES. Clumps alone meant every fragment of a material SMALLER than one\n * cell shared a single threshold: an eye highlight, a brow, a button, a hair\n * clip. All of it sat inside the glowing front at once, so the piece flashed\n * white as a whole and then popped \u2014 the two things a disintegration must never\n * do. The grit is a per-cell hash at a fraction of the clump, so a part a few\n * millimetres across still comes apart in pieces.\n *\n * THE GRIT IS THE BASE, though, and the clumps only push a fragment off it.\n * That ordering is what makes the dissolve smooth, and it is not obvious: the\n * two used to be WEIGHTED AND ADDED, and a sum is not uniformly distributed\n * however uniform each half is. It piles up in the middle, so most of the\n * surface had a threshold near a half \u2014 all of it went as the dissolve swept\n * through the middle, and what remained was the thin tail near zero. That tail\n * was the second stage everyone could see: a body that mostly vanished, then a\n * scatter of glowing scraps, then nothing.\n *\n * WRAPPED, not added. Offsetting a uniform value and taking fract() leaves it\n * EXACTLY uniform, where scaling a sum back into range only flattens the middle\n * \u2014 measured over four hundred thousand samples, the sum removed 12% of her per\n * step at the halfway mark and 0.1% at each end (a 110x swing), the scaled sum\n * still swung 89x, and the wrap is flat: 5.0% per step from the first flake to\n * the last, a ratio of 1.0.\n *\n * That flatness IS the smoothness. An uneven rate is what produced the two\n * stages you could see \u2014 a body that mostly vanished at once, then a scatter of\n * scraps that took as long again to follow.\n *\n * The clumping survives the wrap: neighbouring fragments share a clump value,\n * so the offset moves them together. What wraps past 1 comes back at 0 and goes\n * at the other end instead, which costs a little speckle in a region and buys\n * an even rate everywhere.\n */\nfn rz_dissolve_threshold(restPos: vec3f) -> f32 {\n let grit = rz_dissolve_hash(floor(restPos / (RZ_DISSOLVE_GRAIN * RZ_DISSOLVE_GRIT)));\n let clump = rz_dissolve_field(restPos / RZ_DISSOLVE_GRAIN) - 0.5;\n return fract(grit + clump * RZ_DISSOLVE_CLUMP);\n}\n\nstruct LightVP { viewProj: mat4x4f, };\n@group(0) @binding(0) var<uniform> lp: LightVP;\n@group(0) @binding(1) var<storage, read> skinMats: array<mat4x4f>;\n@group(0) @binding(2) var texSampler: sampler;\n@group(1) @binding(0) var diffuseTexture: texture_2d<f32>;\n// The head of the material block and the one field at its tail \u2014 the same\n// reach the depth prepass takes, and for the same reason: a shadow cast by a\n// body that is no longer drawn is the tell that the vanishing is a trick.\nstruct MaterialDiffuse {\n diffuse: vec4f,\n _skip0: vec4f,\n _skip1: vec4f,\n _skip2: f32,\n materialId: f32,\n _skip3: f32,\n dissolve: f32,\n};\n@group(1) @binding(1) var<uniform> material: MaterialDiffuse;\n// The model's ObjectLight, for its jelly eyes: the map must hold the iris where\n// the colour pass draws it.\nstruct ObjectLight { layers: vec4u, ambient: vec4f, sh: array<vec4f, 9>, fill: vec4f, jelly: array<vec4f, 12>, bloom: vec4f, xray: array<vec4f, 4>, xrayMask: array<vec4u, 16> }\n@group(0) @binding(3) var<uniform> objectLight: ObjectLight;\n\nfn _rzJellyTurn(q: vec2f, a: f32) -> vec2f {\n let c = cos(a);\n let s = sin(a);\n return vec2f(c * q.x - s * q.y, s * q.x + c * q.y);\n}\n\n/**\n * Where the jelly puts an iris vertex. The iris is the part of the eye the eye\n * bones carry, so it is moved as a whole, in bind space before skinning:\n * scaled about its centre (the CPU composes the blink's spring, the lid's\n * press and her motion's knock into one scale), turned and drifted a hair on\n * the spring, brought forward a hair, and rolled about the eye bone with a\n * closing expression \u2014 inside the white, which stays where it is. A highlight\n * layer (this draw's material is one of jelly[1].w's) takes the iris's move,\n * then its own scale, turn and tremble, before the roll. Vertices take it by their weight on the eye bones\n * (jelly[2].w, jelly[3].w), so nothing else on the face moves.\n */\nfn rzJellyVertex(p: vec3f, joints: vec4<u32>, nw: vec4f) -> vec3f {\n let j = objectLight.jelly;\n let ids = u32(j[1].w);\n let mid = u32(material.materialId);\n let hl = mid > 0u && (mid == (ids & 4095u) || mid == (ids >> 12u));\n var out = p;\n for (var e = 0u; e < 2u; e++) {\n let bone = j[2u + e].w;\n if (bone < 0.0) { continue; }\n let b = u32(bone);\n let w = dot(nw, select(vec4f(0.0), vec4f(1.0), joints == vec4<u32>(b)));\n if (w <= 0.0) { continue; }\n let c = j[e].xyz;\n // A rig that carries both eyes on one bone: each vertex follows its own side.\n if (j[2].w == j[3].w && e == 0u && distance(p.xy, j[1].xy) < distance(p.xy, j[0].xy)) { continue; }\n if (j[2].w == j[3].w && e == 1u && distance(p.xy, j[0].xy) <= distance(p.xy, j[1].xy)) { continue; }\n let t = j[4u + e];\n let m = j[6u + e];\n let h = j[10u + e];\n var q = _rzJellyTurn((p.xy - c.xy) * t.xy, t.z) + m.xy;\n // Forward is \u2212Z (MMD faces \u2212Z).\n var push = h.z;\n if (hl) {\n // Sliding over the iris's dome on its own, a highlight sheet a hair in\n // front of it would sink into it where the dome bulges more and the two\n // fight for depth; so it comes forward by as far as it slid \u2014 a slope of\n // one, steeper than the dome anywhere it draws.\n let before = q;\n q = _rzJellyTurn(q * h.xy, t.w) + m.zw;\n push += length(q - before);\n }\n var moved = vec3f(c.xy + q, p.z - push);\n let roll = j[8u + e];\n if (roll.w != 0.0) {\n let d = moved - roll.xyz;\n let rd = _rzJellyTurn(d.yz, roll.w);\n moved = roll.xyz + vec3f(d.x, rd.x, rd.y);\n }\n out = mix(p, moved, w);\n }\n return out;\n}\n\n\nstruct VSOut {\n @builtin(position) position: vec4f,\n @location(0) uv: vec2f,\n /** Bind-pose position, for the dissolve test \u2014 object space, as everywhere.\n * A flake that is gone must stop casting. */\n @location(1) restPos: vec3f,\n};\n\n@vertex fn vs(@location(0) position: vec3f, @location(1) normal: vec3f, @location(2) uv: vec2f,\n @location(3) joints0: vec4<u32>, @location(4) weights0: vec4<f32>) -> VSOut {\n let ws = weights0.x + weights0.y + weights0.z + weights0.w;\n let inv = select(1.0, 1.0 / ws, ws > 0.0001);\n let nw = select(vec4f(1.0,0.0,0.0,0.0), weights0 * inv, ws > 0.0001);\n var pos4 = vec4f(position, 1.0);\n if (objectLight.jelly[0].w > 0.0) { pos4 = vec4f(rzJellyVertex(position, joints0, nw), 1.0); }\n var sp = vec4f(0.0);\n for (var i = 0u; i < 4u; i++) { sp += (skinMats[joints0[i]] * pos4) * nw[i]; }\n var out: VSOut;\n out.position = lp.viewProj * vec4f(sp.xyz, 1.0);\n out.uv = uv;\n out.restPos = position;\n return out;\n}\n\n@fragment fn fs(in: VSOut) {\n let alpha = textureSample(diffuseTexture, texSampler, in.uv).a * material.diffuse.a;\n if (alpha < 0.5) { discard; }\n // The dissolve, run as the colour pass runs it. A flake that is gone stops\n // casting: without this she leaves a whole shadow standing on the floor while\n // her body is in the air.\n if (material.dissolve < 0.9995 && rz_dissolve_threshold(in.restPos) > material.dissolve) { discard; }\n}\n";
|
|
2
2
|
//# sourceMappingURL=shadow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/shadow.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../../../src/shaders/passes/shadow.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,wBAAwB,srWA0DpC,CAAA"}
|