ugly-game 0.14.31 → 0.14.32
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 +11 -2
- package/package.json +1 -1
package/dist/assets/gpuCrowd.js
CHANGED
|
@@ -921,6 +921,15 @@ const ENV_SKY: f32 = 1.7;
|
|
|
921
921
|
// And how much DARKER the faked ground is. Both ends are forced apart on purpose — see the note in fs
|
|
922
922
|
// about an overcast scene where the ambient and the fog tint are the same colour.
|
|
923
923
|
const ENV_GROUND: f32 = 0.3;
|
|
924
|
+
// ⚠️ A DELIBERATE MIP BIAS on the material texture only, and it is what lets a dense pattern actually
|
|
925
|
+
// be seen. The gradient handed to textureSampleGrad is what picks the mip, so shrinking it selects a
|
|
926
|
+
// SHARPER level than the footprint strictly warrants. Without it the grain hit a hard ceiling: 32
|
|
927
|
+
// lines around the body read, 44 and 64 both averaged away to flat skin in the mip chain long before
|
|
928
|
+
// they reached the eye, so raising the density made the material LESS visible rather than more.
|
|
929
|
+
//
|
|
930
|
+
// The cost is some shimmer on a distant character. That is the right trade here — the crowd drops to
|
|
931
|
+
// coarser rungs with distance anyway, and an invisible material is a worse defect than a busy one.
|
|
932
|
+
const MIP_SHARPEN: f32 = 0.55;
|
|
924
933
|
// ⚠️ 1/MEAN (0.4615), NOT 1/p99, and getting that wrong is what made every desaturating material
|
|
925
934
|
// look bad for three rounds. This gain feeds a MULTIPLICATIVE detail map, so what matters is that it
|
|
926
935
|
// averages 1.0 - leaving the material's own colour and contrast alone while still modulating it.
|
|
@@ -1074,9 +1083,9 @@ fn cylindrical(layer: i32, p: vec3f, dx: vec3f, dy: vec3f) -> vec3f {
|
|
|
1074
1083
|
var matC = vec3f(1.0);
|
|
1075
1084
|
if (i32(b.y) >= 0) {
|
|
1076
1085
|
if (b.w > 0.5) {
|
|
1077
|
-
matC = cylindrical(i32(b.y), i.rest * b.z, rdx * b.z, rdy * b.z);
|
|
1086
|
+
matC = cylindrical(i32(b.y), i.rest * b.z, rdx * b.z * MIP_SHARPEN, rdy * b.z * MIP_SHARPEN);
|
|
1078
1087
|
} else {
|
|
1079
|
-
matC = triplanar(i32(b.y), i.rest * b.z, rdx * b.z, rdy * b.z, bn);
|
|
1088
|
+
matC = triplanar(i32(b.y), i.rest * b.z, rdx * b.z * MIP_SHARPEN, rdy * b.z * MIP_SHARPEN, bn);
|
|
1080
1089
|
}
|
|
1081
1090
|
}
|
|
1082
1091
|
let base = detail * matC * i.tint.rgb;
|