@woosh/meep-engine 3.60.5 → 3.60.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +1 -1
  3. package/src/shade/renderer/Renderer.d.ts +11 -0
  4. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  5. package/src/shade/renderer/Renderer.js +43 -1
  6. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +26 -43
  7. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  8. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +109 -117
  9. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +20 -2
  10. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
  11. package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +66 -2
  12. package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.d.ts +19 -0
  13. package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.d.ts.map +1 -0
  14. package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.js +25 -0
  15. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +15 -0
  16. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -1
  17. package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +38 -0
  18. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +28 -59
  19. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts.map +1 -1
  20. package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +84 -789
  21. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +2 -1
  22. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
  23. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +2 -1
  24. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -2
  25. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js +2 -2
  26. package/src/shade/renderer/material/GPUMaterialManager.d.ts +4 -1
  27. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  28. package/src/shade/renderer/material/GPUMaterialManager.js +5 -8
  29. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +7 -3
  30. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
  31. package/src/shade/renderer/postprocess/gtao/GTAO.js +26 -13
  32. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts +14 -0
  33. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
  34. package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +196 -68
  35. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.d.ts.map +1 -1
  36. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.js +42 -28
  37. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.d.ts.map +1 -1
  38. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.js +429 -414
  39. package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.d.ts +16 -0
  40. package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.d.ts.map +1 -0
  41. package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.js +156 -0
  42. package/src/shade/renderer/scene/GPUSceneContext.d.ts +2 -2
  43. package/src/shade/renderer/scene/GPUSceneContext.js +5 -5
  44. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts +0 -47
  45. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts.map +0 -1
  46. package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.js +0 -80
  47. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts +0 -16
  48. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts.map +0 -1
  49. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.js +0 -67
  50. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts +0 -17
  51. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts.map +0 -1
  52. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.js +0 -145
  53. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts +0 -12
  54. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts.map +0 -1
  55. package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.js +0 -105
@@ -1,91 +1,60 @@
1
1
  /**
2
- * The geometry caches of virtual geometry (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): a
3
- * {@link MeshSDFSource} of {@link GPUGeometrySDFManager}, which bakes a geometry's field from its tree, and a virtual
4
- * geometry has none. Each virtual geometry whose cache is asked for gets a proxy, the triangles of a cut of it, baked by
5
- * the mesh path as any geometry is, and its resident cache adopted into the geometry. Its instances are then composed
6
- * from it as a mesh's are.
2
+ * The geometry caches and cards of virtual geometry (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, §17).
3
+ * {@link GPUGeometrySDFManager} bakes a geometry's field from its tree and captures its cards through its meshlets, and
4
+ * a virtual geometry has neither.
7
5
  *
8
- * **The cut.** A geometry is cut whole by the camera cut's own descent (`shader_vgeo_sdf_traverse`), at an error under
9
- * half its cache's level-0 voxel, in its own space, under a feedback slot of the extraction's own: a cluster's page not
10
- * resident is wanted there, as a view's are, and since a want lasts one reading the job is cut again each frame until
11
- * its cut stands nothing in. Its counters are read back each frame.
6
+ * Each virtual geometry whose cache is asked for gets its proxy ({@link VirtualGeometry#get_proxy}): an ordinary
7
+ * geometry in the same local space, with its attributes. The proxy is added to the geometry manager and the virtual
8
+ * geometry aliased to it ({@link GPUGeometrySDFManager#alias}). From there the proxy is any geometry: the virtual
9
+ * geometry's holders hold its cache, baked from its tree, and the virtual geometry's card sets capture its layout,
10
+ * drawn through its meshlets with the virtual geometry's own materials.
12
11
  *
13
- * **The mesh.** The frame after a cut that stood nothing in, the job's clusters are written out too, its vertices as
14
- * stored and its triangles as indices into them (`shader_vgeo_sdf_decode`), in room the last cut's counts made, and
15
- * read back with that frame's counters. A frame that cut it otherwise (a page evicted since, the cut grown) is not
16
- * taken, and the job is cut again.
12
+ * **The proxy's detail is its own**, not the cache's voxel's: a proxy coarser than the voxel bakes a coarser field and
13
+ * coarser cards than the asset would. A known discrepancy, kept: a hit on virtual geometry has a material at all.
17
14
  *
18
- * **The proxy.** One a frame, on the host: an ordinary geometry built from the mesh
19
- * (`meshlet_geometry_build_from_geometry`, which costs 2.2 to 4.1 µs a triangle, measured), added to the geometry
20
- * manager, its cache held with the side the geometry's holders draw. When its bake turns resident the next update gives
21
- * it to the geometry ({@link GPUGeometrySDFManager#adopt}) and removes the proxy.
22
- *
23
- * A geometry no longer asked for when its turn comes is let go, and one whose holders ask again is extracted again.
24
- * Settings that change the caches' voxel restart every job.
15
+ * A proxy is applied as it arrives, which is between frames: adding a geometry grows the geometry manager's buffers,
16
+ * which a frame's passes must not find replaced under them. A virtual geometry the geometry manager lets go takes its
17
+ * proxy with it; one let go before its proxy arrives has none applied. A proxy that cannot be had leaves its geometry
18
+ * waiting, black.
25
19
  */
