@woosh/meep-engine 3.74.0 → 3.75.0

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 (161) hide show
  1. package/CHANGELOG.md +20 -19
  2. package/package.json +1 -1
  3. package/src/core/geom/2d/hilbert/v2_hilbert_encode.d.ts +11 -0
  4. package/src/core/geom/2d/hilbert/v2_hilbert_encode.d.ts.map +1 -0
  5. package/src/core/geom/2d/hilbert/v2_hilbert_encode.js +46 -0
  6. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +6 -0
  7. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
  8. package/src/engine/graphics/render/frame_graph/FrameGraph.js +9 -0
  9. package/src/engine/graphics3/GPUAcousticSystem.d.ts +29 -32
  10. package/src/engine/graphics3/GPUAcousticSystem.d.ts.map +1 -1
  11. package/src/engine/graphics3/GPUAcousticSystem.js +87 -162
  12. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  13. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  14. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +35 -17
  15. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  16. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +2 -3
  17. package/src/engine/sound/simulation/AcousticSimulator.d.ts +7 -0
  18. package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
  19. package/src/engine/sound/simulation/AcousticSimulator.js +27 -0
  20. package/src/engine/sound/simulation/README.md +121 -107
  21. package/src/engine/sound/sopra/README.md +8 -3
  22. package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.d.ts +2 -2
  23. package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.d.ts.map +1 -1
  24. package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.js +4 -3
  25. package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.d.ts +118 -0
  26. package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.d.ts.map +1 -0
  27. package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.js +472 -0
  28. package/src/engine/sound/sopra/runtime/AcousticReverbLines.d.ts +166 -0
  29. package/src/engine/sound/sopra/runtime/AcousticReverbLines.d.ts.map +1 -0
  30. package/src/engine/sound/sopra/runtime/AcousticReverbLines.js +447 -0
  31. package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.d.ts +69 -113
  32. package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.d.ts.map +1 -1
  33. package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.js +143 -491
  34. package/src/engine/sound/sopra/runtime/AcousticSpeakers.d.ts +102 -0
  35. package/src/engine/sound/sopra/runtime/AcousticSpeakers.d.ts.map +1 -0
  36. package/src/engine/sound/sopra/runtime/AcousticSpeakers.js +232 -0
  37. package/src/engine/sound/sopra/runtime/BusGraph.d.ts +17 -3
  38. package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
  39. package/src/engine/sound/sopra/runtime/BusGraph.js +55 -5
  40. package/src/engine/sound/sopra/runtime/EventInstance.d.ts +8 -6
  41. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  42. package/src/engine/sound/sopra/runtime/EventInstance.js +113 -105
  43. package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.d.ts +13 -0
  44. package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.d.ts.map +1 -0
  45. package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.js +15 -0
  46. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
  47. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +4 -6
  48. package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
  49. package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +4 -5
  50. package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
  51. package/src/shade/playground/skinned_blas_refit/main.js +6 -12
  52. package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
  53. package/src/shade/playground/skinned_mesh_soup/main.js +1 -2
  54. package/src/shade/playground/vgeo_scene/README.md +12 -2
  55. package/src/shade/playground/vgeo_scene/main.js +1 -1
  56. package/src/shade/playground/volumetrics_froxel/README.md +191 -191
  57. package/src/shade/playground/volumetrics_froxel/measure.d.ts +3 -3
  58. package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
  59. package/src/shade/playground/volumetrics_froxel/measure.js +11 -13
  60. package/src/shade/playground/vsm/main.d.ts.map +1 -1
  61. package/src/shade/playground/vsm/main.js +5 -6
  62. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  63. package/src/shade/renderer/Renderer.js +31 -8
  64. package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.d.ts +28 -0
  65. package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.d.ts.map +1 -0
  66. package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.js +42 -0
  67. package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.d.ts +58 -0
  68. package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.d.ts.map +1 -0
  69. package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.js +108 -0
  70. package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
  71. package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +161 -0
  72. package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts.map +1 -0
  73. package/src/shade/renderer/acoustics/GPUAcousticProbes.js +760 -0
  74. package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
  75. package/src/shade/renderer/acoustics/acoustic_listener_order.d.ts +12 -0
  76. package/src/shade/renderer/acoustics/acoustic_listener_order.d.ts.map +1 -0
  77. package/src/shade/renderer/acoustics/acoustic_listener_order.js +56 -0
  78. package/src/shade/renderer/acoustics/chunk_acoustic_direct.d.ts.map +1 -1
  79. package/src/shade/renderer/acoustics/chunk_acoustic_direct.js +5 -0
  80. package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.d.ts +57 -0
  81. package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.d.ts.map +1 -0
  82. package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.js +314 -0
  83. package/src/shade/renderer/acoustics/chunk_acoustic_finite.d.ts +15 -0
  84. package/src/shade/renderer/acoustics/chunk_acoustic_finite.d.ts.map +1 -0
  85. package/src/shade/renderer/acoustics/chunk_acoustic_finite.js +21 -0
  86. package/src/shade/renderer/acoustics/chunk_acoustic_gather.js +1 -1
  87. package/src/shade/renderer/acoustics/chunk_acoustic_lean.d.ts +27 -0
  88. package/src/shade/renderer/acoustics/chunk_acoustic_lean.d.ts.map +1 -0
  89. package/src/shade/renderer/acoustics/chunk_acoustic_lean.js +42 -0
  90. package/src/shade/renderer/acoustics/chunk_acoustic_listener.d.ts +80 -0
  91. package/src/shade/renderer/acoustics/chunk_acoustic_listener.d.ts.map +1 -0
  92. package/src/shade/renderer/acoustics/chunk_acoustic_listener.js +274 -0
  93. package/src/shade/renderer/acoustics/chunk_acoustic_partials.d.ts +2 -2
  94. package/src/shade/renderer/acoustics/chunk_acoustic_partials.js +2 -2
  95. package/src/shade/renderer/acoustics/chunk_acoustic_phonon.d.ts +7 -0
  96. package/src/shade/renderer/acoustics/chunk_acoustic_phonon.d.ts.map +1 -1
  97. package/src/shade/renderer/acoustics/chunk_acoustic_phonon.js +24 -1
  98. package/src/shade/renderer/acoustics/chunk_acoustic_resample.js +1 -1
  99. package/src/shade/renderer/acoustics/chunk_acoustic_reservoir.js +1 -1
  100. package/src/shade/renderer/acoustics/chunk_acoustic_through.d.ts +43 -0
  101. package/src/shade/renderer/acoustics/chunk_acoustic_through.d.ts.map +1 -0
  102. package/src/shade/renderer/acoustics/chunk_acoustic_through.js +153 -0
  103. package/src/shade/renderer/acoustics/chunk_acoustic_trace.d.ts +3 -1
  104. package/src/shade/renderer/acoustics/chunk_acoustic_trace.d.ts.map +1 -1
  105. package/src/shade/renderer/acoustics/chunk_acoustic_trace.js +10 -1
  106. package/src/shade/renderer/acoustics/shader_acoustic_combine.d.ts +7 -3
  107. package/src/shade/renderer/acoustics/shader_acoustic_combine.d.ts.map +1 -1
  108. package/src/shade/renderer/acoustics/shader_acoustic_combine.js +22 -6
  109. package/src/shade/renderer/acoustics/shader_acoustic_coupling.d.ts +14 -0
  110. package/src/shade/renderer/acoustics/shader_acoustic_coupling.d.ts.map +1 -0
  111. package/src/shade/renderer/acoustics/shader_acoustic_coupling.js +102 -0
  112. package/src/shade/renderer/acoustics/shader_acoustic_listener.d.ts +12 -0
  113. package/src/shade/renderer/acoustics/shader_acoustic_listener.d.ts.map +1 -0
  114. package/src/shade/renderer/acoustics/shader_acoustic_listener.js +80 -0
  115. package/src/shade/renderer/acoustics/shader_acoustic_receive.d.ts.map +1 -1
  116. package/src/shade/renderer/acoustics/shader_acoustic_receive.js +27 -6
  117. package/src/shade/renderer/acoustics/shader_acoustic_room.d.ts +11 -0
  118. package/src/shade/renderer/acoustics/shader_acoustic_room.d.ts.map +1 -0
  119. package/src/shade/renderer/acoustics/shader_acoustic_room.js +111 -0
  120. package/src/shade/renderer/acoustics/shader_acoustic_source.d.ts +18 -0
  121. package/src/shade/renderer/acoustics/shader_acoustic_source.d.ts.map +1 -0
  122. package/src/shade/renderer/acoustics/shader_acoustic_source.js +130 -0
  123. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  124. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  125. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +7 -7
  126. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  127. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  128. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.d.ts +2 -2
  129. package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.js +2 -2
  130. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts +5 -2
  131. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts.map +1 -1
  132. package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.js +5 -2
  133. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts +9 -2
  134. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
  135. package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +48 -12
  136. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +0 -22
  137. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
  138. package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +0 -42
  139. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +2 -18
  140. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
  141. package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +2 -19
  142. package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.d.ts.map +1 -1
  143. package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js +0 -1
  144. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +5 -4
  145. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
  146. package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +3 -1
  147. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
  148. package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +3 -1
  149. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
  150. package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +0 -1
  151. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +60 -14
  152. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
  153. package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +75 -39
  154. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +0 -9
  155. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
  156. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +45 -17
  157. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +7 -3
  158. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  159. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +43 -7
  160. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  161. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
