ugly-game 0.14.22 → 0.14.23
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/gpuCrowd.js +9 -3
- package/package.json +1 -1
package/dist/assets/gpuCrowd.js
CHANGED
|
@@ -1118,9 +1118,15 @@ fn cylindrical(layer: i32, p: vec3f, dx: vec3f, dy: vec3f) -> vec3f {
|
|
|
1118
1118
|
// the body.
|
|
1119
1119
|
let suv = clamp(here + off, vec2f(0.0), vec2f(1.0));
|
|
1120
1120
|
let behind = textureSampleLevel(sceneTex, skinSamp, suv, 0.0).rgb;
|
|
1121
|
-
//
|
|
1122
|
-
//
|
|
1123
|
-
|
|
1121
|
+
// ⚠️ TINTED BY THE COLOUR, NOT MULTIPLIED BY base, and that distinction is the whole
|
|
1122
|
+
// difference between glass and a dark blob. base carries the skin atlas's luminance detail -
|
|
1123
|
+
// around 0.5 - and running transmitted light through it halves everything seen through the body,
|
|
1124
|
+
// so the figure came out DARKER than the world behind it. Detail belongs to the surface shading;
|
|
1125
|
+
// what passes through a pane is attenuated only by the pane's own colour.
|
|
1126
|
+
let transmit = behind * i.tint.rgb;
|
|
1127
|
+
// The lit surface is then layered over it by the SAME fresnel rim that drove the alpha: clear in
|
|
1128
|
+
// the middle, bright at the edge.
|
|
1129
|
+
outCol = mix(transmit, lit, clamp(c.x * rim, 0.0, 1.0));
|
|
1124
1130
|
// ⚠️ ALPHA 1 once we have composited the background OURSELVES. The blended pipeline would
|
|
1125
1131
|
// otherwise mix our result with the UNDISTORTED scene underneath and half the refraction would
|
|
1126
1132
|
// be cancelled straight back out. The record still carries tint.w < 1, so splitByAlpha still
|