@woosh/meep-engine 2.93.3 → 2.94.1

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.
Files changed (109) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/build/meep.cjs +336 -269
  3. package/build/meep.min.js +1 -1
  4. package/build/meep.module.js +336 -269
  5. package/package.json +1 -1
  6. package/src/core/bvh2/bvh3/BVH.d.ts.map +1 -1
  7. package/src/core/bvh2/bvh3/BVH.js +4 -2
  8. package/src/core/bvh2/bvh3/build_triangle_morton_codes.d.ts.map +1 -1
  9. package/src/core/bvh2/bvh3/build_triangle_morton_codes.js +2 -1
  10. package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.d.ts.map +1 -1
  11. package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.js +12 -1
  12. package/src/core/bvh2/bvh3/ebvh_build_hierarchy.d.ts.map +1 -1
  13. package/src/core/bvh2/bvh3/ebvh_build_hierarchy.js +11 -1
  14. package/src/core/bvh2/bvh3/ebvh_geometry_query_nearest_triangle_ray.d.ts +14 -0
  15. package/src/core/bvh2/bvh3/ebvh_geometry_query_nearest_triangle_ray.d.ts.map +1 -0
  16. package/src/core/bvh2/bvh3/ebvh_geometry_query_nearest_triangle_ray.js +146 -0
  17. package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.d.ts +16 -0
  18. package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.d.ts.map +1 -0
  19. package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.js +90 -0
  20. package/src/core/collection/heap/Uint32Heap.d.ts.map +1 -1
  21. package/src/core/collection/heap/Uint32Heap.js +22 -17
  22. package/src/core/color/Color.d.ts.map +1 -1
  23. package/src/core/color/Color.js +17 -7
  24. package/src/core/geom/2d/bvh/BVH2D.d.ts.map +1 -1
  25. package/src/core/geom/2d/bvh/BVH2D.js +24 -29
  26. package/src/core/geom/2d/bvh/BVH2D.spec.js +10 -9
  27. package/src/core/geom/2d/bvh/bvh2d_query_all_data_by_circle.spec.d.ts +2 -0
  28. package/src/core/geom/2d/bvh/bvh2d_query_all_data_by_circle.spec.d.ts.map +1 -0
  29. package/src/core/geom/2d/bvh/bvh2d_query_all_data_by_circle.spec.js +89 -0
  30. package/src/core/geom/2d/quad-tree/QuadTreeNode.spec.js +1 -1
  31. package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
  32. package/src/core/geom/3d/aabb/AABB3.js +8 -1
  33. package/src/core/geom/3d/aabb/aabb3_array_combine.d.ts.map +1 -1
  34. package/src/core/geom/3d/aabb/aabb3_array_combine.js +5 -0
  35. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentric.js +2 -0
  36. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.d.ts.map +1 -1
  37. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.js +9 -1
  38. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricGeometry.d.ts +16 -0
  39. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricGeometry.d.ts.map +1 -0
  40. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricGeometry.js +55 -0
  41. package/src/core/math/build_gaussian_kernel_1d.d.ts +8 -0
  42. package/src/core/math/build_gaussian_kernel_1d.d.ts.map +1 -0
  43. package/src/core/math/build_gaussian_kernel_1d.js +26 -0
  44. package/src/core/math/build_gaussian_kernel_2d.d.ts +10 -0
  45. package/src/core/math/build_gaussian_kernel_2d.d.ts.map +1 -0
  46. package/src/core/math/build_gaussian_kernel_2d.js +55 -0
  47. package/src/core/math/nextOdd.d.ts +8 -0
  48. package/src/core/math/nextOdd.d.ts.map +1 -0
  49. package/src/core/math/nextOdd.js +15 -0
  50. package/src/core/math/nextOdd.spec.d.ts +2 -0
  51. package/src/core/math/nextOdd.spec.d.ts.map +1 -0
  52. package/src/core/math/nextOdd.spec.js +9 -0
  53. package/src/engine/animation/curve/prototypeGLTF.js +4 -1
  54. package/src/engine/graphics/ecs/light/binding/LightBinding.d.ts +2 -0
  55. package/src/engine/graphics/ecs/light/binding/LightBinding.d.ts.map +1 -1
  56. package/src/engine/graphics/ecs/light/binding/LightBinding.js +16 -0
  57. package/src/engine/graphics/ecs/light/binding/fp/FPLightBinding.d.ts +13 -2
  58. package/src/engine/graphics/ecs/light/binding/fp/FPLightBinding.d.ts.map +1 -1
  59. package/src/engine/graphics/ecs/light/binding/fp/FPLightBinding.js +37 -4
  60. package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.d.ts.map +1 -1
  61. package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js +12 -8
  62. package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +1 -1
  63. package/src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.d.ts +0 -9
  64. package/src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.d.ts.map +1 -1
  65. package/src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.js +100 -129
  66. package/src/engine/graphics/sh3/path_tracer/PathTracer.d.ts.map +1 -1
  67. package/src/engine/graphics/sh3/path_tracer/PathTracer.js +6 -4
  68. package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +11 -4
  69. package/src/engine/graphics/sh3/path_tracer/sample_triangle_attribute.d.ts +2 -2
  70. package/src/engine/graphics/sh3/path_tracer/sample_triangle_attribute.js +2 -2
  71. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
  72. package/src/engine/graphics/texture/sampler/Sampler2D.js +6 -4
  73. package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.d.ts.map +1 -1
  74. package/src/engine/graphics/texture/sampler/convertSampler2D2DataURL.js +1 -2
  75. package/src/engine/graphics/texture/sampler/downloadSamplerAsPNG.d.ts +2 -2
  76. package/src/engine/graphics/texture/sampler/downloadSamplerAsPNG.d.ts.map +1 -1
  77. package/src/engine/graphics/texture/sampler/downloadSamplerAsPNG.js +3 -3
  78. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
  79. package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +5 -31
  80. package/src/engine/graphics/texture/virtual/VirtualTextureMaterial.d.ts +3 -6
  81. package/src/engine/graphics/texture/virtual/VirtualTextureMaterial.d.ts.map +1 -1
  82. package/src/engine/graphics/texture/virtual/VirtualTextureMaterial.js +8 -27
  83. package/src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.d.ts +4 -0
  84. package/src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.d.ts.map +1 -1
  85. package/src/engine/graphics/texture/virtual/VirtualTextureMemoryMapping.js +12 -0
  86. package/src/engine/graphics/texture/virtual/VirtualTextureSystem.d.ts +29 -0
  87. package/src/engine/graphics/texture/virtual/VirtualTextureSystem.d.ts.map +1 -0
  88. package/src/engine/graphics/texture/virtual/VirtualTextureSystem.js +102 -0
  89. package/src/engine/graphics/texture/virtual/VirtualTextureUsageUpdater.js +1 -1
  90. package/src/engine/graphics/texture/virtual/prototype.js +221 -79
  91. package/src/engine/navigation/grid/find_path_on_grid_astar.d.ts.map +1 -1
  92. package/src/engine/navigation/grid/find_path_on_grid_astar.js +18 -19
  93. package/src/engine/navigation/grid/find_path_on_grid_astar.spec.js +2 -2
  94. package/src/engine/ui/GUIEngine.js +1 -1
  95. package/src/generation/filtering/numeric/CellFilterCache.d.ts.map +1 -1
  96. package/src/generation/filtering/numeric/CellFilterCache.js +7 -7
  97. package/src/generation/filtering/numeric/complex/CellFilterFXAA.d.ts.map +1 -1
  98. package/src/generation/filtering/numeric/complex/CellFilterFXAA.js +9 -6
  99. package/src/generation/filtering/numeric/complex/CellFilterGaussianBlur.d.ts +1 -13
  100. package/src/generation/filtering/numeric/complex/CellFilterGaussianBlur.d.ts.map +1 -1
  101. package/src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js +39 -111
  102. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
  103. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +6 -5
  104. package/src/generation/grid/generation/util/buildDistanceMapToObjective.d.ts +1 -1
  105. package/src/generation/grid/generation/util/buildDistanceMapToObjective.d.ts.map +1 -1
  106. package/src/generation/grid/generation/util/buildDistanceMapToObjective.js +5 -12
  107. package/src/core/math/makeNextOdd.d.ts +0 -8
  108. package/src/core/math/makeNextOdd.d.ts.map +0 -1
  109. package/src/core/math/makeNextOdd.js +0 -15