@@ -14,7 +14,6 @@ import { vgeo_resident_head_size } from "./vgeo_resident_head_size.js";
14
14
  /**
15
15
  * @typedef {import("./VGeoByteSource.js").VGeoByteSource} VGeoByteSource
16
16
  * @typedef {import("./VGeoContainerHeader.js").VGeoContainerHeader} VGeoContainerHeader
17
- * @typedef {import("../VGeoDefect.js").VGeoDefect} VGeoDefect
18
17
  * @typedef {import("./VGeoDirectory.js").VGeoDirectory} VGeoDirectory
19
18
  * @typedef {import("./VGeoPage.js").VGeoPage} VGeoPage
20
19
  * @typedef {import("./VGeoPageWant.js").VGeoPageWant} VGeoPageWant
@@ -401,10 +400,6 @@ export class VGeoContainerReader {
401
400
  this.header = vgeo_read_header(this.#head, { verify_checksum });
402
401
 
403
402
  await this.#install_root();
404
-
405
- if (this.#options.validate) {
406
- await this.validate();
407
- }
408
403
  }
409
404
 
410
405
  /**
@@ -1217,43 +1212,6 @@ export class VGeoContainerReader {
1217
1212
  return this.directory;
1218
1213
  }
1219
1214
 
1220
- /**
1221
- * Install every page the directory lists.
1222
- *
1223
- * @deprecated it reads the whole file, and a renderer holding a reader must not be able to reach
1224
- * that from the reader. Call `vgeo_install_all_pages` in `tool/` instead, which is a tool
1225
- * and says so. Kept as a shim because the playground and the specs are what it is for.
1226
- * @param {function(number, number): void} [on_progress] called with pages installed and total
1227
- * @returns {Promise<void>}
1228
- */
1229
- async install_all_pages(on_progress = undefined) {
1230
- const { vgeo_install_all_pages } = await import('./tool/vgeo_install_all_pages.js');
1231
-
1232
- await vgeo_install_all_pages(this, on_progress);
1233
- }
1234
-
1235
- /**
1236
- * The whole-file audit — every build invariant of §11, every checksum, and the directory against
1237
- * what a frame scan reconstructs.
1238
- *
1239
- * @deprecated it reads the entire file into one `ArrayBuffer`, which is the one thing the rest
1240
- * of this class exists to avoid and which a multi-GB asset does not survive. Call
1241
- * `vgeo_audit_container` in `tool/` instead, which refuses a file too large to audit this
1242
- * way rather than attempting it. Kept as a shim for the playground and the specs.
1243
- * @returns {Promise<VGeoDefect[]>} empty is the only good answer
1244
- */
1245
- async validate() {
1246
- /*
1247
- Imported here rather than at the top of the file on purpose: a static import would put
1248
- `vgeo_validate_container` — and the whole-file scan it carries — in the same module graph as
1249
- every runtime that opens a container. The dynamic import is what makes "a runtime path
1250
- cannot reach the audit" true of the bundle and not only of the documentation.
1251
- */
1252
- const { vgeo_audit_container } = await import('./tool/vgeo_audit_container.js');
1253
-
1254
- return vgeo_audit_container(this);
1255
- }
1256
-
1257
1215
  /**
1258
1216
  * A byte range, from the kept head prefix where it lies inside it and from the source otherwise.
1259
1217
  *
@@ -36,32 +36,16 @@ export class VGeoReadOptions {
36
36
  * @type {number}
37
37
  */
38
38
  head_prefix_bytes: number;
