ugly-game 0.14.30 → 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugly-game",
3
- "version": "0.14.30",
3
+ "version": "0.14.31",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {