@woosh/meep-engine 2.119.70 → 2.119.71

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.119.70",
8
+ "version": "2.119.71",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"build_vertex_shader.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/sh3/gi/material/space_vertex/build_vertex_shader.js"],"names":[],"mappings":"AA6CA;;;GAGG;AACH,4CAFW,MAAM,UAchB"}
1
+ {"version":3,"file":"build_vertex_shader.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/sh3/gi/material/space_vertex/build_vertex_shader.js"],"names":[],"mappings":"AA8CA;;;GAGG;AACH,4CAFW,MAAM,UAchB"}
@@ -3,6 +3,7 @@ import PREAMBLE_COMMON from "../common.js";
3
3
 
4
4
  import PREAMBLE from "./preable.vert.js";
5
5
 
6
+ //language=GLSL
6
7
  const SHADER_CHUNK_ACCUMULATION = `
7
8
  {
8
9
  // lookup nearby tet
@@ -11,12 +12,15 @@ const SHADER_CHUNK_ACCUMULATION = `
11
12
  vec3 lookup_coordinates = (worldPosition.xyz - lpv_mesh_bounds_min) / (lpv_mesh_bounds_max - lpv_mesh_bounds_min) ;
12
13
 
13
14
  uint nearest_tet = lpv_guess_initial_tet( worldPosition.xyz );
14
-
15
+
15
16
  uint tet;
16
- vec4 weights;
17
- lpv_getTetrahedron(worldPosition.xyz, nearest_tet, tet, weights);
18
-
19
- weights = lvp_mask_weights_by_visibility(worldPosition.xyz, tet, weights);
17
+ vec4 barycentric_coordinates;
18
+ lpv_walk_to_tetrahedron(position, nearest_tet, tet, barycentric_coordinates);
19
+
20
+ vec3 worldNormal = normalize(inverseTransformDirection( normalize(normal), viewMatrix ));
21
+ vec3 view_direction = vec3(0.0); // TODO build an actual view direction vector
22
+
23
+ vec4 weights = lvp_mask_weights_by_visibility(worldPosition.xyz, worldNormal, view_direction, tet, barycentric_coordinates);
20
24
 
21
25
  if(tet == INVALID_TET){
22
26
  lpv_values = vec3[](
@@ -34,10 +38,7 @@ const SHADER_CHUNK_ACCUMULATION = `
34
38
  );
35
39
  }else{
36
40
 
37
- vec3 worldNormal = normalize(inverseTransformDirection( normalize(normal), viewMatrix ));
38
-
39
- //weights = lpv_bias_weight_by_normal(worldPosition.xyz, normal, tet, weights);
40
-
41
+
41
42
  lpv_values = lpv_interpolate_probes(weights, tet);
42
43
  }
43
44
  }
@@ -317,7 +317,7 @@ async function main(engine) {
317
317
  // const path = 'data/models/samples/just_a_girl/scene.gltf';
318
318
  // const path = 'data/models/samples/slum_house/scene.gltf';
319
319
  // const path = 'data/models/samples/jack_trigger/scene.gltf';
320
- const path = 'data/models/samples/cornell_box/scene.gltf';
320
+ // const path = 'data/models/samples/cornell_box/scene.gltf';
321
321
  // const path = 'data/models/Slaughter Mech/Slaugter Mech.gltf';
322
322
  // const path = 'data/models/samples/gi_box_01/model-thick-1.glb';
323
323
  // const path = 'data/models/samples/ancient_bath_house_-_modular_set/scene.gltf';
@@ -333,7 +333,7 @@ async function main(engine) {
333
333
  // const path = 'data/models/samples/teapot.gltf';
334
334
  // const path = 'data/models/samples/salle_de_bain/model.glb';
335
335
  // const path = 'data/models/samples/conference/model-no-curtains.glb';
336
- // const path = 'data/models/pica_pica/pica_pica.gltf';
336
+ const path = 'data/models/pica_pica/pica_pica.gltf';
337
337
  // const path = 'data/models/samples/gi_box_01/model.glb';
338
338
  // const path = 'data/models/samples/low_poly_classroom/no-glass/model.gltf';
339
339
  // const path = 'customer_data/halon_scene.glb';