39
- /**
40
- * Whether to run the whole-file audit when the container is opened.
41
- *
42
- * **Off, and it is the right default.** {@link vgeo_validate_container} reads every byte of the
43
- * file — every frame, every checksum, the directory against a full frame scan — which is the
44
- * one thing an incremental reader exists to avoid, and it answers a question about the *writer*
45
- * rather than about the view being put on screen. Measured on a 514 MiB container: one 514 MiB
46
- * range and 19.4 seconds, and it is a single `ArrayBuffer`, so a multi-GB asset does not run
47
- * slowly — it fails.
48
- *
49
- * @deprecated a runtime reader must not carry a switch that reads the whole file. Call
50
- * {@link vgeo_audit_container} instead, which is a tool talking to a tool and says so, and
51
- * which refuses a file too large to audit this way rather than trying.
52
- * @type {boolean}
53
- */
54
- validate: boolean;
55
39
  /**
56
40
  * Whether each frame's identity-seeded checksum is verified before its page is decoded.
57
41
  *
58
- * Separate from {@link validate} because it is affordable where the audit is not: a frame's
42
+ * Affordable where the whole-file audit (`vgeo_audit_container` in `tool/`) is not: a frame's
59
43
  * checksum covers only that frame, so it is verified from bytes the reader has just fetched
60
44
  * anyway, with no extra request and no whole-file pass. §10 requires it of a *runtime* reader,
61
45
  * where corruption at a content-addressed URL is deterministic and a quarantined page is the
62
46
  * difference between a coarse stand-in and a wrong surface.
63
47
  *
64
- * Off by default here for the same reason {@link validate} is: hashing every installed byte is a
48
+ * Off by default because hashing every installed byte is a
65
49
  * real cost, and a tool looking at a file it just built is not defending against the network. A
66
50
  * reader fetching over HTTP should turn it on — it is what makes {@link fetch_retries} and the
67
51
  * quarantine that follows them able to see corruption at all.
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoReadOptions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,mBAFU,MAAM,CAEc;IAE9B;;;;;;;;;;;;;;OAcG;IACH,UAFU,OAAO,CAEA;IAEjB;;;;;;;;;;;;;;;OAeG;IACH,eAFU,OAAO,CAEK;IAEtB;;;;;OAKG;IACH,eAFU,OAAO,GAAC,SAAS,CAED;IAE1B;;;;;;;;;;;;OAYG;IACH,wBAFU,MAAM,CAEW;IAE3B;;;;;;;;;OASG;IACH,eAFU,MAAM,CAEE;IAElB;;;;OAIG;IACH,wBAFU,MAAM,CAEY;IAE5B;;;;;;;;;;;;OAYG;IACH,qBAFU,OAAO,CAEU;CAC9B"}
1
+ {"version":3,"file":"VGeoReadOptions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH;IACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,mBAFU,MAAM,CAEc;IAE9B;;;;;;;;;;;;;;;OAeG;IACH,eAFU,OAAO,CAEK;IAEtB;;;;;OAKG;IACH,eAFU,OAAO,GAAC,SAAS,CAED;IAE1B;;;;;;;;;;;;OAYG;IACH,wBAFU,MAAM,CAEW;IAE3B;;;;;;;;;OASG;IACH,eAFU,MAAM,CAEE;IAElB;;;;OAIG;IACH,wBAFU,MAAM,CAEY;IAE5B;;;;;;;;;;;;OAYG;IACH,qBAFU,OAAO,CAEU;CAC9B"}
@@ -39,33 +39,16 @@ export class VGeoReadOptions {
39
39
  */
40
40
  head_prefix_bytes = 64 * 1024;
41
41
 
42
- /**
43
- * Whether to run the whole-file audit when the container is opened.
44
- *
45
- * **Off, and it is the right default.** {@link vgeo_validate_container} reads every byte of the
46
- * file — every frame, every checksum, the directory against a full frame scan — which is the
47
- * one thing an incremental reader exists to avoid, and it answers a question about the *writer*
48
- * rather than about the view being put on screen. Measured on a 514 MiB container: one 514 MiB
49
- * range and 19.4 seconds, and it is a single `ArrayBuffer`, so a multi-GB asset does not run
50
- * slowly — it fails.
51
- *
52
- * @deprecated a runtime reader must not carry a switch that reads the whole file. Call
53
- * {@link vgeo_audit_container} instead, which is a tool talking to a tool and says so, and
54
- * which refuses a file too large to audit this way rather than trying.
55
- * @type {boolean}
56
- */
57
- validate = false;
58
-
59
42
  /**
60
43
  * Whether each frame's identity-seeded checksum is verified before its page is decoded.
61
44
  *
62
- * Separate from {@link validate} because it is affordable where the audit is not: a frame's
45
+ * Affordable where the whole-file audit (`vgeo_audit_container` in `tool/`) is not: a frame's
63
46
  * checksum covers only that frame, so it is verified from bytes the reader has just fetched
64
47
  * anyway, with no extra request and no whole-file pass. §10 requires it of a *runtime* reader,
65
48
  * where corruption at a content-addressed URL is deterministic and a quarantined page is the
66
49
  * difference between a coarse stand-in and a wrong surface.
67
50
  *
68
- * Off by default here for the same reason {@link validate} is: hashing every installed byte is a
51
+ * Off by default because hashing every installed byte is a
69
52
  * real cost, and a tool looking at a file it just built is not defending against the network. A
70
53
  * reader fetching over HTTP should turn it on — it is what makes {@link fetch_retries} and the
71
54
  * quarantine that follows them able to see corruption at all.
@@ -1 +1 @@
1
- {"version":3,"file":"vgeo_page_worker_serve.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CANW;IAAC,SAAS,EAAE,WAAS,IAAI,CAAC;IAAC,WAAW,SAAW,MAAM,QAAE,WAAW,EAAE,iBAAI,IAAI,CAAA;CAAC,GAC7E,IAAI,CAkNhB"}
1
+ {"version":3,"file":"vgeo_page_worker_serve.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6CANW;IAAC,SAAS,EAAE,WAAS,IAAI,CAAC;IAAC,WAAW,SAAW,MAAM,QAAE,WAAW,EAAE,iBAAI,IAAI,CAAA;CAAC,GAC7E,IAAI,CAiNhB"}
@@ -156,7 +156,6 @@ export function vgeo_page_worker_serve(port) {
156
156
 
157
157
  options.fetch_retries = data.fetch_retries ?? 2;
158
158
  options.fetch_retry_backoff_ms = data.fetch_retry_backoff_ms ?? 50;
159
- options.validate = false;
160
159
  options.track_selectability = false;
161
160
 
162
161
  const proxy_reader = await VGeoContainerReader.open(scoped_source, options);
@@ -101,9 +101,6 @@ export class GPUVirtualGeometryRuntime {
101
101
  slot_count: number;
102
102
  touch_bits_base: number;
103
103
  touch_word_count: number;
104
- /**
105
- * @type {number}
106
- */
107
104
  want_base: number;
108
105
  slot_want_capacity: number;
109
106
  clear_word_count: number;
@@ -194,6 +191,10 @@ export type GPUVirtualGeometryPool = import("./GPUVirtualGeometryPool.js").GPUVi
194
191
  export type VGeoViewCut = import("./VGeoViewCut.js").VGeoViewCut;
195
192
  export type FrameGraph = import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
196
193
  export type VGeoFeedbackConsumer = {
197
- read_feedback: (arg0: Uint32Array, arg1: number, arg2: boolean, arg3: GPUVirtualGeometryRuntime) => void;
194
+ /**
195
+ * the reading, where this consumer's counters start in it, whether another consumer shared its
196
+ * slot, the pool frame the reading is about, and the runtime
197
+ */
198
+ read_feedback: (arg0: Uint32Array, arg1: number, arg2: boolean, arg3: number, arg4: GPUVirtualGeometryRuntime) => void;
198
199
  };