26
20
  export class VGeoSDFProxies {
27
21
  /**
28
22
  * @param {Object} options
29
- * @param {GPUDevice} options.device
30
- * @param {GPUVirtualGeometryRuntime} options.runtime whose geometries' caches this makes
31
23
  * @param {GPUGeometryManager} options.geometries the scene's, whose caches the virtual geometries' are
32
- * @param {number} [options.job_capacity] geometries extracted at once
33
24
  */
34
- constructor({ device, runtime, geometries, job_capacity }: {
35
- device: GPUDevice;
36
- runtime: GPUVirtualGeometryRuntime;
25
+ constructor({ geometries }: {
37
26
  geometries: GPUGeometryManager;
38
- job_capacity?: number;
39
27
  });
40
28
  /**
41
- * The extraction's cut, whose `stats` say what the last reading of its slot counted.
42
- * @returns {VGeoViewCut}
43
- */
44
- get cut(): VGeoViewCut;
45
- /**
46
- * Geometries being extracted.
47
- * @returns {number}
48
- */
49
- get job_count(): number;
50
- /**
51
- * Geometries asked for that wait for a job, those let go since included.
29
+ * Virtual geometries whose proxy is asked for and has not arrived.
52
30
  * @returns {number}
53
31
  */
54
- get requested_count(): number;
32
+ get pending_count(): number;
55
33
  /**
56
- * Proxies built so far.
34
+ * Virtual geometries standing in through their proxy.
57
35
  * @returns {number}
58
36
  */
59
- get extracted_count(): number;
37
+ get applied_count(): number;
60
38
  /**
61
- * Caches given to their geometries so far.
39
+ * Proxies that could not be had.
62
40
  * @returns {number}
63
41
  */
64
- get adopted_count(): number;
42
+ get failed_count(): number;
65
43
  /**
66
- * Triangles of the proxies built so far.
67
- * @returns {number}
68
- */
69
- get triangles_extracted(): number;
70
- /**
71
- * Entries the cluster list holds.
72
- * @returns {number}
44
+ * The proxy a virtual geometry stands in through, once applied.
45
+ *
46
+ * @param {GPUGeometryMetadata} record the virtual geometry's
47
+ * @returns {MeshletGeometry|undefined}
73
48
  */
74
- get cluster_capacity(): number;
49
+ proxy_of(record: GPUGeometryMetadata): MeshletGeometry | undefined;
75
50
  /**
76
- * The frame's work, ahead of the caches' bake: the caches baked given to their geometries, a proxy built, jobs
77
- * started, and the jobs' cut recorded into `graph` while the runtime's frame is open.
78
- *
79
- * @param {FrameGraph} graph
51
+ * Hear no more of the caches. The proxies applied stay with the geometry manager, as stand-ins their geometries
52
+ * are aliased to: removing one under its alias would leave its geometry's holders holding a geometry let go.
80
53
  */
81
- graph_update(graph: FrameGraph): void;
82
54
  destroy(): void;
83
55
  #private;
84
56
  }
85
- export type FrameGraph = import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
86
57
  export type GPUGeometryManager = import("../../GPUGeometryManager.js").GPUGeometryManager;
87
58
  export type GPUGeometryMetadata = import("../../GPUGeometryMetadata.js").GPUGeometryMetadata;
88
59
  export type MeshletGeometry = import("../../MeshletGeometry.js").MeshletGeometry;
89
- export type GPUVirtualGeometryRuntime = import("../runtime/GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime;
90
- import { VGeoViewCut } from "../runtime/VGeoViewCut.js";
91
60
  //# sourceMappingURL=VGeoSDFProxies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoSDFProxies.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js"],"names":[],"mappings":"AAiJA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH;IAmEI;;;;;;OAMG;IACH;QAL8B,MAAM;QACU,OAAO,EAA1C,yBAAyB;QACG,UAAU,EAAtC,kBAAkB;QACD,YAAY,GAA7B,MAAM;OA8ChB;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,wBAUC;IAED;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,kCAEC;IAED;;;OAGG;IACH,+BAEC;IAsBD;;;;;OAKG;IACH,oBAFW,UAAU,QAsBpB;IA+dD,gBAqBC;;CACJ;yBAj2BY,OAAO,iEAAiE,EAAE,UAAU;iCACpF,OAAO,6BAA6B,EAAE,kBAAkB;kCACxD,OAAO,8BAA8B,EAAE,mBAAmB;8BAC1D,OAAO,0BAA0B,EAAE,eAAe;wCAClD,OAAO,yCAAyC,EAAE,yBAAyB;4BAjB5D,2BAA2B"}
1
+ {"version":3,"file":"VGeoSDFProxies.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAwBI;;;OAGG;IACH;QAFuC,UAAU,EAAtC,kBAAkB;OAU5B;IAED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,4BAEC;IAED;;;OAGG;IACH,2BAEC;IAED;;;;;OAKG;IACH,iBAHW,mBAAmB,GACjB,eAAe,GAAC,SAAS,CAMrC;IAgED;;;OAGG;IACH,gBAcC;;CACJ;iCAjMY,OAAO,6BAA6B,EAAE,kBAAkB;kCACxD,OAAO,8BAA8B,EAAE,mBAAmB;8BAC1D,OAAO,0BAA0B,EAAE,eAAe"}