ugly-game 0.14.29 → 0.14.31

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.
@@ -955,7 +955,7 @@ const ENV_GROUND: f32 = 0.3;
955
955
  const MATS = array<vec4f, 15>(
956
956
  vec4f(0.00, 1.0, 0.00, 0.0), vec4f(0.00, -1.0, 1.000, 0.0), vec4f(0.00, 0.000, 0.0, 0.0),
957
957
  vec4f(0.35, 64.0, 0.50, 0.0), vec4f(0.60, -1.0, 1.000, 0.0), vec4f(0.00, 0.000, 0.0, 0.0),
958
- vec4f(0.90, 40.0, 0.80, 1.0), vec4f(1.00, 0.0, 0.333, 0.0), vec4f(0.00, 0.000, 0.0, 0.0),
958
+ vec4f(0.90, 40.0, 0.80, 1.0), vec4f(1.00, 0.0, 0.120, 1.0), vec4f(0.00, 0.000, 0.0, 0.0),
959
959
  vec4f(0.90, 256.0, 1.00, 0.0), vec4f(1.00, -1.0, 1.000, 0.0), vec4f(1.00, 0.045, 0.0, 0.0),
960
960
  vec4f(0.08, 16.0, 0.15, 0.0), vec4f(1.00, 1.0, 0.120, 1.0), vec4f(0.00, 0.000, 0.0, 0.0),
961
961
  );
@@ -1118,7 +1118,11 @@ fn cylindrical(layer: i32, p: vec3f, dx: vec3f, dy: vec3f) -> vec3f {
1118
1118
  // REFLECTED ray rather than the normal, which is what makes the gradient sweep with the camera the
1119
1119
  // way a real reflection does.
1120
1120
  let rdir = reflect(-v, n);
1121
- let sky = clamp(rdir.y * 0.5 + 0.5, 0.0, 1.0);
1121
+ // ⚠️ SHARPENED with a smoothstep, because a linear ramp reads as something soft and FLOWING rather
1122
+ // than as metal. A real reflection has a horizon in it: the world above and the world below meet at
1123
+ // an edge, and the eye uses that hard transition to tell a mirror from a matte surface. Compressing
1124
+ // the ramp into the middle band puts that edge back.
1125
+ let sky = smoothstep(0.35, 0.62, clamp(rdir.y * 0.5 + 0.5, 0.0, 1.0));
1122
1126
  // ⚠️ The ground half is DARKENED, not taken as-is, and without that metal still read flat. In an
1123
1127
  // overcast scene the ambient and the fog tint are nearly the SAME pale grey, so mixing between them
1124
1128
  // gave a gradient with no range in it — exactly the lighting a white studio backdrop produces, and
@@ -1372,6 +1376,14 @@ export class GpuCrowdRenderer {
1372
1376
  mipmapFilter: 'linear',
1373
1377
  addressModeU: 'repeat',
1374
1378
  addressModeV: 'repeat',
1379
+ // ⚠️ ANISOTROPIC, because a human atlas is not isotropic and the legs prove it. Measured on
1380
+ // all-mine-sky's UV chart, a texture-space SQUARE renders with median aspect 1.57 on the
1381
+ // chest, 2.46 on the shin and 5.11 on the thigh — the leg islands carry about three times
1382
+ // fewer texels per centimetre along the limb than around it. Trilinear picks its mip from the
1383
+ // WORST axis, so it blurs the well-sampled direction to hide the stretched one, and the result
1384
+ // reads as vertical streaking down the legs. Anisotropic sampling is exactly the case this
1385
+ // hardware feature exists for, and it costs nothing on surfaces that are already isotropic.
1386
+ maxAnisotropy: 16,
1375
1387
  });
1376
1388
  }
1377
1389
  /** The rung geometry and pool sizes, once the assets are in. Null before `setAssets`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugly-game",
3
- "version": "0.14.29",
3
+ "version": "0.14.31",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {