reze-engine 0.57.5 → 0.57.6

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.
@@ -219,19 +219,19 @@ fn sampleShadow(worldPos: vec3f, n: vec3f) -> f32 {
219
219
  //
220
220
  // Lit is the answer when it is off. Returning 0 would be "fully shadowed",
221
221
  // which is the opposite of what a disabled shadow means.
222
- let cast = light.lights[0].direction.w;
223
- if (cast <= 0.0) { return 1.0; }
222
+ let castAmt = light.lights[0].direction.w;
223
+ if (castAmt <= 0.0) { return 1.0; }
224
224
  if (dot(n, -light.lights[0].direction.xyz) <= 0.0) { return 0.0; }
225
225
  let biasedPos = worldPos + n * 0.08;
226
226
  let c0 = lightVP.viewProj[0] * vec4f(biasedPos, 1.0);
227
227
  let n0 = c0.xyz / max(c0.w, 1e-6);
228
228
  if (all(abs(n0.xy) < vec2f(0.98)) && n0.z > 0.0 && n0.z < 1.0) {
229
- return mix(1.0, sampleShadowNear(n0), cast);
229
+ return mix(1.0, sampleShadowNear(n0), castAmt);
230
230
  }
231
231
  let c1 = lightVP.viewProj[1] * vec4f(biasedPos, 1.0);
232
232
  let n1 = c1.xyz / max(c1.w, 1e-6);
233
233
  if (all(abs(n1.xy) < vec2f(0.98)) && n1.z > 0.0 && n1.z < 1.0) {
234
- return mix(1.0, sampleShadowFar(n1), cast);
234
+ return mix(1.0, sampleShadowFar(n1), castAmt);
235
235
  }
236
236
  // Outside every cascade there is no occlusion information; lit is the only
237
237
  // honest answer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reze-engine",
3
- "version": "0.57.5",
3
+ "version": "0.57.6",
4
4
  "description": "A lightweight WebGPU engine for real-time 3D MMD/PMX model rendering",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -225,19 +225,19 @@ fn sampleShadow(worldPos: vec3f, n: vec3f) -> f32 {
225
225
  //
226
226
  // Lit is the answer when it is off. Returning 0 would be "fully shadowed",
227
227
  // which is the opposite of what a disabled shadow means.
228
- let cast = light.lights[0].direction.w;
229
- if (cast <= 0.0) { return 1.0; }
228
+ let castAmt = light.lights[0].direction.w;
229
+ if (castAmt <= 0.0) { return 1.0; }
230
230
  if (dot(n, -light.lights[0].direction.xyz) <= 0.0) { return 0.0; }
231
231
  let biasedPos = worldPos + n * 0.08;
232
232
  let c0 = lightVP.viewProj[0] * vec4f(biasedPos, 1.0);
233
233
  let n0 = c0.xyz / max(c0.w, 1e-6);
234
234
  if (all(abs(n0.xy) < vec2f(0.98)) && n0.z > 0.0 && n0.z < 1.0) {
235
- return mix(1.0, sampleShadowNear(n0), cast);
235
+ return mix(1.0, sampleShadowNear(n0), castAmt);
236
236
  }
237
237
  let c1 = lightVP.viewProj[1] * vec4f(biasedPos, 1.0);
238
238
  let n1 = c1.xyz / max(c1.w, 1e-6);
239
239
  if (all(abs(n1.xy) < vec2f(0.98)) && n1.z > 0.0 && n1.z < 1.0) {
240
- return mix(1.0, sampleShadowFar(n1), cast);
240
+ return mix(1.0, sampleShadowFar(n1), castAmt);
241
241
  }
242
242
  // Outside every cascade there is no occlusion information; lit is the only
243
243
  // honest answer.