@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.
- package/CHANGELOG.md +20 -19
- package/package.json +1 -1
- package/src/core/geom/2d/hilbert/v2_hilbert_encode.d.ts +11 -0
- package/src/core/geom/2d/hilbert/v2_hilbert_encode.d.ts.map +1 -0
- package/src/core/geom/2d/hilbert/v2_hilbert_encode.js +46 -0
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +6 -0
- package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
- package/src/engine/graphics/render/frame_graph/FrameGraph.js +9 -0
- package/src/engine/graphics3/GPUAcousticSystem.d.ts +29 -32
- package/src/engine/graphics3/GPUAcousticSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUAcousticSystem.js +87 -162
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +35 -17
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/LiveEmitterSet.js +2 -3
- package/src/engine/sound/simulation/AcousticSimulator.d.ts +7 -0
- package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
- package/src/engine/sound/simulation/AcousticSimulator.js +27 -0
- package/src/engine/sound/simulation/README.md +121 -107
- package/src/engine/sound/sopra/README.md +8 -3
- package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.d.ts +2 -2
- package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.d.ts.map +1 -1
- package/src/engine/sound/sopra/definition/effect/AcousticReverbEffect.js +4 -3
- package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.d.ts +118 -0
- package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.d.ts.map +1 -0
- package/src/engine/sound/sopra/runtime/AcousticReverbConvolution.js +472 -0
- package/src/engine/sound/sopra/runtime/AcousticReverbLines.d.ts +166 -0
- package/src/engine/sound/sopra/runtime/AcousticReverbLines.d.ts.map +1 -0
- package/src/engine/sound/sopra/runtime/AcousticReverbLines.js +447 -0
- package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.d.ts +69 -113
- package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/AcousticReverbNetwork.js +143 -491
- package/src/engine/sound/sopra/runtime/AcousticSpeakers.d.ts +102 -0
- package/src/engine/sound/sopra/runtime/AcousticSpeakers.d.ts.map +1 -0
- package/src/engine/sound/sopra/runtime/AcousticSpeakers.js +232 -0
- package/src/engine/sound/sopra/runtime/BusGraph.d.ts +17 -3
- package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/BusGraph.js +55 -5
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts +8 -6
- package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
- package/src/engine/sound/sopra/runtime/EventInstance.js +113 -105
- package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.d.ts +13 -0
- package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.d.ts.map +1 -0
- package/src/engine/sound/sopra/runtime/acoustic_reverb_decay.js +15 -0
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +4 -6
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/diff_traced_against_rasterized.js +4 -5
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +6 -12
- package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/main.js +1 -2
- package/src/shade/playground/vgeo_scene/README.md +12 -2
- package/src/shade/playground/vgeo_scene/main.js +1 -1
- package/src/shade/playground/volumetrics_froxel/README.md +191 -191
- package/src/shade/playground/volumetrics_froxel/measure.d.ts +3 -3
- package/src/shade/playground/volumetrics_froxel/measure.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/measure.js +11 -13
- package/src/shade/playground/vsm/main.d.ts.map +1 -1
- package/src/shade/playground/vsm/main.js +5 -6
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +31 -8
- package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.d.ts +28 -0
- package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/ACOUSTIC_LISTENER_RESOURCES.js +42 -0
- package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.d.ts +58 -0
- package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/ACOUSTIC_PROBE_DATABASE_SPEC.js +108 -0
- package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +161 -0
- package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/GPUAcousticProbes.js +760 -0
- package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
- package/src/shade/renderer/acoustics/acoustic_listener_order.d.ts +12 -0
- package/src/shade/renderer/acoustics/acoustic_listener_order.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/acoustic_listener_order.js +56 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_direct.d.ts.map +1 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_direct.js +5 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.d.ts +57 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_direct_cone.js +314 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_finite.d.ts +15 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_finite.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_finite.js +21 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_gather.js +1 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_lean.d.ts +27 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_lean.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_lean.js +42 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_listener.d.ts +80 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_listener.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_listener.js +274 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_partials.d.ts +2 -2
- package/src/shade/renderer/acoustics/chunk_acoustic_partials.js +2 -2
- package/src/shade/renderer/acoustics/chunk_acoustic_phonon.d.ts +7 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_phonon.d.ts.map +1 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_phonon.js +24 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_resample.js +1 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_reservoir.js +1 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_through.d.ts +43 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_through.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_through.js +153 -0
- package/src/shade/renderer/acoustics/chunk_acoustic_trace.d.ts +3 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_trace.d.ts.map +1 -1
- package/src/shade/renderer/acoustics/chunk_acoustic_trace.js +10 -1
- package/src/shade/renderer/acoustics/shader_acoustic_combine.d.ts +7 -3
- package/src/shade/renderer/acoustics/shader_acoustic_combine.d.ts.map +1 -1
- package/src/shade/renderer/acoustics/shader_acoustic_combine.js +22 -6
- package/src/shade/renderer/acoustics/shader_acoustic_coupling.d.ts +14 -0
- package/src/shade/renderer/acoustics/shader_acoustic_coupling.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/shader_acoustic_coupling.js +102 -0
- package/src/shade/renderer/acoustics/shader_acoustic_listener.d.ts +12 -0
- package/src/shade/renderer/acoustics/shader_acoustic_listener.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/shader_acoustic_listener.js +80 -0
- package/src/shade/renderer/acoustics/shader_acoustic_receive.d.ts.map +1 -1
- package/src/shade/renderer/acoustics/shader_acoustic_receive.js +27 -6
- package/src/shade/renderer/acoustics/shader_acoustic_room.d.ts +11 -0
- package/src/shade/renderer/acoustics/shader_acoustic_room.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/shader_acoustic_room.js +111 -0
- package/src/shade/renderer/acoustics/shader_acoustic_source.d.ts +18 -0
- package/src/shade/renderer/acoustics/shader_acoustic_source.d.ts.map +1 -0
- package/src/shade/renderer/acoustics/shader_acoustic_source.js +130 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +7 -7
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/build/level/VGeoFrontier.js +2 -2
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts +5 -2
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.js +5 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts +9 -2
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_group_step.js +48 -12
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +0 -22
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +0 -42
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +2 -18
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +2 -19
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_page_worker_serve.js +0 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +5 -4
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +3 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +3 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +0 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +60 -14
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +75 -39
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +0 -9
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +45 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +7 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +43 -7
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -19,30 +19,31 @@
|
|
|
19
19
|
### Sound: acoustics traced on the GPU, live, through the world the GI traces
|
|
20
20
|
|
|
21
21
|
- **Added:** `GPUAcousticSystem` (`engine/graphics3/`): the acoustic simulation's propagation, traced through the
|
|
22
|
-
scene's brick clipmap
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
integrated GPU alike. The receivers are submitted ahead of the frame's rendering (`FrameContext#early_graph`, a graph
|
|
22
|
+
scene's brick clipmap with nothing baked (`GPUAcousticProbes`, kernels in `shade/renderer/acoustics/`). One probe at
|
|
23
|
+
the listener: 2,048 fixed rays to their first hits each frame, whose surface, volume and absorption give the room's
|
|
24
|
+
mean free path, Eyring's decay per band and its lean. Each heard acoustic source marches its direct path as one cone
|
|
25
|
+
over its disk, the share each occluder leaves open and the walls' transmission of the rest (within 0.05 of the
|
|
26
|
+
geometry across an edge or a floor, read from the field's own distance), and one path from each of the listener's hits,
|
|
27
|
+
its first-order reflections at the listener, the orders after as the room's absorption and the air have them: its
|
|
28
|
+
reverberant energy, through whatever doorway it has to pass, and through walls darkened as their transmission is per
|
|
29
|
+
band. Paths through walls are read from both ends, their cost the same however many walls stand between. Every ray is
|
|
30
|
+
the same every frame, so a still scene reads the same. A source out of hearing is not traced. About 0.31 ms of an AMD
|
|
31
|
+
iGPU with one source, 64 ms with 1,024.
|
|
32
|
+
- **Added:** the path-traced acoustics it was first built on are kept in the tree, unwired: the phonon ring the listener
|
|
33
|
+
emits, gather lanes with reservoirs and a shared ray budget (`GPUAcoustics`), and the lattice. What was measured on
|
|
34
|
+
them and why they were set aside: `simulation/PATH_TRACED_RESEARCH.md`.
|
|
35
|
+
- **Added:** acoustic results reach Web Audio as soon as the device has produced them, not at the next frame. The
|
|
36
|
+
acoustics are submitted ahead of the frame's rendering (`FrameContext#early_graph`, a graph
|
|
38
37
|
the renderer submits on its own when `FrameStart` ends; `FrameGraph#pass_count`), `GPUDatabaseReadback` starts a
|
|
39
38
|
batch's mapping at the submit of the frame that recorded it (was the next apply point) and takes an `on_landed`
|
|
40
39
|
callback, and results are applied when the mapping lands (`AcousticSimulator#refresh`).
|
|
41
40
|
- **Added:** the listening page, `src/shade/playground/acoustics/`: a hall, a corridor, a soft room and open ground
|
|
42
41
|
with one source, to walk and hear the acoustics and to read each frame's direct, early and late levels.
|
|
43
|
-
- **Added:** `AcousticReverbEffect`, a bus insert:
|
|
44
|
-
acoustic instances that send to it
|
|
45
|
-
|
|
42
|
+
- **Added:** `AcousticReverbEffect`, a bus insert: a convolution with a decaying noise whose decay per band follows
|
|
43
|
+
the acoustic instances that send to it (`AcousticReverbConvolution`: Linkwitz–Riley bands, a new decay warmed in a
|
|
44
|
+
second convolver until its tail has built, then crossed over to), and whose output is corrected from a gain model
|
|
45
|
+
of what its tail holds, so leaving a room is heard at the new level at once. `AcousticReverbNetwork` takes its tank:
|
|
46
|
+
the convolution, or `AcousticReverbLines`, the feedback delay network it was first built with. An acoustic instance sends to the nearest bus above
|
|
46
47
|
its own that has one; with none, its early taps carry all of its early energy.
|
|
47
48
|
- **Added:** `GPUSceneContext#brick_clipmap` (`GPUSceneBrickClipmap`): the brick clipmap as a scene service that
|
|
48
49
|
any reader holds, built under any lighting mode while held. The probe clipmap GI holds it.
|
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Index of a cell along the 2-D Hilbert curve through a `2^order × 2^order` grid: cells next along the curve are
|
|
3
|
+
* neighbours on the grid, and every run of the curve covers a compact block of it.
|
|
4
|
+
*
|
|
5
|
+
* @param {number} x integer in `[0, 2^order)`
|
|
6
|
+
* @param {number} y integer in `[0, 2^order)`
|
|
7
|
+
* @param {number} order bits per axis, at most 15
|
|
8
|
+
* @returns {number} integer in `[0, 4^order)`
|
|
9
|
+
*/
|
|
10
|
+
export function v2_hilbert_encode(x: number, y: number, order: number): number;
|
|
11
|
+
//# sourceMappingURL=v2_hilbert_encode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2_hilbert_encode.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/hilbert/v2_hilbert_encode.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,qCALW,MAAM,KACN,MAAM,SACN,MAAM,GACJ,MAAM,CAoClB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Index of a cell along the 2-D Hilbert curve through a `2^order × 2^order` grid: cells next along the curve are
|
|
5
|
+
* neighbours on the grid, and every run of the curve covers a compact block of it.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} x integer in `[0, 2^order)`
|
|
8
|
+
* @param {number} y integer in `[0, 2^order)`
|
|
9
|
+
* @param {number} order bits per axis, at most 15
|
|
10
|
+
* @returns {number} integer in `[0, 4^order)`
|
|
11
|
+
*/
|
|
12
|
+
export function v2_hilbert_encode(x, y, order) {
|
|
13
|
+
assert.isNonNegativeInteger(order, 'order');
|
|
14
|
+
assert.lessThanOrEqual(order, 15, 'order');
|
|
15
|
+
assert.isNonNegativeInteger(x, 'x');
|
|
16
|
+
assert.isNonNegativeInteger(y, 'y');
|
|
17
|
+
|
|
18
|
+
const n = 1 << order;
|
|
19
|
+
|
|
20
|
+
assert.lessThan(x, n, 'x');
|
|
21
|
+
assert.lessThan(y, n, 'y');
|
|
22
|
+
|
|
23
|
+
let d = 0;
|
|
24
|
+
|
|
25
|
+
for (let s = n >> 1; s > 0; s >>= 1) {
|
|
26
|
+
const rx = (x & s) > 0 ? 1 : 0;
|
|
27
|
+
const ry = (y & s) > 0 ? 1 : 0;
|
|
28
|
+
|
|
29
|
+
d += s * s * ((3 * rx) ^ ry);
|
|
30
|
+
|
|
31
|
+
// turn the quadrant so the curve within it runs the same way as at the top level
|
|
32
|
+
if (ry === 0) {
|
|
33
|
+
if (rx === 1) {
|
|
34
|
+
x = s - 1 - (x & (s - 1));
|
|
35
|
+
y = s - 1 - (y & (s - 1));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const t = x;
|
|
39
|
+
|
|
40
|
+
x = y;
|
|
41
|
+
y = t;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return d;
|
|
46
|
+
}
|
|
@@ -141,6 +141,12 @@ export class FrameGraph {
|
|
|
141
141
|
* @returns {number}
|
|
142
142
|
*/
|
|
143
143
|
get pass_count(): number;
|
|
144
|
+
/**
|
|
145
|
+
* Whether nothing has been recorded into it: no pass, no resource, no scope. Such a graph can be handed to the next
|
|
146
|
+
* frame instead of a new one.
|
|
147
|
+
* @returns {boolean}
|
|
148
|
+
*/
|
|
149
|
+
get untouched(): boolean;
|
|
144
150
|
/**
|
|
145
151
|
* Innermost open recording scope, or null when recording outside of one.
|
|
146
152
|
* @returns {FrameGraphScope|null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FrameGraph.js"],"names":[],"mappings":"AAoBA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IAoHI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IA5HD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;;;;;;;;;OAYG;IACH,gBAA0B;IAE1B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAA2B;IAE3B;;;;;;;;;;OAUG;IACH,eAAyB;IAEzB;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IA+CzB;;;;;OAKG;IACH,oBAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;;;;;;;;;OAWG;IACH,iBAHW,MAAM,GACJ,eAAe,CAe3B;IAED;;OAEG;IACH,kBAKC;IAED;;;;OAIG;IACH,qBAHW,MAAM,sBAehB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAehB;IAED;;;;OAIG;IACH,qBAHW,MAAM,KAKhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,oBAEJ,MAAM,CAYlB;IAED;;;;;OAKG;IACH,6BAYC;IAED;;;;;;OAMG;IACH,4BAgBC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAqBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,oCAGJ,MAAM,CAYlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,eALW,MAAM,6CAEe,kBAAkB,WAAW,kBAAkB,KAAK,IAAI,GAC3E,gBAAgB,CA6B5B;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,mCAHoB,MAAM,WACb,OAAO,CA2DnB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,mDAHoB,MAAM,WACb,MAAM,CA+ClB;IAED,gBAwIC;IA2BD;;;OAGG;IACH,iBAFW,kBAAkB,QA4F5B;IA6BD;;;;;;;;;;;;OAYG;IACH,gBAFY;QAAC,MAAM,EAAE,EAAE,CAAC;QAAC,SAAS,EAAE,EAAE,CAAA;KAAC,CA6DtC;IAED;;;;;OAKG;IACH,eAFY,MAAM,CA6LjB;IAGL;;;;OAIG;IACH,uBAFU,OAAO,CAEgB;;CAPhC;
|
|
1
|
+
{"version":3,"file":"FrameGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FrameGraph.js"],"names":[],"mappings":"AAoBA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IAoHI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IA5HD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;;;;;;;;;OAYG;IACH,gBAA0B;IAE1B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAA2B;IAE3B;;;;;;;;;;OAUG;IACH,eAAyB;IAEzB;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IA+CzB;;;;;OAKG;IACH,oBAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;;OAIG;IACH,yBAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;;;;;;;;;;OAWG;IACH,iBAHW,MAAM,GACJ,eAAe,CAe3B;IAED;;OAEG;IACH,kBAKC;IAED;;;;OAIG;IACH,qBAHW,MAAM,sBAehB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAehB;IAED;;;;OAIG;IACH,qBAHW,MAAM,KAKhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,oBAEJ,MAAM,CAYlB;IAED;;;;;OAKG;IACH,6BAYC;IAED;;;;;;OAMG;IACH,4BAgBC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAqBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,oCAGJ,MAAM,CAYlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,eALW,MAAM,6CAEe,kBAAkB,WAAW,kBAAkB,KAAK,IAAI,GAC3E,gBAAgB,CA6B5B;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,mCAHoB,MAAM,WACb,OAAO,CA2DnB;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,mDAHoB,MAAM,WACb,MAAM,CA+ClB;IAED,gBAwIC;IA2BD;;;OAGG;IACH,iBAFW,kBAAkB,QA4F5B;IA6BD;;;;;;;;;;;;OAYG;IACH,gBAFY;QAAC,MAAM,EAAE,EAAE,CAAC;QAAC,SAAS,EAAE,EAAE,CAAA;KAAC,CA6DtC;IAED;;;;;OAKG;IACH,eAFY,MAAM,CA6LjB;IAGL;;;;OAIG;IACH,uBAFU,OAAO,CAEgB;;CAPhC;iCA3oCY,OAAO,yBAAyB,EAAE,kBAAkB;iCACpD,OAAO,kCAAkC,EAAE,kBAAkB;gCAV1C,sBAAsB;8BAKxB,oBAAoB;6BACrB,mBAAmB;mCAFb,yBAAyB;iCAF3B,uBAAuB"}
|
|
@@ -215,6 +215,15 @@ export class FrameGraph {
|
|
|
215
215
|
return this.__pass_nodes.length;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Whether nothing has been recorded into it: no pass, no resource, no scope. Such a graph can be handed to the next
|
|
220
|
+
* frame instead of a new one.
|
|
221
|
+
* @returns {boolean}
|
|
222
|
+
*/
|
|
223
|
+
get untouched() {
|
|
224
|
+
return this.#state === FrameGraphState.Recording && this.__pass_nodes.length === 0 && this.__resource_registry.length === 0 && this.#scope_count === 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
218
227
|
/**
|
|
219
228
|
* Innermost open recording scope, or null when recording outside of one.
|
|
220
229
|
* @returns {FrameGraphScope|null}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The GPU acoustics as the simulator reads them ({@link AcousticPropagation}): a
|
|
3
|
-
*
|
|
2
|
+
* The GPU acoustics as the simulator reads them ({@link AcousticPropagation}): a row a live source, its direct path as
|
|
3
|
+
* it last landed, and the reverb the probe at the listener measures. Neutral where there is no device, and for a
|
|
4
|
+
* source whose first result has not landed.
|
|
4
5
|
*/
|
|
5
6
|
export class GPUAcousticPropagation extends AcousticPropagation {
|
|
6
7
|
/** The listener the last solve was handed, and whether any was. */
|
|
7
8
|
listener: Float64Array;
|
|
8
9
|
has_listener: boolean;
|
|
9
10
|
/**
|
|
10
|
-
* @returns {
|
|
11
|
+
* @returns {GPUAcousticProbes|null}
|
|
11
12
|
*/
|
|
12
|
-
get acoustics():
|
|
13
|
-
/**
|
|
14
|
-
* @returns {GPUAcousticLattice|null} the lattice that primes a newborn source, while there is a device
|
|
15
|
-
*/
|
|
16
|
-
get lattice(): GPUAcousticLattice;
|
|
13
|
+
get acoustics(): GPUAcousticProbes;
|
|
17
14
|
/**
|
|
18
15
|
* Take the acoustics of a device, or none. Rows of the acoustics before are the old device's: every source takes
|
|
19
16
|
* a row anew at its next solve.
|
|
20
17
|
*
|
|
21
|
-
* @param {
|
|
22
|
-
* @param {GPUAcousticLattice|null} lattice its lattice, which primes a source as it starts
|
|
18
|
+
* @param {GPUAcousticProbes|null} acoustics
|
|
23
19
|
*/
|
|
24
|
-
set_acoustics(acoustics:
|
|
20
|
+
set_acoustics(acoustics: GPUAcousticProbes | null): void;
|
|
25
21
|
/**
|
|
26
|
-
* Sources with a
|
|
22
|
+
* Sources with a row.
|
|
27
23
|
* @returns {number}
|
|
28
24
|
*/
|
|
29
25
|
get source_count(): number;
|
|
@@ -32,9 +28,10 @@ export class GPUAcousticPropagation extends AcousticPropagation {
|
|
|
32
28
|
/**
|
|
33
29
|
* # The GPU acoustics of a scene
|
|
34
30
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
31
|
+
* Sound traced through the scene's brick clipmap, the world the probe clipmap GI traces, for the
|
|
32
|
+
* {@link AcousticSimulator} it is handed: one probe at the listener, its rays' first hits the room it stands in, and
|
|
33
|
+
* each heard source's direct path and the share of that room it lights (`GPUAcousticProbes`). Nothing is baked. The system is the simulator's {@link AcousticPropagation}: the simulator asks
|
|
34
|
+
* it for each live source's terms and knows nothing of the device.
|
|
38
35
|
*
|
|
39
36
|
* ```js
|
|
40
37
|
* const simulator = configureAcousticSimulation(configuration, audio_emitter_system);
|
|
@@ -48,18 +45,16 @@ export class GPUAcousticPropagation extends AcousticPropagation {
|
|
|
48
45
|
* `acoustic_materials` at its row, which the brick clipmap's acoustic payload reads as each brick is built; a
|
|
49
46
|
* material that changed is written again, and the cells of its row built again. A mesh with no `AcousticBody`
|
|
50
47
|
* is the engine's default material, `AcousticMaterial`'s own.
|
|
51
|
-
* - **Sources.** A live source the simulator solves is a
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* lands it hears its prior, the lattice's terms about it (`GPUAcousticLattice`); where the lattice has none about
|
|
56
|
-
* it, the neutral solution.
|
|
48
|
+
* - **Sources.** A live source the simulator solves is a row, written when it starts or moves, freed when the simulator
|
|
49
|
+
* forgets it ({@link GPUAcousticPropagation}); it is traced in the frames it is heard. Its terms are its direct path
|
|
50
|
+
* and its share of the room as they last landed, and the room's reverb; until its first result lands, the neutral
|
|
51
|
+
* solution.
|
|
57
52
|
* - **The apply point**: the results that landed since the last update.
|
|
58
53
|
*
|
|
59
54
|
* ## The GPU half, at `FramePhase.FrameStart`
|
|
60
55
|
*
|
|
61
|
-
* The
|
|
62
|
-
* scene's clipmap holds from the frames before, and
|
|
56
|
+
* The listener's rays and the room they make, then the heard sources' coupling and direct paths, traced through the
|
|
57
|
+
* bricks the scene's clipmap holds from the frames before, and what they wrote read back. Nothing while the scene's
|
|
63
58
|
* clipmap is not built yet, or before the simulator has solved with a listener.
|
|
64
59
|
*
|
|
65
60
|
* ## Delivery
|
|
@@ -70,10 +65,13 @@ export class GPUAcousticPropagation extends AcousticPropagation {
|
|
|
70
65
|
*
|
|
71
66
|
* ## Lifetime
|
|
72
67
|
*
|
|
73
|
-
* Its device state is made when the scene first has a context: the
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
68
|
+
* Its device state is made when the scene first has a context: the rows and the room, the bricks' acoustic records,
|
|
69
|
+
* and a hold on the scene's brick clipmap with the records as its payload, which has the clipmap built under any
|
|
70
|
+
* lighting mode. A new context (a device restart) drops them with the old device and makes them again; shutdown gives
|
|
71
|
+
* them back and the simulator its own propagation back.
|
|
72
|
+
*
|
|
73
|
+
* The path-traced acoustics (`GPUAcoustics`: the phonon ring, its receivers and the lattice) are in the tree, unwired:
|
|
74
|
+
* `simulation/PATH_TRACED_RESEARCH.md`.
|
|
77
75
|
*/
|
|
78
76
|
export class GPUAcousticSystem extends System<any> {
|
|
79
77
|
/**
|
|
@@ -108,8 +106,8 @@ export class GPUAcousticSystem extends System<any> {
|
|
|
108
106
|
unlink(body: AcousticBody, entity: number): void;
|
|
109
107
|
update(time_delta: any): void;
|
|
110
108
|
/**
|
|
111
|
-
* The frame's GPU work, at `FramePhase.FrameStart`:
|
|
112
|
-
* left them. Recorded into the graph the renderer submits ahead of the frame (`FrameContext#early_graph`), so the
|
|
109
|
+
* The frame's GPU work, at `FramePhase.FrameStart`: the listener's rays and the room, then the heard sources, through
|
|
110
|
+
* the bricks as the frames before left them. Recorded into the graph the renderer submits ahead of the frame (`FrameContext#early_graph`), so the
|
|
113
111
|
* readback lands as soon as this work is done rather than behind the frame's rendering.
|
|
114
112
|
*
|
|
115
113
|
* @param {FrameContext} frame
|
|
@@ -123,7 +121,7 @@ export class GPUAcousticSystem extends System<any> {
|
|
|
123
121
|
#private;
|
|
124
122
|
}
|
|
125
123
|
/**
|
|
126
|
-
* Records {@link GPUAcousticSystem}'s
|
|
124
|
+
* Records {@link GPUAcousticSystem}'s listener, room and sources at the start of a frame.
|
|
127
125
|
*/
|
|
128
126
|
export class GPUAcousticExtension extends RenderExtension {
|
|
129
127
|
/**
|
|
@@ -138,8 +136,7 @@ export type AcousticSimulator = import("../sound/simulation/AcousticSimulator.js
|
|
|
138
136
|
export type AcousticSolution = import("../sound/simulation/core/AcousticSolution.js").AcousticSolution;
|
|
139
137
|
export type EventInstance = import("../sound/sopra/runtime/EventInstance.js").EventInstance;
|
|
140
138
|
import { AcousticPropagation } from "../sound/simulation/core/AcousticPropagation.js";
|
|
141
|
-
import {
|
|
142
|
-
import { GPUAcousticLattice } from "../../shade/renderer/acoustics/GPUAcousticLattice.js";
|
|
139
|
+
import { GPUAcousticProbes } from "../../shade/renderer/acoustics/GPUAcousticProbes.js";
|
|
143
140
|
import { System } from "../ecs/System.js";
|
|
144
141
|
import { AcousticBody } from "../sound/simulation/ecs/AcousticBody.js";
|
|
145
142
|
import { RenderExtension } from "../../shade/renderer/extension/RenderExtension.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GPUAcousticSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/GPUAcousticSystem.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GPUAcousticSystem.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics3/GPUAcousticSystem.js"],"names":[],"mappings":"AA2DA;;;;GAIG;AACH;IAgBI,mEAAmE;IACnE,uBAA+B;IAC/B,sBAAqB;IAErB;;OAEG;IACH,mCAEC;IAED;;;;;OAKG;IACH,yBAFW,iBAAiB,GAAC,IAAI,QAKhC;IAED;;;OAGG;IACH,2BAEC;;CAwJJ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH;IAEI;;;;OAIG;IACH,iCAFW,OAAO,gDAAgD,EAAE,eAAe,QAKlF;IAsDD;;;;OAIG;IACH,sBAJW,OAAO,qBAAqB,EAAE,cAAc,SAC5C,OAAO,qCAAqC,EAAE,KAAK,aACnD,iBAAiB,EAY3B;IAnED,sCAA8B;IAqE9B;;;OAGG;IACH,0CAEC;IAED,2CAKC;IAED,4CAWC;IAED;;;OAGG;IACH,WAHW,YAAY,UACZ,MAAM,QAQhB;IAED;;;OAGG;IACH,aAHW,YAAY,UACZ,MAAM,QAiBhB;IAED,8BAmBC;IAED;;;;;;OAMG;IACH,eAFW,YAAY,QAsCtB;IA2IL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;;CAN9C;AAQD;;GAEG;AACH;IAII;;OAEG;IACH,oBAFW,iBAAiB,EAM3B;IADG,0BAAoB;CAgB3B;8BA7pBY,OAAO,+CAA+C,EAAE,eAAe;2BACvE,OAAO,gDAAgD,EAAE,YAAY;gCACrE,OAAO,0CAA0C,EAAE,iBAAiB;+BACpE,OAAO,8CAA8C,EAAE,gBAAgB;4BACvE,OAAO,yCAAyC,EAAE,aAAa;oCATxC,iDAAiD;kCAT9E,qDAAqD;uBAQrC,kBAAkB;6BAGZ,yCAAyC;gCANtC,mDAAmD"}
|