199
200
  //# sourceMappingURL=GPUVirtualGeometryRuntime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GPUVirtualGeometryRuntime.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH;IAuII;;;;;;;;;;;OAWG;IACH;QAV2C,IAAI,EAApC,sBAAsB;QACL,aAAa,GAA9B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACW,mBAAmB,GAApC,MAAM;QACW,cAAc,GAA/B,MAAM;QACW,cAAc,GAA/B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACW,aAAa,GAA9B,MAAM;QACY,YAAY,GAA9B,OAAO;OAyBjB;IAtID;;;OAGG;IACH,KAFU,MAAM,CAER;IAER;;OAEG;IACH,cAFU,OAAO,CAEG;IAEpB;;;;;OAKG;IACH,cAFU,OAAO,CAEI;IAuHrB;;OAEG;IACH,yEAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,kCAEC;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,gCAEC;IASD;;OAEG;IACH,iCAKC;IAfD;;OAEG;IACH,4BAEC;IAYD;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,0BAEC;IAED;;OAEG;IACH,yDAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH;;;;QA3PA;;WAEG;;;;;MA2PF;IAED;;;;;OAKG;IACH,qCAYC;IAED;;;;;OAKG;IACH,wCAUC;IAED;;;;OAIG;IACH;QAHgC,IAAI,EAAzB,WAAW;QACT,IAAI,CAiDhB;IAuBD;;;OAGG;IACH,cAHW,oBAAoB,GAClB,MAAM,CA6BlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,oCAHW,MAAM,OAiBhB;IAED;;OAEG;IACH,eAFa,oBAAoB,EAAE,EAAE,CAIpC;IAED;;;OAGG;IACH,mBAHW,UAAU,GACR,MAAM,CAkClB;IAED;;;;OAIG;IACH,wBAJW,UAAU,UACV,MAAM,GACJ,IAAI,CAOhB;IAED;;;;;OAKG;IACH;QAJ2B,iBAAiB,EAAjC,MAAM;QACU,gBAAgB,EAAhC,MAAM;QACJ,IAAI,CAgBhB;IAED;;OAEG;IACH,gCAEC;IAED;;OAEG;IACH,+BAEC;IAED;;OAEG;IACH,aAFa,IAAI,CAKhB;IAED;;OAEG;IACH,WAFa,IAAI,CAchB;;CACJ;qCAxkBY,OAAO,6BAA6B,EAAE,sBAAsB;0BAC5D,OAAO,kBAAkB,EAAE,WAAW;yBACtC,OAAO,iEAAiE,EAAE,UAAU;;0BAK1E,WAAW,QAAE,MAAM,QAAE,OAAO,QAAE,yBAAyB,KAAG,IAAI"}