@@ -1,3 +1,4 @@
1
+ import { max3 } from "../../../../../core/math/max3.js";
1
2
  import { LightType } from "../LightType.js";
2
3
 
3
4
  export class LightBinding {
@@ -16,6 +17,14 @@ export class LightBinding {
16
17
  this.__c_light = null;
17
18
  }
18
19
 
20
+ get scaled_distance() {
21
+ const scale = this.__c_transform.scale;
22
+ const scale_magnitude = max3(scale.x, scale.y, scale.z);
23
+ const light_radius = this.__c_light.distance.getValue();
24
+
25
+ return light_radius * scale_magnitude;
26
+ }
27
+
19
28
  set component_transform(v) {
20
29
  this.__c_transform = v;
21
30
  }
@@ -39,6 +48,7 @@ export class LightBinding {
39
48
  link(ctx) {
40
49
  this.__c_transform.position.onChanged.add(this.__apply_position, this);
41
50
  this.__c_transform.rotation.onChanged.add(this.__apply_rotation, this);
51
+ this.__c_transform.rotation.onChanged.add(this.__apply_scale, this);
42
52
 
43
53
  const l = this.__c_light;
44
54
 
@@ -64,6 +74,7 @@ export class LightBinding {
64
74
 
65
75
  this.__apply_position();
66
76
  this.__apply_rotation();
77
+ this.__apply_scale();
67
78
 
68
79
  this.applySettings(ctx.system.settings);
69
80
  }
@@ -75,6 +86,7 @@ export class LightBinding {
75
86
  unlink(ctx) {
76
87
  this.__c_transform.position.onChanged.remove(this.__apply_position, this);
77
88
  this.__c_transform.rotation.onChanged.remove(this.__apply_rotation, this);
89
+ this.__c_transform.rotation.onChanged.remove(this.__apply_scale, this);
78
90
 
79
91
  this.__c_light.intensity.onChanged.remove(this.__apply_intensity, this);
80
92
  this.__c_light.color.onChanged.remove(this.__apply_color, this);
@@ -92,6 +104,10 @@ export class LightBinding {
92
104
 
93
105
  }
94
106
 
107
+ __apply_scale(){
108
+
109
+ }
110
+
95
111
  __apply_intensity() {
96
112
 
97
113
  }
@@ -1,5 +1,15 @@
1
1
  export class FPLightBinding extends LightBinding {
2
- __light: PointLight;
2
+ /**
3
+ *
4
+ * @type {PointLight|null}
5
+ * @private
6
+ */
7
+ private __light;
8
+ /**
9
+ *
10
+ * @type {SignalBinding[]}
11
+ */
12
+ bindings: SignalBinding[];
3
13
  /**
4
14
  * @param {LightContext} ctx
5
15
  * @return {ForwardPlusRenderingPlugin}
@@ -8,7 +18,8 @@ export class FPLightBinding extends LightBinding {
8
18
  private getPlugin;
9
19
  link(ctx: any): void;
10
20
  unlink(ctx: any): void;
21
+ #private;
11
22
  }
12
23
  import { LightBinding } from "../LightBinding.js";
13
- import { PointLight } from "../../../../render/forward_plus/model/PointLight.js";
24
+ import { SignalBinding } from "../../../../../../core/events/signal/SignalBinding.js";
14
25
  //# sourceMappingURL=FPLightBinding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FPLightBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/light/binding/fp/FPLightBinding.js"],"names":[],"mappings":"AAGA;IAIQ,oBAAmB;IAGvB;;;;OAIG;IACH,kBAEC;IAED,qBA4BC;IAED,uBAUC;CACJ;6BA5D4B,oBAAoB;2BACtB,qDAAqD"}
1
+ {"version":3,"file":"FPLightBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/light/binding/fp/FPLightBinding.js"],"names":[],"mappings":"AAIA;IAIQ;;;;OAIG;IACH,gBAAmB;IAEnB;;;OAGG;IACH,UAFU,aAAa,EAAE,CAEP;IAGtB;;;;OAIG;IACH,kBAEC;IAMD,qBAwCC;IAED,uBAeC;;CACJ;6BA3F4B,oBAAoB;8BAFnB,uDAAuD"}
@@ -1,11 +1,23 @@
1
- import { LightBinding } from "../LightBinding.js";
1
+ import { SignalBinding } from "../../../../../../core/events/signal/SignalBinding.js";
2
2
  import { PointLight } from "../../../../render/forward_plus/model/PointLight.js";
3
+ import { LightBinding } from "../LightBinding.js";
3
4
 
4
5
  export class FPLightBinding extends LightBinding {
5
6
  constructor() {
6
7
  super();
7
8
 
9
+ /**
10
+ *
11
+ * @type {PointLight|null}
12
+ * @private
13
+ */
8
14
  this.__light = null;
15
+
16
+ /**
17
+ *
18
+ * @type {SignalBinding[]}
19
+ */
20
+ this.bindings = [];
9
21
  }
10
22
 
11
23
  /**
@@ -17,6 +29,10 @@ export class FPLightBinding extends LightBinding {
17
29
  return ctx.system.__plugin.getValue();
18
30
  }
19
31
 
32
+ #updateDistance() {
33
+ this.__light.radius.set(this.scaled_distance);
34
+ }
35
+
20
36
  link(ctx) {
21
37
  /**
22
38
  *
@@ -29,11 +45,17 @@ export class FPLightBinding extends LightBinding {
29
45
  const pl = new PointLight();
30
46
 
31
47
  const cLight = this.__c_light;
48
+ const cTransform = this.__c_transform;
49
+
50
+ this.bindings.push(
51
+ new SignalBinding(cLight.distance.onChanged, this.#updateDistance, this),
52
+ new SignalBinding(cTransform.scale.onChanged, this.#updateDistance, this)
53
+ );
32
54
 
33
55
  pl.intensity = cLight.intensity;
34
56
  pl.color = cLight.color;
35
- pl.radius = cLight.distance;
36
- pl.position = this.__c_transform.position;
57
+
58
+ pl.position = cTransform.position;
37
59
 
38
60
  /**
39
61
  *
@@ -42,9 +64,15 @@ export class FPLightBinding extends LightBinding {
42
64
  */
43
65
  cLight.__fp_light = pl;
44
66
 
67
+ this.__light = pl;
68
+
69
+ this.#updateDistance();
70
+
45
71
  lightManager.addLight(pl);
46
72
 
47
- this.__light = pl;
73
+ for (let i = 0; i < this.bindings.length; i++) {
74
+ this.bindings[i].link();
75
+ }
48
76
  }
49
77
 
50
78
  unlink(ctx) {
@@ -57,5 +85,10 @@ export class FPLightBinding extends LightBinding {
57
85
  const lightManager = fp.getLightManager();
58
86
 
59
87
  lightManager.removeLight(this.__light);
88
+
89
+ for (let i = 0; i < this.bindings.length; i++) {
90
+ this.bindings[i].unlink();
91
+ }
92
+ this.bindings.splice(0, this.bindings.length);
60
93
  }
61
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ThreeLightBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js"],"names":[],"mappings":"AAwEA;IAKQ;;;;OAIG;IACH,iBAAoB;IAEpB;;;;OAIG;IACH,qBAAwB;IAExB;;;;OAIG;IACH,qBAAiC;IAGrC,qBAYC;IAED,uBAcC;IAED;;;;OAIG;IACH,yBAEC;IAYD,+BAEC;IAUD,yBAuBC;IAED,2BAgBC;IAED,iCA0BC;IAGD,2BA0CC;IA0CD,mCA6BC;CAEJ;6BA3V4B,oBAAoB"}
1
+ {"version":3,"file":"ThreeLightBinding.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js"],"names":[],"mappings":"AAwEA;IAKQ;;;;OAIG;IACH,iBAAoB;IAEpB;;;;OAIG;IACH,qBAAwB;IAExB;;;;OAIG;IACH,qBAAiC;IAGrC,qBAYC;IAED,uBAcC;IAED;;;;OAIG;IACH,yBAEC;IAYD,+BAEC;IAUD,yBAuBC;IAED,2BAgBC;IAED,iCA0BC;IAGD,2BA0CC;IA8CD,mCA6BC;CAEJ;6BAzV4B,oBAAoB"}
@@ -1,12 +1,12 @@
1
- import { LightBinding } from "../LightBinding.js";
2
- import { threeEnsureLightObject } from "./threeEnsureLightObject.js";
3
- import { LightType } from "../../LightType.js";
4
- import { applyRotation } from "./applyRotation.js";
5
- import { threeUpdateTransform } from "../../../../util/threeUpdateTransform.js";
6
- import { ShadowMap } from "../../shadow/ShadowMap.js";
7
- import { CameraView } from "../../../../render/view/CameraView.js";
8
1
  import { DoubleSide, Mesh, MeshDepthMaterial, RGBADepthPacking, Scene } from "three";
9
2
  import { ThreeBypassRenderer } from "../../../../render/utils/ThreeBypassRenderer.js";
3
+ import { CameraView } from "../../../../render/view/CameraView.js";
4
+ import { threeUpdateTransform } from "../../../../util/threeUpdateTransform.js";
5
+ import { LightType } from "../../LightType.js";
6
+ import { ShadowMap } from "../../shadow/ShadowMap.js";
7
+ import { LightBinding } from "../LightBinding.js";
8
+ import { applyRotation } from "./applyRotation.js";
9
+ import { threeEnsureLightObject } from "./threeEnsureLightObject.js";
10
10
 
11
11
  const shadow_scene = new Scene();
12
12
  shadow_scene.autoUpdate = false;
@@ -147,7 +147,7 @@ export class ThreeLightBinding extends LightBinding {
147
147
  }
148
148
 
149
149
  __apply_distance(v) {
150
- this.__three_getLight().distance = this.__c_light.distance.getValue();
150
+ this.__three_getLight().distance = this.scaled_distance;
151
151
  }
152
152
 
153
153
  __apply_angle() {
@@ -314,6 +314,10 @@ export class ThreeLightBinding extends LightBinding {
314
314
  applyRotation(this.__c_light, this.__c_transform.rotation);
315
315
  }
316
316
 
317
+ __apply_scale() {
318
+ this.__three_getLight().distance = this.scaled_distance;
319
+ }
320
+
317
321
  applySettings(settings) {
318
322
  const light = this.__three_getLight();
319
323
 
@@ -1070,7 +1070,7 @@ function create_volume({
1070
1070
  *
1071
1071
  * @param {Vector3} position
1072
1072
  * @param {ParameterLookupTable} lut
1073
- * @return {{position: Vector1}}
1073
+ * @return {{position: Vector1, entity:Entity}}
1074
1074
  */
1075
1075
  function make_symbol_view({
1076
1076
  position,
@@ -34,15 +34,6 @@ export class GeometryBVHBatched {
34
34
  * @param {THREE.BufferGeometry} geometry
35
35
  */
36
36
  build(geometry: THREE.BufferGeometry): void;
37
- /**
38
- *
39
- * @param {number[]} output
40
- * @param {number} face_index
41
- * @param {number} t
42
- * @param {number} u
43
- * @param {number} v
44
- */
45
- construct_ray_hit(output: number[], face_index: number, t: number, u: number, v: number): void;
46
37
  /**
47
38
  *
48
39
  * @param {number[]} output
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryBVHBatched.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.js"],"names":[],"mappings":"AAwBA;IAEQ;;;;OAIG;IACH,cAAsB;IAEtB;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,yBAA4B;IAE5B;;;;OAIG;IACH,6BAAgC;IAGhC;;;;OAIG;IACH,yBAAyB;IAG7B;;;OAGG;IACH,gBAFW,MAAM,cAAc,QAwB9B;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,EAAE,cACR,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,QAuDhB;IAED;;;;;;;OAOG;IACH,gBANW,MAAM,EAAE,OACR,MAAM,EAAE,gBACR,MAAM,gBACN,MAAM,GACJ,MAAM,CA4GlB;CACJ"}
1
+ {"version":3,"file":"GeometryBVHBatched.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.js"],"names":[],"mappings":"AA4FA;IAEQ;;;;OAIG;IACH,cAAsB;IAEtB;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,yBAA4B;IAE5B;;;;OAIG;IACH,6BAAgC;IAGhC;;;;OAIG;IACH,yBAAyB;IAG7B;;;OAGG;IACH,gBAFW,MAAM,cAAc,QAyB9B;IAGD;;;;;;;OAOG;IACH,gBANW,MAAM,EAAE,OACR,MAAM,EAAE,gBACR,MAAM,gBACN,MAAM,GACJ,MAAM,CAwElB;CACJ"}
@@ -1,26 +1,94 @@
1
1
  import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
2
2
  import { ebvh_build_for_geometry_morton } from "../../../../core/bvh2/bvh3/ebvh_build_for_geometry_morton.js";
3
- import { bvh_query_leaves_ray } from "../../../../core/bvh2/bvh3/query/bvh_query_leaves_ray.js";
4
- import {
5
- aabb3_signed_distance_sqr_to_point
6
- } from "../../../../core/geom/3d/aabb/aabb3_signed_distance_sqr_to_point.js";
3
+ import { bvh_query_user_data_ray } from "../../../../core/bvh2/bvh3/query/bvh_query_user_data_ray.js";
4
+
7
5
  import {
8
- computeTriangleRayIntersectionBarycentric
9
- } from "../../../../core/geom/3d/triangle/computeTriangleRayIntersectionBarycentric.js";
6
+ computeTriangleRayIntersectionBarycentricGeometry
7
+ } from "../../../../core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricGeometry.js";
10
8
 
11
9
  /**
12
10
  *
13
11
  * @type {number[]}
14
12
  */
15
- const leaf_buffer = [];
13
+ const scratch_uint32_array = [];
16
14
  /**
17
15
  *
18
16
  * @type {number[]}
19
17
  */
20
18
  const v3_scratch_0 = [];
21
19
 
22
- const temp_aabb3 = new Float32Array(6);
23
-
20
+ /**
21
+ *
22
+ * @param {number[]} output
23
+ * @param {number[]} indices
24
+ * @param {number[]} positions
25
+ * @param {number} face_index
26
+ * @param {number} t
27
+ * @param {number} u
28
+ * @param {number} v
29
+ */
30
+ function construct_ray_hit(
31
+ output,
32
+ indices, positions,
33
+ face_index,
34
+ t, u, v
35
+ ) {
36
+
37
+ const index_offset = face_index * 3;
38
+
39
+ const a = indices[index_offset];
40
+ const b = indices[index_offset + 1];
41
+ const c = indices[index_offset + 2];
42
+
43
+ const a_address = a * 3;
44
+ const b_address = b * 3;
45
+ const c_address = c * 3;
46
+
47
+ const ax = positions[a_address];
48
+ const ay = positions[a_address + 1];
49
+ const az = positions[a_address + 2];
50
+
51
+ const bx = positions[b_address];
52
+ const by = positions[b_address + 1];
53
+ const bz = positions[b_address + 2];
54
+
55
+ const cx = positions[c_address];
56
+ const cy = positions[c_address + 1];
57
+ const cz = positions[c_address + 2];
58
+
59
+ // normal
60
+
61
+ // edge1 = a - b
62
+ const edge1_x = bx - ax;
63
+ const edge1_y = by - ay;
64
+ const edge1_z = bz - az;
65
+
66
+ // edge2 = c - a
67
+ const edge2_x = cx - ax;
68
+ const edge2_y = cy - ay;
69
+ const edge2_z = cz - az;
70
+
71
+ // compute position of intersection point
72
+ output[0] = ax + edge1_x * u + edge2_x * v;
73
+ output[1] = ay + edge1_y * u + edge2_y * v;
74
+ output[2] = az + edge1_z * u + edge2_z * v;
75
+
76
+ // Compute triangle normal
77
+
78
+ // normal = edge1 x edge2
79
+ const normal_x = edge1_y * edge2_z - edge1_z * edge2_y;
80
+ const normal_y = edge1_z * edge2_x - edge1_x * edge2_z;
81
+ const normal_z = edge1_x * edge2_y - edge1_y * edge2_x
82
+
83
+ output[3] = normal_x;
84
+ output[4] = normal_y;
85
+ output[5] = normal_z;
86
+
87
+ output[6] = t;
88
+ output[7] = u;
89
+ output[8] = v;
90
+ output[9] = face_index;
91
+ }
24
92
 
25
93
  export class GeometryBVHBatched {
26
94
  constructor() {
@@ -86,71 +154,10 @@ export class GeometryBVHBatched {
86
154
  //
87
155
  // ebvh_build_for_geometry_incremental(bvh, index_array, array_positions, 1);
88
156
 
157
+ // remove any extra unused space
89
158
  bvh.trim();
90
159
  }
91
160
 
92
- /**
93
- *
94
- * @param {number[]} output
95
- * @param {number} face_index
96
- * @param {number} t
97
- * @param {number} u
98
- * @param {number} v
99
- */
100
- construct_ray_hit(output, face_index, t, u, v) {
101
- const indices = this.__geometry_index;
102
- const positions = this.__geometry_positions;
103
-
104
- const index_offset = face_index * 3;
105
-
106
- const a = indices[index_offset];
107
- const b = indices[index_offset + 1];
108
- const c = indices[index_offset + 2];
109
-
110
- const a_address = a * 3;
111
- const b_address = b * 3;
112
- const c_address = c * 3;
113
-
114
- const ax = positions[a_address];
115
- const ay = positions[a_address + 1];
116
- const az = positions[a_address + 2];
117
-
118
- const bx = positions[b_address];
119
- const by = positions[b_address + 1];
120
- const bz = positions[b_address + 2];
121
-
122
- const cx = positions[c_address];
123
- const cy = positions[c_address + 1];
124
- const cz = positions[c_address + 2];
125
-
126
- // normal
127
-
128
- // edge1 = a - b
129
- const edge1_x = bx - ax;
130
- const edge1_y = by - ay;
131
- const edge1_z = bz - az;
132
-
133
- // edge2 = c - a
134
- const edge2_x = cx - ax;
135
- const edge2_y = cy - ay;
136
- const edge2_z = cz - az;
137
-
138
- // Compute triangle normal
139
-
140
- // normal = edge1 x edge2
141
- const normal_x = edge1_y * edge2_z - edge1_z * edge2_y;
142
- const normal_y = edge1_z * edge2_x - edge1_x * edge2_z;
143
- const normal_z = edge1_x * edge2_y - edge1_y * edge2_x
144
-
145
- output[3] = normal_x;
146
- output[4] = normal_y;
147
- output[5] = normal_z;
148
-
149
- output[6] = t;
150
- output[7] = u;
151
- output[8] = v;
152
- output[9] = face_index;
153
- }
154
161
 
155
162
  /**
156
163
  *
@@ -176,77 +183,44 @@ export class GeometryBVHBatched {
176
183
  const bvh = this.__bvh;
177
184
 
178
185
  // TODO we can unify BVH traversal with ray checks to reduce number of checks
179
- const count = bvh_query_leaves_ray(
186
+ const count = bvh_query_user_data_ray(
180
187
  bvh, bvh.root,
181
- leaf_buffer, 0,
188
+ scratch_uint32_array, 0,
182
189
  origin_x, origin_y, origin_z,
183
190
  direction_x, direction_y, direction_z
184
191
  );
185
192
 
193
+ if (count === 0) {
194
+ // no bvh hit, early exit
195
+ return -1;
196
+ }
197
+
186
198
  let best_t = max_distance;
187
199
 
188
200
  let best_index = -1;
189
201
  let best_u = 0;
190
202
  let best_v = 0;
191
203
 
204
+ // check triangles found via BVH
192
205
  for (let i = 0; i < count; i++) {
193
- const node_id = leaf_buffer[i];
194
-
195
-
196
- if (best_t < max_distance) {
197
- // early bail-out
198
-
199
- bvh.node_get_aabb(node_id, temp_aabb3);
200
-
201
- const distance = aabb3_signed_distance_sqr_to_point(
202
- temp_aabb3[0], temp_aabb3[1], temp_aabb3[2],
203
- temp_aabb3[3], temp_aabb3[4], temp_aabb3[5],
204
- ray[0], ray[1], ray[2]
205
- );
206
-
207
- if (distance > best_t * best_t) {
208
- // whole AABB is too far
209
- continue;
210
- }
211
- }
212
-
213
- const triangle_index = bvh.node_get_user_data(node_id);
206
+ const triangle_index = scratch_uint32_array[i];
214
207
 
215
- const index_offset = triangle_index * 3;
216
-
217
- const a = indices[index_offset];
218
- const b = indices[index_offset + 1];
219
- const c = indices[index_offset + 2];
220
-
221
-
222
- const a_address = a * 3;
223
- const b_address = b * 3;
224
- const c_address = c * 3;
225
-
226
-
227
- const ax = positions[a_address];
228
- const ay = positions[a_address + 1];
229
- const az = positions[a_address + 2];
230
-
231
- const bx = positions[b_address];
232
- const by = positions[b_address + 1];
233
- const bz = positions[b_address + 2];
234
-
235
- const cx = positions[c_address];
236
- const cy = positions[c_address + 1];
237
- const cz = positions[c_address + 2];
238
-
239
- const intersection_found = computeTriangleRayIntersectionBarycentric(
208
+ const intersection_found = computeTriangleRayIntersectionBarycentricGeometry(
240
209
  v3_scratch_0,
241
210
  origin_x, origin_y, origin_z,
242
211
  direction_x, direction_y, direction_z,
243
- ax, ay, az,
244
- bx, by, bz,
245
- cx, cy, cz
212
+ indices, triangle_index,
213
+ positions
246
214
  );
247
215
 
248
- if (intersection_found && v3_scratch_0[0] < best_t && v3_scratch_0[0] > min_distance) {
249
- best_t = v3_scratch_0[0];
216
+ if (!intersection_found) {
217
+ continue;
218
+ }
219
+
220
+ const t = v3_scratch_0[0];
221
+
222
+ if (t < best_t && t > min_distance) {
223
+ best_t = t;
250
224
 
251
225
  best_index = triangle_index;
252
226
  best_u = v3_scratch_0[1];
@@ -256,14 +230,11 @@ export class GeometryBVHBatched {
256
230
  }
257
231
 
258
232
  if (best_t === max_distance) {
233
+ // no hit
259
234
  return -1;
260
235
  }
261
236
 
262
- output[0] = origin_x + direction_x * best_t;
263
- output[1] = origin_y + direction_y * best_t;
264
- output[2] = origin_z + direction_z * best_t;
265
-
266
- this.construct_ray_hit(output, best_index, best_t, best_u, best_v);
237
+ construct_ray_hit(output, indices, positions, best_index, best_t, best_u, best_v);
267
238
 
268
239
  return best_t;
269
240
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PathTracer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/path_tracer/PathTracer.js"],"names":[],"mappings":";AAgEA;IAGQ;;;OAGG;IACH,eAFU,GAAG,CAEiB;IAE9B;;;OAGG;IACH,QAFU,IAAI,MAAM,EAAE,cAAc,CAAC,CAEd;IAEvB;;;OAGG;IACH,UAFU,eAAe,CAEP;IAElB;;;OAGG;IACH,WAFU,IAAI,MAAM,cAAc,EAAE,kBAAkB,CAAC,CAE7B;IAE1B;;;OAGG;IACH,UAFU,IAAI,MAAM,YAAY,CAEP;IAEzB;;;;OAIG;IACH,6BAA8C;IAGlD;;;;OAIG;IACH,uBAHW,MAAM,cAAc,GACnB,kBAAkB,CAgB7B;IAED,iBAGC;IAED,uBAoCC;IAED;;;OAGG;IACH,qCAEC;IAED;;;;;OAKG;IACH,aAJW,MAAM,cAAc,YACpB,MAAM,QAAQ,aACd,IAAI,GAAC,MAAM,EAAE,QA6CvB;IAED;;;;;;OAMG;IACH,oBALW,MAAM,EAAE,uBAER,MAAM,KACN,MAAM,QA+ChB;IAED;;;;OAIG;IACH,qBAHW,MAAM,EAAE,OACR,MAAM,EAAE,QAiFlB;IAED;;;;;;;OAOG;IACH,WANW,MAAM,EAAE,OACR,MAAM,EAAE,gBACR,MAAM,gBACN,MAAM,GACL,MAAM,CAyCjB;IAED;;;;;;OAMG;IACH,uBALW,MAAM,EAAE,cACR,MAAM,aACN,MAAM,EAAE,oBACR,MAAM,QAIhB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,EAAE,cACR,MAAM,OACN,MAAM,EAAE,eACR,MAAM,WAgEhB;IAED,gGAyDC;CACJ;oBAniBmB,mCAAmC;+BAexB,qBAAqB;mCAHjB,yBAAyB;qBAtBjC,WAAW"}
1
+ {"version":3,"file":"PathTracer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/path_tracer/PathTracer.js"],"names":[],"mappings":";AAgEA;IAGQ;;;OAGG;IACH,eAFU,GAAG,CAEiB;IAE9B;;;OAGG;IACH,QAFU,IAAI,MAAM,EAAE,cAAc,CAAC,CAEd;IAEvB;;;OAGG;IACH,UAFU,eAAe,CAEP;IAElB;;;OAGG;IACH,WAFU,IAAI,MAAM,cAAc,EAAE,kBAAkB,CAAC,CAE7B;IAE1B;;;OAGG;IACH,UAFU,IAAI,MAAM,YAAY,CAEP;IAEzB;;;;OAIG;IACH,6BAA8C;IAGlD;;;;OAIG;IACH,uBAHW,MAAM,cAAc,GACnB,kBAAkB,CAgB7B;IAED,iBAGC;IAED,uBAoCC;IAED;;;OAGG;IACH,qCAEC;IAED;;;;;OAKG;IACH,aAJW,MAAM,cAAc,YACpB,MAAM,QAAQ,aACd,IAAI,GAAC,MAAM,EAAE,QA6CvB;IAED;;;;;;OAMG;IACH,oBALW,MAAM,EAAE,uBAER,MAAM,KACN,MAAM,QA+ChB;IAED;;;;OAIG;IACH,qBAHW,MAAM,EAAE,OACR,MAAM,EAAE,QAmFlB;IAED;;;;;;;OAOG;IACH,WANW,MAAM,EAAE,OACR,MAAM,EAAE,gBACR,MAAM,gBACN,MAAM,GACL,MAAM,CAyCjB;IAED;;;;;;OAMG;IACH,uBALW,MAAM,EAAE,cACR,MAAM,aACN,MAAM,EAAE,oBACR,MAAM,QAIhB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,EAAE,cACR,MAAM,OACN,MAAM,EAAE,eACR,MAAM,WAgEhB;IAED,gGAyDC;CACJ;oBAriBmB,mCAAmC;+BAexB,qBAAqB;mCAHjB,yBAAyB;qBAtBjC,WAAW"}
@@ -261,7 +261,7 @@ export class PathTracer {
261
261
  case LinearFilter:
262
262
  case LinearMipmapLinearFilter:
263
263
 
264
- sampler.sampleBicubicUV(_u, _v, out);
264
+ sampler.sampleBilinearUV(_u, _v, out);
265
265
  break;
266
266
  }
267
267
 
@@ -348,9 +348,11 @@ export class PathTracer {
348
348
  const material = mesh.material;
349
349
 
350
350
  if (material.isMeshStandardMaterial) {
351
- out[0] *= material.color.r;
352
- out[1] *= material.color.g;
353
- out[2] *= material.color.b;
351
+ const material_color = material.color;
352
+
353
+ out[0] *= material_color.r;
354
+ out[1] *= material_color.g;
355
+ out[2] *= material_color.b;
354
356
 
355
357
  const diffuse_map = material.map;
356
358
 
@@ -67,6 +67,12 @@ vCanvas.css({
67
67
  overflow: "visible"
68
68
  });
69
69
 
70
+ /**
71
+ * How many rays to use per-pixel
72
+ * @type {number}
73
+ */
74
+ const PIXEL_SAMPLE_COUNT = 256;
75
+
70
76
  const pt = new PathTracer();
71
77
 
72
78
  const gltfLoader = new GLTFLoader();
@@ -380,6 +386,7 @@ async function prepare_scene_rtiow(pt, camera) {
380
386
 
381
387
  }
382
388
 
389
+
383
390
  /**
384
391
  *
385
392
  * @param {Sampler2D} target
@@ -415,7 +422,7 @@ function* render(target, pt, camera, progress = { current: 0, total: 0 }) {
415
422
  const pixel_scale_x = 1 / (width - 1);
416
423
  const pixel_scale_y = 1 / (height - 1);
417
424
 
418
- const pixel_sample_count = 4;
425
+ const pixel_sample_count = PIXEL_SAMPLE_COUNT;
419
426
 
420
427
  progress.total = width * height;
421
428
 
@@ -523,11 +530,11 @@ async function start_renderer(camera) {
523
530
 
524
531
  // await prepare_scene_lucy(pt, camera);
525
532
  // await prepare_scene_rtiow(pt, camera);
526
- await prepare_scene_sphere_01(pt, camera);
527
- // await prepare_scene_gltf(pt, camera, path);
533
+ // await prepare_scene_sphere_01(pt, camera);
534
+ await prepare_scene_gltf(pt, camera, path);
528
535
 
529
536
  pt.build();
530
- pt.optimize();
537
+ // pt.optimize();
531
538
 
532
539
  const pixelRatio = 1;
533
540
 
@@ -7,8 +7,8 @@
7
7
  * @param {number} c vertex index 0
8
8
  * @param {number[]} attribute_array
9
9
  * @param {number} dimensions
10
- * @param {number} u
11
- * @param {number} v
10
+ * @param {number} u Barycentric coordinate
11
+ * @param {number} v Barycentric coordinate
12
12
  */
13
13
  export function sample_triangle_attribute(out: number[], out_offset: number, a: number, b: number, c: number, attribute_array: number[], dimensions: number, u: number, v: number): void;
14
14
  //# sourceMappingURL=sample_triangle_attribute.d.ts.map
@@ -7,8 +7,8 @@
7
7
  * @param {number} c vertex index 0
8
8
  * @param {number[]} attribute_array
9
9
  * @param {number} dimensions
10
- * @param {number} u
11
- * @param {number} v
10
+ * @param {number} u Barycentric coordinate
11
+ * @param {number} v Barycentric coordinate
12
12
  */
13
13
  export function sample_triangle_attribute(
14
14
  out, out_offset,
@@ -1 +1 @@
1
- {"version":3,"file":"Sampler2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IAg8BI;;;;;;OAMG;IACH,6DAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,uDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,uDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,qDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,wDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,wDAFY,SAAS,CAKpB;IAziCD;;;;;;;OAOG;IACH,mBANW,UAAU,MAAM,CAAC,GAAC,MAAM,EAAE,GAAC,iBAAiB,GAAC,UAAU,GAAC,WAAW,GAAC,WAAW,GAAC,SAAS,GAAC,UAAU,GAAC,UAAU,GAAC,YAAY,GAAC,YAAY,aACzI,MAAM,UACN,MAAM,WACN,MAAM,EAmDhB;IA7BG;;;OAGG;IACH,cAAkB;IAElB;;;OAGG;IACH,eAAoB;IAEpB;;;OAGG;IACH,iBAAwB;IAExB;;;OAGG;IACH,MAFU,MAAM,EAAE,GAAC,iBAAiB,GAAC,UAAU,GAAC,WAAW,GAAC,WAAW,GAAC,SAAS,GAAC,UAAU,GAAC,UAAU,GAAC,YAAY,GAAC,YAAY,CAEjH;IAEhB;;;OAGG;IACH,SAFU,MAAM,CAEA;IAGpB;;;;;;;OAOG;IACH,OALW,MAAM,KACN,MAAM,UACN,qCAA+B,GAC7B,MAAM,CAIl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N,2BAAuB,OAajC;IAED;;;;;OAKG;IACH,eAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,mBAHW,MAAM,yBAUhB;IAED;;;;;;;;;OASG;IACH,aARW,SAAS,qHAoDnB;IAGD;;;;;;;OAOG;IACH,oEA8BC;IAED;;;;OAIG;IACH,2BAHW,MAAM,SACN,MAAM,QAYhB;IAED;;;;;;;OAOG;IACH,iEAFW,aAAc,QAqCxB;IAED;;;;;;OAMG;IACH,gBALW,MAAM,KACN,MAAM,WACN,MAAM,SACN,MAAM,QAqBhB;IAED;;;;;OAKG;IACH,OAJW,MAAM,KACN,MAAM,SACN,MAAM,EAAE,GAAC,YAAY,QAe/B;IAED;;;;;;;OAOG;IACH,wBALW,MAAM,WACN,MAAM,UACN,MAAM,sBAyBhB;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,iBACN,OAAO,QAyDjB;IAED;;;OAGG;IACH,mBAFY,MAAM,CAYjB;IAED;;;;OAIG;IACH,cAHW,SAAS,GACR,OAAO,CAYlB;IAED;;;OAGG;IACH,QAFY,MAAM,CAYjB;IAGD;;OAEG;IACH,SAFa,SAAS,CAerB;IAED;;;;;;MAUC;IAED;;;;;;aAwBC;IAgHL;;;OAGG;IACH,sBAFU,OAAO,CAEc;CAN9B;;kBAUS,MAAM"}
1
+ {"version":3,"file":"Sampler2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH;IAk8BI;;;;;;OAMG;IACH,6DAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,uDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,uDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,qDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IAC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