ugly-game 0.14.8 → 0.14.9
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/assets/gpuSkin.js +13 -0
- package/package.json +10 -9
package/dist/assets/gpuSkin.js
CHANGED
|
@@ -218,6 +218,19 @@ export class GpuSkinRenderer {
|
|
|
218
218
|
});
|
|
219
219
|
this.blendPipe = device.createRenderPipeline({
|
|
220
220
|
...common,
|
|
221
|
+
// ⚠️ BACK FACES CULLED, and this is the difference between translucency and mud.
|
|
222
|
+
//
|
|
223
|
+
// With `cullMode: 'none'` and no depth write, every triangle of a closed mesh blends: the far
|
|
224
|
+
// side of the torso, then the near side, in index order. How many layers survive at a given
|
|
225
|
+
// pixel depends on what opaque geometry happens to sit between them, so an opaque marker
|
|
226
|
+
// INSIDE the body masks the far side there and not elsewhere — which stamps the marker's
|
|
227
|
+
// silhouette into the skin as a hard-edged rectangle of different accumulated opacity. The
|
|
228
|
+
// body came out blotchy rather than see-through, and the blotches were shaped like the very
|
|
229
|
+
// markers it was supposed to reveal.
|
|
230
|
+
//
|
|
231
|
+
// One front-facing layer per pixel is the fix. Overlapping SEPARATE surfaces (an arm across
|
|
232
|
+
// the torso) still blend twice, which is correct — you are looking through two things.
|
|
233
|
+
primitive: { ...common.primitive, cullMode: 'back' },
|
|
221
234
|
fragment: {
|
|
222
235
|
module: dm,
|
|
223
236
|
entryPoint: 'fs',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugly-game",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"preinstall": "npx only-allow pnpm",
|
|
20
|
+
"build": "tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.bin dist/assets/basis/",
|
|
21
|
+
"lint": "ugly-app lint",
|
|
22
|
+
"lint:fix": "ugly-app lint --fix",
|
|
23
|
+
"pretty": "prettier --write .",
|
|
24
|
+
"prepublishOnly": "pnpm run pretty && ugly-app lint && tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.bin dist/assets/basis/"
|
|
25
|
+
},
|
|
18
26
|
"dependencies": {
|
|
19
27
|
"meshoptimizer": "^1.2.0"
|
|
20
28
|
},
|
|
@@ -27,12 +35,5 @@
|
|
|
27
35
|
"@webgpu/types": "^0.1.40",
|
|
28
36
|
"prettier": "^3.9.5",
|
|
29
37
|
"ugly-app": "^0.1.841"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"preinstall": "npx only-allow pnpm",
|
|
33
|
-
"build": "tsc -p tsconfig.json && mkdir -p dist/assets/basis && cp src/assets/basis/basis_transcoder.js src/assets/basis/basis_transcoder.bin dist/assets/basis/",
|
|
34
|
-
"lint": "ugly-app lint",
|
|
35
|
-
"lint:fix": "ugly-app lint --fix",
|
|
36
|
-
"pretty": "prettier --write ."
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
|
+
}
|