1
+ {"version":3,"file":"GPUVirtualGeometryRuntime.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js"],"names":[],"mappings":"AAiCA;;;;;;;GAOG;AACH;IAuII;;;;;;;;;;;OAWG;IACH;QAV2C,IAAI,EAApC,sBAAsB;QACL,aAAa,GAA9B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACW,mBAAmB,GAApC,MAAM;QACW,cAAc,GAA/B,MAAM;QACW,cAAc,GAA/B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACW,aAAa,GAA9B,MAAM;QACY,YAAY,GAA9B,OAAO;OAyBjB;IAtID;;;OAGG;IACH,KAFU,MAAM,CAER;IAER;;OAEG;IACH,cAFU,OAAO,CAEG;IAEpB;;;;;OAKG;IACH,cAFU,OAAO,CAEI;IAuHrB;;OAEG;IACH,yEAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,kCAEC;IAED;;OAEG;IACH,6BAEC;IAED;;OAEG;IACH,gCAEC;IASD;;OAEG;IACH,iCAKC;IAfD;;OAEG;IACH,4BAEC;IAYD;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,0BAEC;IAED;;OAEG;IACH,yDAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH;;;;;;;;MAEC;IAED;;;;;OAKG;IACH,qCAYC;IAED;;;;;OAKG;IACH,wCAUC;IAED;;;;OAIG;IACH;QAHgC,IAAI,EAAzB,WAAW;QACT,IAAI,CAiDhB;IAuBD;;;OAGG;IACH,cAHW,oBAAoB,GAClB,MAAM,CA6BlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,oCAHW,MAAM,OAiBhB;IAED;;OAEG;IACH,eAFa,oBAAoB,EAAE,EAAE,CAIpC;IAED;;;OAGG;IACH,mBAHW,UAAU,GACR,MAAM,CAkClB;IAED;;;;OAIG;IACH,wBAJW,UAAU,UACV,MAAM,GACJ,IAAI,CAOhB;IAED;;;;;OAKG;IACH;QAJ2B,iBAAiB,EAAjC,MAAM;QACU,gBAAgB,EAAhC,MAAM;QACJ,IAAI,CAgBhB;IAED;;OAEG;IACH,gCAEC;IAED;;OAEG;IACH,+BAEC;IAED;;OAEG;IACH,aAFa,IAAI,CAKhB;IAED;;OAEG;IACH,WAFa,IAAI,CAchB;;CACJ;qCA1kBY,OAAO,6BAA6B,EAAE,sBAAsB;0BAC5D,OAAO,kBAAkB,EAAE,WAAW;yBACtC,OAAO,iEAAiE,EAAE,UAAU;;;;;;0BAK1E,WAAW,QAAE,MAAM,QAAE,OAAO,QAAE,MAAM,QAAE,yBAAyB,KAAG,IAAI"}
@@ -18,7 +18,9 @@ import {
18
18
 
19
19
  /**
20
20
  * @typedef {Object} VGeoFeedbackConsumer
21
- * @property {function(Uint32Array, number, boolean, GPUVirtualGeometryRuntime): void} read_feedback
21
+ * @property {function(Uint32Array, number, boolean, number, GPUVirtualGeometryRuntime): void} read_feedback
22
+ * the reading, where this consumer's counters start in it, whether another consumer shared its
23
+ * slot, the pool frame the reading is about, and the runtime
22
24
  */
23
25
 
24
26
  const SLOT_CEILING = 64;
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoFeedbackLoop.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IA4CI;;;;;;OAMG;IACH;QAL8C,OAAO,EAA1C,yBAAyB;QACF,SAAS,EAAhC,aAAa;QACI,aAAa,GAA9B,MAAM;OAUhB;IAED;;OAEG;IACH,4DAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;;;;OAOG;IACH,6BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,+BAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;;OAKG;IACH,YAHW,UAAU,GACR,OAAO,CAwEnB;IAgCD;;;;OAIG;IACH,SAFa,IAAI,CAIhB;IAED;;;;;;;;;OASG;IACH,WAFa,IAAI,CAMhB;;CACJ;yBA/QY,OAAO,iEAAiE,EAAE,UAAU;mCACpF,OAAO,gCAAgC,EAAE,oBAAoB;wCAC7D,OAAO,gCAAgC,EAAE,yBAAyB;4BAClE,OAAO,oBAAoB,EAAE,aAAa"}
1
+ {"version":3,"file":"VGeoFeedbackLoop.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH;IA4CI;;;;;;OAMG;IACH;QAL8C,OAAO,EAA1C,yBAAyB;QACF,SAAS,EAAhC,aAAa;QACI,aAAa,GAA9B,MAAM;OAUhB;IAED;;OAEG;IACH,4DAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;;;;OAOG;IACH,6BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,8BAEC;IAED;;OAEG;IACH,+BAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;;OAKG;IACH,YAHW,UAAU,GACR,OAAO,CAwEnB;IAkCD;;;;OAIG;IACH,SAFa,IAAI,CAIhB;IAED;;;;;;;;;OASG;IACH,WAFa,IAAI,CAMhB;;CACJ;yBAjRY,OAAO,iEAAiE,EAAE,UAAU;mCACpF,OAAO,gCAAgC,EAAE,oBAAoB;wCAC7D,OAAO,gCAAgC,EAAE,yBAAyB;4BAClE,OAAO,oBAAoB,EAAE,aAAa"}
@@ -240,7 +240,9 @@ export class VGeoFeedbackLoop {
240
240
  const shared = consumers.length > 1;
241
241
 
242
242
  for (const consumer of consumers) {
243
- consumer.read_feedback(words, vgeo_feedback_slot_stats(slot), shared, this.#runtime);
243
+ consumer.read_feedback(
244
+ words, vgeo_feedback_slot_stats(slot), shared, reading_frame, this.#runtime
245
+ );
244
246
  }
245
247
  }
246
248
 
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoPageFetcher.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;;;;;GAOG;AACH;IA2GI;;;;OAIG;IACH;QAH4B,YAAY,GAA7B,MAAM;QACuB,WAAW,SAA5B,MAAM;OAO5B;IAED;;OAEG;IACH,2BAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;OAGG;IACH,qCAEC;IAED;;;OAGG;IACH,uCAEC;IAED;;;OAGG;IACH,2CAEC;IAED;;OAEG;IACH,4BAEC;IAED;;;OAGG;IACH,gCAEC;IAED;;;;;;;;OAQG;IACH,cARW,mBAAmB,cACnB,MAAM,gBACN,MAAM,cACN,MAAM,WACN,WAAW,qBACX,UAAU,GACR,QAAQ,QAAQ,CAAC,CA+B7B;IAED;;;;;;;;;;OAUG;IACH,oBAPW,mBAAmB,eACnB,MAAM,eACN,MAAM,SACN;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,EAAE,WAChE,WAAW,GACT,QAAQ;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,KAAK,CAAC,EAAE,cAAc,CAAA;KAAC,EAAE,CAAC,CA0BpF;IAED;;;;;;;;;OASG;IACH,oBALW,mBAAmB,mBACnB,MAAM,WACN,WAAW,GACT,QAAQ,eAAe,CAAC,CAqBpC;IAED;;;;;;;OAOG;IACH,eAHW,mBAAmB,GACjB,MAAM,CAuClB;IAED;;;;OAIG;IACH,WAFa,IAAI,CAwBhB;;CAslBJ;8BAr8BY,OAAO,0BAA0B,EAAE,eAAe;uBAClD,OAAO,4BAA4B,EAAE,QAAQ;oCATtB,uCAAuC;+BAC5C,kCAAkC"}
1
+ {"version":3,"file":"VGeoPageFetcher.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js"],"names":[],"mappings":"AAUA;;;GAGG;AAEH;;;;;;;GAOG;AACH;IA2GI;;;;OAIG;IACH;QAH4B,YAAY,GAA7B,MAAM;QACuB,WAAW,SAA5B,MAAM;OAO5B;IAED;;OAEG;IACH,2BAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;OAGG;IACH,qCAEC;IAED;;;OAGG;IACH,uCAEC;IAED;;;OAGG;IACH,2CAEC;IAED;;OAEG;IACH,4BAEC;IAED;;;OAGG;IACH,gCAEC;IAED;;;;;;;;OAQG;IACH,cARW,mBAAmB,cACnB,MAAM,gBACN,MAAM,cACN,MAAM,WACN,WAAW,qBACX,UAAU,GACR,QAAQ,QAAQ,CAAC,CA+B7B;IAED;;;;;;;;;;OAUG;IACH,oBAPW,mBAAmB,eACnB,MAAM,eACN,MAAM,SACN;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,EAAE,WAChE,WAAW,GACT,QAAQ;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,KAAK,CAAC,EAAE,cAAc,CAAA;KAAC,EAAE,CAAC,CA0BpF;IAED;;;;;;;;;OASG;IACH,oBALW,mBAAmB,mBACnB,MAAM,WACN,WAAW,GACT,QAAQ,eAAe,CAAC,CAqBpC;IAED;;;;;;;OAOG;IACH,eAHW,mBAAmB,GACjB,MAAM,CAuClB;IAED;;;;OAIG;IACH,WAFa,IAAI,CAwBhB;;CAqlBJ;8BAp8BY,OAAO,0BAA0B,EAAE,eAAe;uBAClD,OAAO,4BAA4B,EAAE,QAAQ;oCATtB,uCAAuC;+BAC5C,kCAAkC"}
@@ -938,7 +938,6 @@ export class VGeoPageFetcher {
938
938
  options.max_concurrent_fetches = reader.options.max_concurrent_fetches;
939
939
  options.fetch_retries = reader.options.fetch_retries;
940
940
  options.fetch_retry_backoff_ms = reader.options.fetch_retry_backoff_ms;
941
- options.validate = false;
942
941
  options.track_selectability = false;
943
942
 
944
943
  try {
@@ -2,9 +2,9 @@
2
2
  * @typedef {import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime} GPUVirtualGeometryRuntime
3
3
  */
4
4
  /**
5
- * Per-view virtual-geometry cut state: view projection scale, adaptive wavefront iteration bound
6
- * with clean-streak decay, optional per-view `cone_culling` override, and plain uniform value
7
- * builder for `graph_import_typed_buffer`.
5
+ * Per-view virtual-geometry cut state: view projection scale, a wavefront iteration bound raised by
6
+ * this view's own readings and never lowered, optional per-view `cone_culling` override, and plain
7
+ * uniform value builder for `graph_import_typed_buffer`.
8
8
  *
9
9
  * @author Alex Goldring
10
10
  * @copyright Company Named Limited (c) 2026
@@ -64,31 +64,77 @@ export class VGeoViewCut {
64
64
  projection_matrix: ArrayLike<number>;
65
65
  }): void;
66
66
  /**
67
+ * Wavefronts this view's descent may run in a frame of `runtime`: the runtime's starting bound,
68
+ * or what this view's own readings have raised it to.
69
+ *
67
70
  * @param {GPUVirtualGeometryRuntime} runtime
68
71
  * @returns {number}
69
72
  */
70
73
  iterations_under(runtime: GPUVirtualGeometryRuntime): number;
71
74
  /**
75
+ * Times this view's bound has been raised: at most log₂ of the ceiling over the starting bound,
76
+ * and zero for the life of almost every view.
77
+ *
72
78
  * @returns {number}
73
79
  */
74
80
  get iteration_escalations(): number;
75
81
  /**
76
- * Escalate `#max_iterations` when `remaining > 0`, and decay step-by-step after
77
- * {@link ITERATION_DECAY_CLEAN_FRAMES} consecutive clean frames (`remaining === 0`) so a single
78
- * transient spike does not permanently lock 64 wavefronts for the lifetime of the view.
82
+ * A reading of this view's slot saying its descent stopped with work still queued — raise this
83
+ * view's bound and keep it raised.
79
84
  *
80
- * @param {number} remaining
81
- * @param {GPUVirtualGeometryRuntime} runtime
82
- * @returns {boolean} whether the bound moved upward
85
+ * **This is the only place the engine can learn it.** How many wavefronts a cut needs is a
86
+ * function of the frontier's *breadth*, which is a function of the scene, the viewpoint and the
87
+ * render target together; the kernel cannot know it before it runs and the host cannot know it
88
+ * at all. So the bound is guessed low, and the one reading that says the guess was wrong —
89
+ * `VGEO_CUT_STAT.QUEUE_REMAINING`, non-zero exactly when items were abandoned — pays for
90
+ * correcting it. It is the same shape as the rasterizer's meshlet counts, which cannot be known
91
+ * before the expansion runs either and are grown from what the frame reported.
92
+ *
93
+ * **Per view.** One bound for the frame let one hungry view — a far cascade, a point face in the
94
+ * shadow budget for one frame — double every site's ladder for the life of the scene
95
+ * (SHADOW_PLAN_2026_09_28 §2.4).
96
+ *
97
+ * **Doubling, because the reading does not say how much more was needed.** A remainder is a
98
+ * count of *items*, and what they cost in wavefronts depends on how they spill; there is no
99
+ * ratio to convert one into the other. So it goes up by a factor until it drains, which is at
100
+ * most three steps from 8 to the ceiling.
101
+ *
102
+ * **Only a frame cut under the current bound can raise it.** A reading lands frames after its
103
+ * cut and more than one is in flight, so the frames cut while the first truncated reading was on
104
+ * its way were cut under the same bound and report the same shortfall. Each says that bound was
105
+ * too few; none says anything about its double.
106
+ *
107
+ * **Never lowered.** A frame that drained is evidence about that frame, not that the scene got
108
+ * smaller — and a bound that fell back would re-learn the same lesson every time the camera
109
+ * turned away and back, at a hole a time. An unused wavefront is an empty indirect dispatch,
110
+ * which is the cheap side of that trade.
111
+ *
112
+ * @param {number} remaining items the descent still held when it was abandoned
113
+ * @param {number} frame the pool frame the descent ran in
114
+ * @param {GPUVirtualGeometryRuntime} runtime whose starting bound, ceiling and frame apply
115
+ * @returns {boolean} whether the bound moved
83
116
  */
84
- note_incomplete_descent(remaining: number, runtime: GPUVirtualGeometryRuntime): boolean;
117
+ note_incomplete_descent(remaining: number, frame: number, runtime: GPUVirtualGeometryRuntime): boolean;
85
118
  /**
86
- * @param {Uint32Array} words
87
- * @param {number} base
88
- * @param {boolean} shared
119
+ * Take this view's slot of a reading: its counters, and what they say about its descent.
120
+ *
121
+ * One counter is not a statistic, it is an instruction. `QUEUE_REMAINING` is non-zero exactly
122
+ * when the descent ran out of wavefronts and abandoned subtrees it had not expanded — a hole in
123
+ * the picture rather than a coarser surface — and this is the only moment anything on the host
124
+ * learns it.
125
+ *
126
+ * A slot two views shared — they were past the frame's layout — holds the sum of their counters,
127
+ * so a remainder in it says one of them ran out and not which. Escalating both would raise a
128
+ * bound that was never binding, for good; each has a slot of its own next frame, and escalates
129
+ * from that.
130
+ *
131
+ * @param {Uint32Array} words the reading
132
+ * @param {number} base where this slot's counters start in it
133
+ * @param {boolean} shared whether another consumer shared the slot
134
+ * @param {number} frame the pool frame the reading is about
89
135
  * @param {GPUVirtualGeometryRuntime} runtime
90
136
  */
91
- read_feedback(words: Uint32Array, base: number, shared: boolean, runtime: GPUVirtualGeometryRuntime): void;
137
+ read_feedback(words: Uint32Array, base: number, shared: boolean, frame: number, runtime: GPUVirtualGeometryRuntime): void;
92
138
  /**
93
139
  * Build a fresh plain `VGeoCutParams` value object for `graph_import_typed_buffer`.
94
140
  *
@@ -1 +1 @@
1
- {"version":3,"file":"VGeoViewCut.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js"],"names":[],"mappings":"AAWA;;GAEG;AAEH;;;;;;;GAOG;AACH;IAwDI;;;;OAIG;IACH;QAH+B,MAAM;QACT,KAAK,GAAtB,MAAM;OAIhB;IAzCD;;OAEG;IACH,WAFU,MAAM,CAEF;IAEd;;;;OAIG;IACH,cAFU,OAAO,GAAC,SAAS,CAEF;IAmBzB;;OAEG;IACH,OAFU,WAAW,CAEwB;IAW7C;;OAEG;IACH,oBAEC;IAED;;;;OAIG;IACH,yBAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,8BAEC;IAED;;;;;;OAMG;IACH;QAL2B,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACqB,iBAAiB,EAA5C,UAAU,MAAM,CAAC;QACf,IAAI,CAkBhB;IAED;;;OAGG;IACH,0BAHW,yBAAyB,GACvB,MAAM,CAIlB;IAED;;OAEG;IACH,oCAEC;IAED;;;;;;;;OAQG;IACH,mCAJW,MAAM,WACN,yBAAyB,GACvB,OAAO,CAiCnB;IAED;;;;;OAKG;IACH,qBALW,WAAW,QACX,MAAM,UACN,OAAO,WACP,yBAAyB,QAUnC;IAED;;;;;;;;;;;;OAYG;IACH;QAT8C,OAAO,EAA1C,yBAAyB;QACT,IAAI,EAApB,MAAM;QACY,OAAO,GAAzB,OAAO;QACU,GAAG,GAApB,MAAM;QACU,SAAS,GAAzB,CAAC,GAAC,CAAC,GAAC,CAAC;QACa,YAAY,GAA9B,OAAO;QACW,UAAU,GAA5B,OAAO;YAqCjB;IAED,gBAEC;;CACJ;wCAhQY,OAAO,gCAAgC,EAAE,yBAAyB"}
1
+ {"version":3,"file":"VGeoViewCut.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js"],"names":[],"mappings":"AAKA;;GAEG;AAEH;;;;;;;GAOG;AACH;IA4DI;;;;OAIG;IACH;QAH+B,MAAM;QACT,KAAK,GAAtB,MAAM;OAIhB;IA7CD;;OAEG;IACH,WAFU,MAAM,CAEF;IAEd;;;;OAIG;IACH,cAFU,OAAO,GAAC,SAAS,CAEF;IAuBzB;;OAEG;IACH,OAFU,WAAW,CAEwB;IAW7C;;OAEG;IACH,oBAEC;IAED;;;;OAIG;IACH,yBAEC;IAED;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,8BAEC;IAED;;;;;;OAMG;IACH;QAL2B,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACqB,iBAAiB,EAA5C,UAAU,MAAM,CAAC;QACf,IAAI,CAkBhB;IAED;;;;;;OAMG;IACH,0BAHW,yBAAyB,GACvB,MAAM,CAIlB;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,mCALW,MAAM,SACN,MAAM,WACN,yBAAyB,GACvB,OAAO,CAyBnB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,qBANW,WAAW,QACX,MAAM,UACN,OAAO,SACP,MAAM,WACN,yBAAyB,QAUnC;IAED;;;;;;;;;;;;OAYG;IACH;QAT8C,OAAO,EAA1C,yBAAyB;QACT,IAAI,EAApB,MAAM;QACY,OAAO,GAAzB,OAAO;QACU,GAAG,GAApB,MAAM;QACU,SAAS,GAAzB,CAAC,GAAC,CAAC,GAAC,CAAC;QACa,YAAY,GAA9B,OAAO;QACW,UAAU,GAA5B,OAAO;YAqCjB;IAED,gBAEC;;CACJ;wCA1SY,OAAO,gCAAgC,EAAE,yBAAyB"}
@@ -3,20 +3,14 @@ import { VGEO_CUT_FLAGS } from "./cut/VGEO_CUT_FLAGS.js";
3
3
  import { VGEO_CUT_STAT } from "./layout/VGEO_CUT_STAT.js";
4
4
  import { VGEO_CUT_STAT_COUNT } from "./layout/VGEO_CUT_STAT_COUNT.js";
5
5
 
6
- /**
7
- * Consecutive clean readings (`QUEUE_REMAINING === 0`) required before decaying `#max_iterations`
8
- * by one step toward `runtime.max_iterations`.
9
- */
10
- const ITERATION_DECAY_CLEAN_FRAMES = 8;
11
-
12
6
  /**
13
7
  * @typedef {import("./GPUVirtualGeometryRuntime.js").GPUVirtualGeometryRuntime} GPUVirtualGeometryRuntime
14
8
  */
15
9
 
16
10
  /**
17
- * Per-view virtual-geometry cut state: view projection scale, adaptive wavefront iteration bound
18
- * with clean-streak decay, optional per-view `cone_culling` override, and plain uniform value
19
- * builder for `graph_import_typed_buffer`.
11
+ * Per-view virtual-geometry cut state: view projection scale, a wavefront iteration bound raised by
12
+ * this view's own readings and never lowered, optional per-view `cone_culling` override, and plain
13
+ * uniform value builder for `graph_import_typed_buffer`.
20
14
  *
21
15
  * @author Alex Goldring
22
16
  * @copyright Company Named Limited (c) 2026
@@ -56,6 +50,9 @@ export class VGeoViewCut {
56
50
  cone_culling = undefined;
57
51
 
58
52
  /**
53
+ * This view's wavefront bound as its own readings have raised it; 0 until one has. The view cuts
54
+ * at the larger of this and the runtime's starting bound — see {@link iterations_under}.
55
+ *
59
56
  * @type {number}
60
57
  */
61
58
  #max_iterations = 0;
@@ -66,11 +63,12 @@ export class VGeoViewCut {
66
63
  #iteration_escalations = 0;
67
64
 
68
65
  /**
69
- * Consecutive unshared clean readings (`QUEUE_REMAINING === 0`) while `#max_iterations` is
70
- * elevated above `runtime.max_iterations`.
66
+ * The first pool frame cut under the current {@link #max_iterations}. A reading of an earlier
67
+ * frame was cut under a lower bound and says nothing about this one.
68
+ *
71
69
  * @type {number}
72
70
  */
73
- #clean_descent_streak = 0;
71
+ #raised_at_frame = 0;
74
72
 
75
73
  /**
76
74
  * @type {Uint32Array}
@@ -142,6 +140,9 @@ export class VGeoViewCut {
142
140
  }
143
141
 
144
142
  /**
143
+ * Wavefronts this view's descent may run in a frame of `runtime`: the runtime's starting bound,
144
+ * or what this view's own readings have raised it to.
145
+ *
145
146
  * @param {GPUVirtualGeometryRuntime} runtime
146
147
  * @returns {number}
147
148
  */
@@ -150,6 +151,9 @@ export class VGeoViewCut {
150
151
  }
151
152
 
152
153
  /**
154
+ * Times this view's bound has been raised: at most log₂ of the ceiling over the starting bound,
155
+ * and zero for the life of almost every view.
156
+ *
153
157
  * @returns {number}
154
158
  */
155
159
  get iteration_escalations() {
@@ -157,36 +161,51 @@ export class VGeoViewCut {
157
161
  }
158
162
 
159
163
  /**
160
- * Escalate `#max_iterations` when `remaining > 0`, and decay step-by-step after
161
- * {@link ITERATION_DECAY_CLEAN_FRAMES} consecutive clean frames (`remaining === 0`) so a single
162
- * transient spike does not permanently lock 64 wavefronts for the lifetime of the view.
164
+ * A reading of this view's slot saying its descent stopped with work still queued — raise this
165
+ * view's bound and keep it raised.
163
166
  *
164
- * @param {number} remaining
165
- * @param {GPUVirtualGeometryRuntime} runtime
166
- * @returns {boolean} whether the bound moved upward
167
+ * **This is the only place the engine can learn it.** How many wavefronts a cut needs is a
168
+ * function of the frontier's *breadth*, which is a function of the scene, the viewpoint and the
169
+ * render target together; the kernel cannot know it before it runs and the host cannot know it
170
+ * at all. So the bound is guessed low, and the one reading that says the guess was wrong —
171
+ * `VGEO_CUT_STAT.QUEUE_REMAINING`, non-zero exactly when items were abandoned — pays for
172
+ * correcting it. It is the same shape as the rasterizer's meshlet counts, which cannot be known
173
+ * before the expansion runs either and are grown from what the frame reported.
174
+ *
175
+ * **Per view.** One bound for the frame let one hungry view — a far cascade, a point face in the
176
+ * shadow budget for one frame — double every site's ladder for the life of the scene
177
+ * (SHADOW_PLAN_2026_09_28 §2.4).
178
+ *
179
+ * **Doubling, because the reading does not say how much more was needed.** A remainder is a
180
+ * count of *items*, and what they cost in wavefronts depends on how they spill; there is no
181
+ * ratio to convert one into the other. So it goes up by a factor until it drains, which is at
182
+ * most three steps from 8 to the ceiling.
183
+ *
184
+ * **Only a frame cut under the current bound can raise it.** A reading lands frames after its
185
+ * cut and more than one is in flight, so the frames cut while the first truncated reading was on
186
+ * its way were cut under the same bound and report the same shortfall. Each says that bound was
187
+ * too few; none says anything about its double.
188
+ *
189
+ * **Never lowered.** A frame that drained is evidence about that frame, not that the scene got
190
+ * smaller — and a bound that fell back would re-learn the same lesson every time the camera
191
+ * turned away and back, at a hole a time. An unused wavefront is an empty indirect dispatch,
192
+ * which is the cheap side of that trade.
193
+ *
194
+ * @param {number} remaining items the descent still held when it was abandoned
195
+ * @param {number} frame the pool frame the descent ran in
196
+ * @param {GPUVirtualGeometryRuntime} runtime whose starting bound, ceiling and frame apply
197
+ * @returns {boolean} whether the bound moved
167
198
  */
168
- note_incomplete_descent(remaining, runtime) {
199
+ note_incomplete_descent(remaining, frame, runtime) {
169
200
  assert.isNonNegativeInteger(remaining, 'remaining');
201
+ assert.isNonNegativeInteger(frame, 'frame');
170
202
  assert.defined(runtime, 'runtime');
171
203
 
172
- const current = this.iterations_under(runtime);
173
-
174
- if (remaining === 0) {
175
- if (this.#max_iterations > runtime.max_iterations) {
176
- this.#clean_descent_streak++;
177
- if (this.#clean_descent_streak >= ITERATION_DECAY_CLEAN_FRAMES) {
178
- this.#clean_descent_streak = 0;
179
- const decayed = Math.max(runtime.max_iterations, Math.floor(this.#max_iterations / 2));
180
- this.#max_iterations = decayed <= runtime.max_iterations ? 0 : decayed;
181
- }
182
- } else {
183
- this.#max_iterations = 0;
184
- this.#clean_descent_streak = 0;
185
- }
204
+ if (remaining === 0 || frame < this.#raised_at_frame) {
186
205
  return false;
187
206
  }
188
207
 
189
- this.#clean_descent_streak = 0;
208
+ const current = this.iterations_under(runtime);
190
209
 
191
210
  if (current >= runtime.iteration_ceiling) {
192
211
  return false;
@@ -195,22 +214,39 @@ export class VGeoViewCut {
195
214
  this.#max_iterations = Math.min(current * 2, runtime.iteration_ceiling);
196
215
  this.#iteration_escalations++;
197
216
 
217
+ // the next frame begun is the first cut under it; a reading landing inside an open frame
218
+ // dates the raise one frame late, which can delay a raise and never repeat one
219
+ this.#raised_at_frame = runtime.pool.frame + 1;
220
+
198
221
  return true;
199
222
  }
200
223
 
201
224
  /**
202
- * @param {Uint32Array} words
203
- * @param {number} base
204
- * @param {boolean} shared
225
+ * Take this view's slot of a reading: its counters, and what they say about its descent.
226
+ *
227
+ * One counter is not a statistic, it is an instruction. `QUEUE_REMAINING` is non-zero exactly
228
+ * when the descent ran out of wavefronts and abandoned subtrees it had not expanded — a hole in
229
+ * the picture rather than a coarser surface — and this is the only moment anything on the host
230
+ * learns it.
231
+ *
232
+ * A slot two views shared — they were past the frame's layout — holds the sum of their counters,
233
+ * so a remainder in it says one of them ran out and not which. Escalating both would raise a
234
+ * bound that was never binding, for good; each has a slot of its own next frame, and escalates
235
+ * from that.
236
+ *
237
+ * @param {Uint32Array} words the reading
238
+ * @param {number} base where this slot's counters start in it
239
+ * @param {boolean} shared whether another consumer shared the slot
240
+ * @param {number} frame the pool frame the reading is about
205
241
  * @param {GPUVirtualGeometryRuntime} runtime
206
242
  */
207
- read_feedback(words, base, shared, runtime) {
243
+ read_feedback(words, base, shared, frame, runtime) {
208
244
  for (let i = 0; i < VGEO_CUT_STAT_COUNT; i++) {
209
245
  this.stats[i] = words[base + i];
210
246
  }
211
247
 
212
248
  if (!shared) {
213
- this.note_incomplete_descent(words[base + VGEO_CUT_STAT.QUEUE_REMAINING], runtime);
249
+ this.note_incomplete_descent(words[base + VGEO_CUT_STAT.QUEUE_REMAINING], frame, runtime);
214
250
  }
215
251
  }
216
252
 
@@ -1,12 +1,3 @@
1
- /**
2
- * @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
3
- * @typedef {import("../../../GraphicsContext.js").GraphicsContext} GraphicsContext
4
- * @typedef {import("../../../scene/GPUSceneContext.js").GPUSceneContext} GPUSceneContext
5
- * @typedef {import("../../../view/GPUViewContext.js").GPUViewContext} GPUViewContext
6
- * @typedef {import("../ProbeClipmapSettings.js").ProbeClipmapSettings} ProbeClipmapSettings
7
- * @typedef {import("./GPUBrickClipmap.js").BrickProvider} BrickProvider
8
- * @typedef {import("./GPUBrickClipmap.js").BrickMaterialWriter} BrickMaterialWriter
9
- */
10
1
  /**
11
2
  * The world as rays see it, a service of one scene (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §6, §7; GPU acoustics
12
3
  * design, "What the tracer has to gain"): the {@link GPUBrickClipmap} around a view, the mesh provider that builds
@@ -1 +1 @@
1
- {"version":3,"file":"GPUSceneBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAiDI;;;OAGG;IACH,sBAHW,eAAe,SACf,eAAe,EAQzB;IAED;;;OAGG;IACH,oBAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;OAGG;IACH,qBAEC;IAED;;;OAGG;IACH,2BAKC;IAED;;;;;OAKG;IACH,sBAFa,OAAO,CAYnB;IAED;;;;;;OAMG;IACH,4BAFW,mBAAmB,QAU7B;IAED;;;OAGG;IACH,+BAHW,mBAAmB,GACjB,OAAO,CAYnB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAV+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACH,MAAM,GAAvB,MAAM;QAEY,QAAQ,GAA1B,OAAO;QAEL,MAAM,CAmElB;IAkED,gBASC;;CACJ;yBAlXY,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,6BAA6B,EAAE,eAAe;8BACrD,OAAO,mCAAmC,EAAE,eAAe;6BAC3D,OAAO,iCAAiC,EAAE,cAAc;mCACxD,OAAO,4BAA4B,EAAE,oBAAoB;4BACzD,OAAO,sBAAsB,EAAE,aAAa;kCAC5C,OAAO,sBAAsB,EAAE,mBAAmB;gCAV/B,sBAAsB;uCADf,8BAA8B"}
1
+ {"version":3,"file":"GPUSceneBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAqDI;;;OAGG;IACH,sBAHW,eAAe,SACf,eAAe,EAQzB;IAED;;;OAGG;IACH,oBAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;OAGG;IACH,qBAEC;IAED;;;OAGG;IACH,2BAKC;IAED;;;;;OAKG;IACH,sBAFa,OAAO,CAYnB;IAED;;;;;;OAMG;IACH,4BAFW,mBAAmB,QAU7B;IAED;;;OAGG;IACH,+BAHW,mBAAmB,GACjB,OAAO,CAYnB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAV+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACH,MAAM,GAAvB,MAAM;QAEY,QAAQ,GAA1B,OAAO;QAEL,MAAM,CA2ElB;IAkED,gBASC;;CACJ;yBA9YY,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,6BAA6B,EAAE,eAAe;8BACrD,OAAO,mCAAmC,EAAE,eAAe;6BAC3D,OAAO,iCAAiC,EAAE,cAAc;mCACxD,OAAO,4BAA4B,EAAE,oBAAoB;4BACzD,OAAO,sBAAsB,EAAE,aAAa;kCAC5C,OAAO,sBAAsB,EAAE,mBAAmB;gCAV/B,sBAAsB;uCADf,8BAA8B"}