@woosh/meep-engine 3.33.0 → 3.34.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/editor/Editor.d.ts.map +1 -1
- package/editor/Editor.js +0 -3
- package/editor/ecs/component/prototypeObjectEditor.js +1 -165
- package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -1
- package/editor/ecs/component/registerBasicTypeEditors.js +0 -5
- package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -1
- package/editor/ecs/component/registerEngineComponentEditors.js +0 -20
- package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -1
- package/editor/process/SymbolicDisplayProcess.js +100 -106
- package/editor/prototypeEditorShell.d.ts.map +1 -1
- package/editor/prototypeEditorShell.js +190 -186
- package/editor/templates/entity_templates.d.ts.map +1 -1
- package/editor/templates/entity_templates.js +10 -27
- package/editor/view/makeEntityDecorators.js +2 -2
- package/package.json +1 -1
- package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.d.ts +3 -3
- package/src/core/geom/3d/aabb/MovingBoundingBox.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine → core/geom/3d/aabb}/MovingBoundingBox.js +5 -5
- package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts +3 -0
- package/src/core/math/lookup/RGBA_LUT_HEATMAP_IR.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGBA_LUT_HEATMAP_IR.js +1 -1
- package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts +6 -0
- package/src/core/math/lookup/RGB_LUT_INFERNO.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_INFERNO.js +1 -1
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.d.ts +1 -1
- package/src/core/math/lookup/RGB_LUT_TURBO.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_TURBO.js +1 -1
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.d.ts +1 -1
- package/src/core/math/lookup/RGB_LUT_VIRIDIS.d.ts.map +1 -0
- package/src/{engine/graphics/particles/particular/engine/parameter/sample → core/math/lookup}/RGB_LUT_VIRIDIS.js +1 -1
- package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
- package/src/engine/animation/AnimatedActions.js +2 -4
- package/src/engine/animation/AnimationUtils.d.ts +1 -17
- package/src/engine/animation/AnimationUtils.d.ts.map +1 -1
- package/src/engine/animation/AnimationUtils.js +138 -246
- package/src/engine/ecs/EntityManager.d.ts +1 -1
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +2 -2
- package/src/engine/ecs/storage/binary/SERIALIZATION_COVERAGE.md +268 -275
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +0 -10
- package/src/engine/graphics/geometry/distribute_points_on_indexed_triangles.d.ts.map +1 -0
- package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.js +3 -3
- package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/lut_to_sampler.d.ts.map +1 -0
- package/src/engine/graphics/{particles/particular/engine/utils/volume → texture/sampler}/lut_to_sampler.js +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -3
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +0 -3
- package/src/engine/network/NetworkSession.d.ts +1 -1
- package/src/engine/network/NetworkSession.js +1 -1
- package/src/engine/physics/cloth/MEASUREMENTS.md +115 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +2 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +9 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +30 -7
- 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 +12 -2
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +11 -2
- package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/LiveEmitterSet.js +14 -7
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts +6 -15
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.d.ts.map +1 -1
- package/src/engine/sound/ecs/audio/SpatialAudioIndex.js +161 -174
- package/src/shade/device/mock/SoftwareGPUBuffer.d.ts +5 -3
- package/src/shade/device/mock/SoftwareGPUBuffer.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUBuffer.js +32 -3
- package/src/shade/playground/caldera/main.js +73 -60
- package/src/shade/playground/vgeo_runtime/main.js +25 -77
- package/src/shade/playground/vgeo_scene/main.js +2231 -2217
- package/src/shade/renderer/GraphicsContext.d.ts +7 -0
- package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
- package/src/shade/renderer/GraphicsContext.js +11 -2
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +38 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +8 -0
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +21 -0
- package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +9 -10
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +5 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +25 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +115 -101
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +282 -140
- package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +30 -0
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN_2026_09_14.md +4 -1
- package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +536 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +6 -2
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +68 -19
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts +2 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoPageFetcher.js +17 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts +4 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +42 -12
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +93 -12
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +166 -20
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +30 -7
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +12 -5
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +23 -13
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_remainder.js +1 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +1 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +10 -6
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +45 -17
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +61 -19
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +8 -11
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +9 -16
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +25 -10
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +10 -8
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +19 -7
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts +4 -2
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/make_vgeo_page_worker.js +4 -2
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts +4 -0
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/Brick4LightMap.js +7 -0
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +1 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +2 -0
- package/src/shade/renderer/particles/DESIGN.md +4 -10
- package/src/shade/renderer/particles/ParticleConstants.d.ts +1 -3
- package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
- package/src/shade/renderer/particles/ParticleConstants.js +1 -3
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts +3 -4
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +3 -4
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +45 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +99 -0
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +4 -4
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -36
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts +15 -0
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/shader_gather_bucket.js +103 -0
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts +3 -0
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.js +6 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +26 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +91 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts +22 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/fast/graph_gather_meshes_from_buckets.js +102 -0
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts +2 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +28 -24
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +32 -28
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +9 -105
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +5 -0
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +11 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +11 -3
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +93 -21
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +4 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +5 -23
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +63 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts +12 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_VGEO_TAU_SCALE.js +11 -0
- package/src/shade/renderer/shadow/map/Shadowmap.d.ts +15 -0
- package/src/shade/renderer/shadow/map/Shadowmap.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/Shadowmap.js +17 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts +25 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shadowmap_caster_detail_pending.js +22 -0
- package/src/shade/renderer/shadow/map/shadowmap_update_score.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shadowmap_update_score.js +5 -2
- package/src/shade/renderer/texture/TextureManager.d.ts +2 -1
- package/src/shade/renderer/texture/TextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/TextureManager.js +4 -1
- package/src/shade/renderer/texture/mipmaps/WebGPUMipmapGenerator.js +1 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts +9 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.d.ts.map +1 -1
- package/src/shade/renderer/util/Uint32BufferSamplingStats.js +55 -5
- package/src/shade/renderer/view/ViewManager.d.ts +7 -1
- package/src/shade/renderer/view/ViewManager.d.ts.map +1 -1
- package/src/shade/renderer/view/ViewManager.js +17 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +1 -0
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +0 -20
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +0 -35
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +0 -12
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.js +0 -17
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +0 -14
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.js +0 -18
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +0 -52
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.js +0 -58
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +0 -47
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.js +0 -58
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +0 -16
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +0 -1
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.js +0 -21
- package/editor/particles/rebuildParticleEmitter.d.ts +0 -11
- package/editor/particles/rebuildParticleEmitter.d.ts.map +0 -1
- package/editor/particles/rebuildParticleEmitter.js +0 -31
- package/editor/process/ParticleEmitterRebuildProcess.d.ts +0 -66
- package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +0 -1
- package/editor/process/ParticleEmitterRebuildProcess.js +0 -217
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +0 -18
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +0 -1
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.js +0 -140
- package/src/engine/animation/removeEntityGenericEffect.d.ts +0 -18
- package/src/engine/animation/removeEntityGenericEffect.d.ts.map +0 -1
- package/src/engine/animation/removeEntityGenericEffect.js +0 -160
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts +0 -16
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.d.ts.map +0 -1
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +0 -194
- package/src/engine/graphics/ecs/sprite/Sprite.d.ts +0 -15
- package/src/engine/graphics/ecs/sprite/Sprite.d.ts.map +0 -1
- package/src/engine/graphics/ecs/sprite/Sprite.js +0 -14
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts +0 -11
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +0 -1
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +0 -144
- package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +0 -61
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +0 -229
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionFromType.js +0 -8
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/EmissionShapeType.js +0 -9
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICLE_ATTRIBUTES.js +0 -12
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts +0 -3
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/PARTICULAR_PARTICLE_SPECIFICATION.js +0 -84
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +0 -285
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +0 -1201
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js +0 -67
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -197
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +0 -398
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleParameters.js +0 -4
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +0 -162
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -472
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts +0 -10
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/computeEmissionFunction.js +0 -37
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/distance_to_camera.js +0 -25
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.js +0 -28
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -19
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.js +0 -162
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationUpgrader_0_1.js +0 -103
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts +0 -8
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/emitter/write_particle_patch_uv.js +0 -28
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTableFlags.js +0 -2
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -60
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +0 -128
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +0 -47
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +0 -77
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -45
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +0 -93
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +0 -95
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +0 -239
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts +0 -3
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_INFERNO.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_TURBO.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/parameter/sample/RGB_LUT_VIRIDIS.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/ParticleRenderer.js +0 -28
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/BILLBOARD_PARTICLE_SPECIFICATION.js +0 -24
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts +0 -13
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticlePool.js +0 -27
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts +0 -33
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/SoftBillboardParticleRenderer.js +0 -80
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +0 -49
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +0 -135
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts +0 -7
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/shader/debugAtlas.js +0 -14
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts +0 -41
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/AbstractSimulationStep.js +0 -59
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepApplyForce.js +0 -56
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseAcceleration.js +0 -84
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts +0 -4
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepCurlNoiseVelocity.js +0 -80
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts +0 -29
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepDefinition.js +0 -43
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts +0 -5
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepFixedPhysics.js +0 -104
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/SimulationStepType.js +0 -11
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/simulator/update_parameters.js +0 -64
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts +0 -9
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distributeParticlesOnObject3D.js +0 -172
- package/src/engine/graphics/particles/particular/engine/utils/distribute_points_on_indexed_triangles.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts +0 -20
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/distrubuteParticlesOnMesh.js +0 -84
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +0 -81
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.js +0 -200
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +0 -6
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.js +0 -8
- package/src/engine/graphics/particles/particular/engine/utils/volume/lut_to_sampler.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -20
- package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/Operation.js +0 -20
- package/src/engine/graphics/particles/particular/group/OperationType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/OperationType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/OperationType.js +0 -9
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -27
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +0 -27
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts +0 -8
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleAttributeType.js +0 -11
- package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/ParticleDataType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleDataType.js +0 -10
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -24
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +0 -48
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts +0 -7
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/itemSizeFromAttributeType.js +0 -20
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts +0 -6
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +0 -162
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts +0 -8
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.d.ts.map +0 -1
- package/src/engine/graphics/particles/particular/group/typedArrayConstructorFromDataType.js +0 -19
- package/src/engine/graphics3/ParticleEmitterSystem.d.ts +0 -77
- package/src/engine/graphics3/ParticleEmitterSystem.d.ts.map +0 -1
- package/src/engine/graphics3/ParticleEmitterSystem.js +0 -307
- package/src/engine/graphics3/ParticleEmitterSystem3.d.ts +0 -10
- package/src/engine/graphics3/ParticleEmitterSystem3.d.ts.map +0 -1
- package/src/engine/graphics3/ParticleEmitterSystem3.js +0 -10
- package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts +0 -61
- package/src/engine/graphics3/particles/GPUParticularRenderer.d.ts.map +0 -1
- package/src/engine/graphics3/particles/GPUParticularRenderer.js +0 -627
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts +0 -85
- package/src/engine/graphics3/particles/particle_gpu_records.d.ts.map +0 -1
- package/src/engine/graphics3/particles/particle_gpu_records.js +0 -227
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts +0 -35
- package/src/shade/renderer/particles/shaders/shader_particle_render.d.ts.map +0 -1
- package/src/shade/renderer/particles/shaders/shader_particle_render.js +0 -135
- /package/src/engine/graphics/{particles/particular/engine/utils → geometry}/distribute_points_on_indexed_triangles.d.ts +0 -0
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { assert } from "../../../../../core/assert.js";
|
|
2
2
|
import { BufferResourceDescriptor } from "../../../../device/graph/BufferResourceDescriptor.js";
|
|
3
|
-
import { noop } from "../../../../../core/function/noop.js";
|
|
4
3
|
import { vgeo_cut_feedback_layout } from "./cut/vgeo_cut_feedback_layout.js";
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* @typedef {import("./GPUVirtualGeometryPool.js").GPUVirtualGeometryPool} GPUVirtualGeometryPool
|
|
7
|
+
* @typedef {import("./VGeoViewCut.js").VGeoViewCut} VGeoViewCut
|
|
8
8
|
* @typedef {import("../../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} FrameGraph
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* The most views one frame's feedback is laid out for. A view past it shares the last slot, which
|
|
13
|
+
* merges its counters and its want slice with that view's and loses nothing else; the bound exists
|
|
14
|
+
* so that a frame drawing many point lights for the first time — first draws bypass the shadow
|
|
15
|
+
* budget — cannot grow the buffer without limit.
|
|
16
|
+
*
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
const SLOT_CEILING = 64;
|
|
20
|
+
|
|
11
21
|
/**
|
|
12
22
|
* What one frame of virtual geometry needs that is not a page: the threshold, the feedback buffer
|
|
13
23
|
* every view writes into, and the parameters every pass reads.
|
|
@@ -18,9 +28,16 @@ import { vgeo_cut_feedback_layout } from "./cut/vgeo_cut_feedback_layout.js";
|
|
|
18
28
|
* virtual geometry is view-dependent by construction — but everything here is shared between them,
|
|
19
29
|
* which is exactly what §4 means by "the setup is shared rather than the result".
|
|
20
30
|
*
|
|
21
|
-
* **
|
|
22
|
-
*
|
|
23
|
-
*
|
|
31
|
+
* **A frame spans every graph of a render.** The renderer opens it before the shadow maps are drawn
|
|
32
|
+
* and closes it after the main view's graph is recorded, and each shadow map records into a
|
|
33
|
+
* `FrameGraph` of its own (SHADOW_PLAN_2026_09_28 §2.1). So the feedback buffer is not a transient of
|
|
34
|
+
* any one graph: it is a buffer this runtime owns, **imported** into each graph that cuts, and the
|
|
35
|
+
* first graph of a frame to import it clears it. Graphs are encoded in the order they are recorded
|
|
36
|
+
* into one encoder, which is the only ordering the frame needs between them.
|
|
37
|
+
*
|
|
38
|
+
* **Every view that cuts takes a slot** (§2.4): its own counters, its own want slice and its own
|
|
39
|
+
* stamp tag, so one view's list running out cannot silence another's, and a reading can say which
|
|
40
|
+
* view needed more wavefronts. The view the frame is opened for is slot 0.
|
|
24
41
|
*
|
|
25
42
|
* @author Alex Goldring
|
|
26
43
|
* @copyright Company Named Limited (c) 2026
|
|
@@ -31,14 +48,11 @@ export class GPUVirtualGeometryRuntime {
|
|
|
31
48
|
*/
|
|
32
49
|
#pool;
|
|
33
50
|
|
|
34
|
-
|
|
35
|
-
|
|
36
51
|
/**
|
|
37
52
|
* @type {number}
|
|
38
53
|
*/
|
|
39
54
|
#want_capacity;
|
|
40
55
|
|
|
41
|
-
|
|
42
56
|
/**
|
|
43
57
|
* @type {number}
|
|
44
58
|
*/
|
|
@@ -59,11 +73,6 @@ export class GPUVirtualGeometryRuntime {
|
|
|
59
73
|
*/
|
|
60
74
|
#iteration_ceiling;
|
|
61
75
|
|
|
62
|
-
/**
|
|
63
|
-
* @type {number}
|
|
64
|
-
*/
|
|
65
|
-
#iteration_escalations = 0;
|
|
66
|
-
|
|
67
76
|
/**
|
|
68
77
|
* @type {number}
|
|
69
78
|
*/
|
|
@@ -71,6 +80,7 @@ export class GPUVirtualGeometryRuntime {
|
|
|
71
80
|
|
|
72
81
|
/**
|
|
73
82
|
* Pixels of permitted error — the single quality/perf lever, and a runtime dial by design §4.
|
|
83
|
+
* A view cuts at this times its own {@link VGeoViewCut#tau_scale}.
|
|
74
84
|
* @type {number}
|
|
75
85
|
*/
|
|
76
86
|
tau = 1;
|
|
@@ -81,10 +91,15 @@ export class GPUVirtualGeometryRuntime {
|
|
|
81
91
|
cull_enabled = true;
|
|
82
92
|
|
|
83
93
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @type {number}
|
|
94
|
+
* @type {boolean}
|
|
86
95
|
*/
|
|
87
|
-
#
|
|
96
|
+
#frame_open = false;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The feedback buffer, persistent and re-made only when a frame's layout outgrows it.
|
|
100
|
+
* @type {GPUBuffer|null}
|
|
101
|
+
*/
|
|
102
|
+
#feedback_buffer = null;
|
|
88
103
|
|
|
89
104
|
/**
|
|
90
105
|
* @type {ReturnType<vgeo_cut_feedback_layout>|undefined}
|
|
@@ -92,10 +107,43 @@ export class GPUVirtualGeometryRuntime {
|
|
|
92
107
|
#layout;
|
|
93
108
|
|
|
94
109
|
/**
|
|
95
|
-
*
|
|
110
|
+
* The current version of the feedback buffer in each graph that has imported it this frame.
|
|
111
|
+
* @type {Map<FrameGraph, number>}
|
|
112
|
+
*/
|
|
113
|
+
#imports = new Map();
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Whether a graph of this frame has already recorded the clear.
|
|
117
|
+
* @type {boolean}
|
|
118
|
+
*/
|
|
119
|
+
#cleared = false;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* This frame's slot for each view that has cut in it.
|
|
123
|
+
* @type {Map<VGeoViewCut, number>}
|
|
124
|
+
*/
|
|
125
|
+
#slot_of = new Map();
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* This frame's views, by slot; a slot shared past the layout holds more than one.
|
|
129
|
+
* @type {VGeoViewCut[][]}
|
|
96
130
|
*/
|
|
97
|
-
#
|
|
131
|
+
#slots = [];
|
|
98
132
|
|
|
133
|
+
/**
|
|
134
|
+
* The most slots any frame has asked for, which is what the next frame is laid out for — and
|
|
135
|
+
* never fewer than two, so that a view past the layout always has a slot to share that is not
|
|
136
|
+
* the frame's own view's. Sharing slot 0 merged a cascade's counters into the main view's reading
|
|
137
|
+
* and escalated the main view's wavefront bound on the cascade's remainder.
|
|
138
|
+
* @type {number}
|
|
139
|
+
*/
|
|
140
|
+
#slot_high_water = 2;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The view the last frame was opened for.
|
|
144
|
+
* @type {VGeoViewCut|undefined}
|
|
145
|
+
*/
|
|
146
|
+
#frame_view;
|
|
99
147
|
|
|
100
148
|
/**
|
|
101
149
|
* @type {number}
|
|
@@ -117,7 +165,7 @@ export class GPUVirtualGeometryRuntime {
|
|
|
117
165
|
* overriding the derivation below
|
|
118
166
|
* @param {number} [options.queue_capacity] traversal items one wavefront may hold
|
|
119
167
|
* @param {number} [options.max_iterations] wavefronts before the descent is abandoned, to start
|
|
120
|
-
* with;
|
|
168
|
+
* with; each view raises its own from what its cut reports
|
|
121
169
|
* @param {number} [options.max_iteration_ceiling] as far as that raising may go
|
|
122
170
|
* @param {number} [options.descent_steps] steps of the descent one traversal dispatch runs
|
|
123
171
|
* before handing back what it still holds; see the traversal kernel for why it cannot
|
|
@@ -153,10 +201,10 @@ export class GPUVirtualGeometryRuntime {
|
|
|
153
201
|
*/
|
|
154
202
|
queue_capacity = 1 << 16,
|
|
155
203
|
/*
|
|
156
|
-
Where
|
|
157
|
-
reading says
|
|
158
|
-
— so this is the cost a
|
|
159
|
-
a limit anyone has to get right in advance.
|
|
204
|
+
Where every view's wavefront bound *starts*. Each view raises its own when a
|
|
205
|
+
reading says its descent could not finish — see
|
|
206
|
+
`VGeoViewCut.note_incomplete_descent` — so this is the cost a view pays until it
|
|
207
|
+
has been told otherwise rather than a limit anyone has to get right in advance.
|
|
160
208
|
|
|
161
209
|
Eight is what almost every cut needs: one container at a modest viewport drains
|
|
162
210
|
in six. A converted scene at 3441×1440 does not, and nothing on the host can
|
|
@@ -199,8 +247,6 @@ export class GPUVirtualGeometryRuntime {
|
|
|
199
247
|
this.#max_iterations = max_iterations;
|
|
200
248
|
this.#iteration_ceiling = Math.max(max_iterations, max_iteration_ceiling);
|
|
201
249
|
this.#descent_steps = descent_steps;
|
|
202
|
-
|
|
203
|
-
|
|
204
250
|
}
|
|
205
251
|
|
|
206
252
|
/**
|
|
@@ -234,11 +280,8 @@ export class GPUVirtualGeometryRuntime {
|
|
|
234
280
|
}
|
|
235
281
|
|
|
236
282
|
/**
|
|
237
|
-
* Wavefronts
|
|
238
|
-
*
|
|
239
|
-
* A **high-water mark**, not a setting: it starts where the host put it and is raised by
|
|
240
|
-
* {@link note_incomplete_descent} from what the cut reports. `graph_vgeo_expand_instances_to_meshlets`
|
|
241
|
-
* reads it while it is recording passes, so a rise lands on the next frame.
|
|
283
|
+
* Wavefronts a view's descent starts with — each view raises its own from what its cut reports
|
|
284
|
+
* (`VGeoViewCut.note_incomplete_descent`), and cuts at the larger of the two.
|
|
242
285
|
*
|
|
243
286
|
* @returns {number}
|
|
244
287
|
*/
|
|
@@ -247,64 +290,14 @@ export class GPUVirtualGeometryRuntime {
|
|
|
247
290
|
}
|
|
248
291
|
|
|
249
292
|
/**
|
|
250
|
-
*
|
|
251
|
-
* number, once, for one that needed more than it was given.
|
|
293
|
+
* As far as a view's wavefront bound may be raised.
|
|
252
294
|
*
|
|
253
295
|
* @returns {number}
|
|
254
296
|
*/
|
|
255
|
-
get iteration_escalations() {
|
|
256
|
-
return this.#iteration_escalations;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* @returns {number}
|
|
261
|
-
*/
|
|
262
297
|
get iteration_ceiling() {
|
|
263
298
|
return this.#iteration_ceiling;
|
|
264
299
|
}
|
|
265
300
|
|
|
266
|
-
/**
|
|
267
|
-
* A reading saying the descent stopped with work still queued — raise the bound and keep it
|
|
268
|
-
* raised.
|
|
269
|
-
*
|
|
270
|
-
* **This is the only place the engine can learn it.** How many wavefronts a cut needs is a
|
|
271
|
-
* function of the frontier's *breadth*, which is a function of the scene, the viewpoint and the
|
|
272
|
-
* render target together; the kernel cannot know it before it runs and the host cannot know it
|
|
273
|
-
* at all. So the bound is guessed low, and the one reading that says the guess was wrong —
|
|
274
|
-
* `VGEO_CUT_STAT.QUEUE_REMAINING`, non-zero exactly when items were abandoned — pays for
|
|
275
|
-
* correcting it. It is the same shape as the rasterizer's meshlet counts, which cannot be known
|
|
276
|
-
* before the expansion runs either and are grown from what the frame reported.
|
|
277
|
-
*
|
|
278
|
-
* **Doubling, because the reading does not say how much more was needed.** A remainder is a
|
|
279
|
-
* count of *items*, and what they cost in wavefronts depends on how they spill; there is no
|
|
280
|
-
* ratio to convert one into the other. So it goes up by a factor until it drains, which is at
|
|
281
|
-
* most three steps from 8 to the ceiling.
|
|
282
|
-
*
|
|
283
|
-
* **Never lowered.** A frame that drained is evidence about that frame, not that the scene got
|
|
284
|
-
* smaller — and a bound that fell back would re-learn the same lesson every time the camera
|
|
285
|
-
* turned away and back, at a hole a time. An unused wavefront is an empty indirect dispatch,
|
|
286
|
-
* which is the cheap side of that trade.
|
|
287
|
-
*
|
|
288
|
-
* What it costs when it is wrong is bounded by the readback: the cut is capped at two readings
|
|
289
|
-
* in flight and skips frames when saturated, so the scene draws with a hole for the few frames
|
|
290
|
-
* between the first truncated descent and the reading that reports it — and then never again.
|
|
291
|
-
*
|
|
292
|
-
* @param {number} remaining items the descent still held when it was abandoned
|
|
293
|
-
* @returns {boolean} whether the bound moved
|
|
294
|
-
*/
|
|
295
|
-
note_incomplete_descent(remaining) {
|
|
296
|
-
assert.isNonNegativeInteger(remaining, 'remaining');
|
|
297
|
-
|
|
298
|
-
if (remaining === 0 || this.#max_iterations >= this.#iteration_ceiling) {
|
|
299
|
-
return false;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
this.#max_iterations = Math.min(this.#max_iterations * 2, this.#iteration_ceiling);
|
|
303
|
-
this.#iteration_escalations++;
|
|
304
|
-
|
|
305
|
-
return true;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
301
|
/**
|
|
309
302
|
* Steps of the descent one traversal dispatch runs.
|
|
310
303
|
*
|
|
@@ -317,7 +310,7 @@ export class GPUVirtualGeometryRuntime {
|
|
|
317
310
|
/**
|
|
318
311
|
* Settable, like tau, and for the same reason: it is a quality-of-schedule dial whose right
|
|
319
312
|
* value is a property of the asset's depth and the scene's breadth together rather than of the
|
|
320
|
-
* engine.
|
|
313
|
+
* engine. Every view writes its params at record time, so a change lands on the next frame.
|
|
321
314
|
*
|
|
322
315
|
* @param {number} value
|
|
323
316
|
*/
|
|
@@ -329,32 +322,31 @@ export class GPUVirtualGeometryRuntime {
|
|
|
329
322
|
}
|
|
330
323
|
|
|
331
324
|
/**
|
|
332
|
-
*
|
|
333
|
-
*
|
|
325
|
+
* Whether a frame is open — whether a rasterization path recording now may cut.
|
|
326
|
+
*
|
|
327
|
+
* @returns {boolean}
|
|
334
328
|
*/
|
|
335
|
-
get
|
|
336
|
-
return this.#
|
|
329
|
+
get frame_open() {
|
|
330
|
+
return this.#frame_open;
|
|
337
331
|
}
|
|
338
332
|
|
|
339
333
|
/**
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* A frame is cut once per bucket per HZB pass per view, and every one of those writes into the
|
|
343
|
-
* *same* feedback buffer — which is exactly what dedups a touch across them. But a FrameGraph
|
|
344
|
-
* resource is versioned: the handle `begin_frame` created is version 0, and a second expansion
|
|
345
|
-
* that wrote version 0 again after the first had produced version 65 would be reading stale
|
|
346
|
-
* contents while claiming not to. The graph says so, loudly, and it is right to.
|
|
334
|
+
* The view the last frame was opened for, which is slot 0 of that frame's feedback.
|
|
347
335
|
*
|
|
348
|
-
*
|
|
349
|
-
* The readback then reads the last one, which is the only version that has seen every view.
|
|
350
|
-
*
|
|
351
|
-
* @param {number} handle
|
|
352
|
-
* @returns {void}
|
|
336
|
+
* @returns {VGeoViewCut|undefined}
|
|
353
337
|
*/
|
|
354
|
-
|
|
355
|
-
|
|
338
|
+
get frame_view() {
|
|
339
|
+
return this.#frame_view;
|
|
340
|
+
}
|
|
356
341
|
|
|
357
|
-
|
|
342
|
+
/**
|
|
343
|
+
* The feedback buffer every view of a frame writes into, or null before the first frame and
|
|
344
|
+
* after {@link destroy}.
|
|
345
|
+
*
|
|
346
|
+
* @returns {GPUBuffer|null}
|
|
347
|
+
*/
|
|
348
|
+
get feedback_buffer() {
|
|
349
|
+
return this.#feedback_buffer;
|
|
358
350
|
}
|
|
359
351
|
|
|
360
352
|
/**
|
|
@@ -365,12 +357,12 @@ export class GPUVirtualGeometryRuntime {
|
|
|
365
357
|
}
|
|
366
358
|
|
|
367
359
|
/**
|
|
368
|
-
* Open a frame: publish the page tables,
|
|
369
|
-
*
|
|
360
|
+
* Open a frame: publish the page tables, lay the feedback buffer out for the views the frame is
|
|
361
|
+
* expected to have, and take slot 0 for the view it is rendered for.
|
|
370
362
|
*
|
|
371
|
-
* The sizing happens here rather than at construction because
|
|
372
|
-
*
|
|
373
|
-
* which
|
|
363
|
+
* The sizing happens here rather than at construction because two of its terms move — one
|
|
364
|
+
* touch bit per page-table row follows residency, and the slot count follows the most views any
|
|
365
|
+
* frame has cut in — and a frame is the coarsest granularity at which they hold still.
|
|
374
366
|
*
|
|
375
367
|
* **The pool's frame advances here, before the flush**, and not at `end_frame`. The frame
|
|
376
368
|
* number is what stamps a page row's `visible_from` — the frame whose flush publishes the
|
|
@@ -379,34 +371,43 @@ export class GPUVirtualGeometryRuntime {
|
|
|
379
371
|
* frame's reading, exactly (RUNTIME_PLAN_2026_09_14 §2.4). It is also the clock both tiers'
|
|
380
372
|
* protect windows read, and it moves whether or not a readback is scheduled this frame.
|
|
381
373
|
*
|
|
382
|
-
* **A frame has no projection
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
374
|
+
* **A frame has no projection and no graph.** Each view writes its own projection
|
|
375
|
+
* ({@link VGeoViewCut}), and each graph that cuts imports the feedback buffer itself
|
|
376
|
+
* ({@link feedback_in}).
|
|
377
|
+
*
|
|
378
|
+
* Opening a frame that is already open starts it again: a render that threw before closing its
|
|
379
|
+
* frame leaves nothing behind that the next one can be confused by.
|
|
386
380
|
*
|
|
387
381
|
* @param {Object} options
|
|
388
|
-
* @param {
|
|
389
|
-
* @returns {
|
|
382
|
+
* @param {VGeoViewCut} options.view the view the frame is rendered for
|
|
383
|
+
* @returns {void}
|
|
390
384
|
*/
|
|
391
|
-
begin_frame({
|
|
392
|
-
assert.defined(
|
|
385
|
+
begin_frame({ view }) {
|
|
386
|
+
assert.defined(view, 'view');
|
|
393
387
|
|
|
394
388
|
this.#pool.advance_frame();
|
|
395
389
|
this.#pool.flush();
|
|
396
390
|
|
|
391
|
+
const slot_count = Math.min(this.#slot_high_water, SLOT_CEILING);
|
|
392
|
+
|
|
397
393
|
this.#layout = vgeo_cut_feedback_layout({
|
|
398
394
|
page_row_capacity: this.#pool.page_row_capacity,
|
|
399
395
|
want_capacity: this.#want_capacity,
|
|
396
|
+
slot_count,
|
|
400
397
|
});
|
|
401
398
|
|
|
402
|
-
|
|
399
|
+
this.#ensure_feedback_buffer(this.#layout.word_count * 4);
|
|
403
400
|
|
|
404
|
-
this.#
|
|
405
|
-
|
|
406
|
-
GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC
|
|
407
|
-
));
|
|
401
|
+
this.#imports.clear();
|
|
402
|
+
this.#cleared = false;
|
|
408
403
|
|
|
409
|
-
this.#
|
|
404
|
+
this.#slot_of.clear();
|
|
405
|
+
this.#slots = [];
|
|
406
|
+
|
|
407
|
+
this.#frame_view = view;
|
|
408
|
+
this.#frame_open = true;
|
|
409
|
+
|
|
410
|
+
this.slot_of(view);
|
|
410
411
|
|
|
411
412
|
/*
|
|
412
413
|
Nothing until an expansion site says what it was handed. Zero is the safe start: a kernel
|
|
@@ -415,8 +416,150 @@ export class GPUVirtualGeometryRuntime {
|
|
|
415
416
|
*/
|
|
416
417
|
this.#instance_capacity = 0;
|
|
417
418
|
this.#meshlet_capacity = 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* @param {number} bytes
|
|
423
|
+
*/
|
|
424
|
+
#ensure_feedback_buffer(bytes) {
|
|
425
|
+
const existing = this.#feedback_buffer;
|
|
426
|
+
|
|
427
|
+
if (existing !== null && existing.size >= bytes) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
existing?.destroy();
|
|
432
|
+
|
|
433
|
+
// to the next power of two, so a tier filling a page row at a time re-makes it rarely
|
|
434
|
+
const size = Math.max(256, 2 ** Math.ceil(Math.log2(bytes)));
|
|
435
|
+
|
|
436
|
+
this.#feedback_buffer = this.#pool.device.createBuffer({
|
|
437
|
+
label: 'vgeo feedback',
|
|
438
|
+
size,
|
|
439
|
+
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* This frame's slot for a view, taking the next one the first time the view cuts in the frame.
|
|
445
|
+
*
|
|
446
|
+
* A view past the slots the frame was laid out for shares the last one — never slot 0, which is
|
|
447
|
+
* the frame's own view's — and the next frame is laid out with room for it. A shared slot's
|
|
448
|
+
* counters are the sum of its views', so its reading lands on each of them but escalates none
|
|
449
|
+
* (see `VGeoFeedbackLoop`).
|
|
450
|
+
*
|
|
451
|
+
* @param {VGeoViewCut} view
|
|
452
|
+
* @returns {number}
|
|
453
|
+
*/
|
|
454
|
+
slot_of(view) {
|
|
455
|
+
assert.equal(this.#frame_open, true, 'a slot is a slot of an open frame');
|
|
456
|
+
|
|
457
|
+
const known = this.#slot_of.get(view);
|
|
458
|
+
|
|
459
|
+
if (known !== undefined) {
|
|
460
|
+
return known;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
const requested = this.#slot_of.size;
|
|
464
|
+
|
|
465
|
+
this.#slot_high_water = Math.max(this.#slot_high_water, requested + 1);
|
|
466
|
+
|
|
467
|
+
const slot = Math.min(requested, this.#layout.slot_count - 1);
|
|
468
|
+
|
|
469
|
+
this.#slot_of.set(view, slot);
|
|
470
|
+
|
|
471
|
+
if (this.#slots[slot] === undefined) {
|
|
472
|
+
this.#slots[slot] = [];
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
this.#slots[slot].push(view);
|
|
476
|
+
|
|
477
|
+
return slot;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* The tag a slot's view writes into the want stamps, unique to that view in this frame and never
|
|
482
|
+
* zero — see `VGEO_CUT_PARAMS_STRUCT.frame_tag`.
|
|
483
|
+
*
|
|
484
|
+
* @param {number} slot
|
|
485
|
+
* @returns {number}
|
|
486
|
+
*/
|
|
487
|
+
frame_tag_of(slot) {
|
|
488
|
+
return ((this.#pool.frame * SLOT_CEILING + slot + 1) >>> 0) || 1;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* This frame's views, by slot — what a reading of this frame's feedback is about. A copy, since
|
|
493
|
+
* the reading lands frames later and the table is rebuilt every frame.
|
|
494
|
+
*
|
|
495
|
+
* @returns {VGeoViewCut[][]}
|
|
496
|
+
*/
|
|
497
|
+
frame_slots() {
|
|
498
|
+
return this.#slots.map(views => views.slice());
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* The feedback buffer as a resource of `graph`, at the version that graph last wrote.
|
|
503
|
+
*
|
|
504
|
+
* The first call for a graph imports the buffer into it; if no graph of this frame has yet, it
|
|
505
|
+
* also records the clear — the counters and the touch bits, which is everything a kernel adds
|
|
506
|
+
* to — so the first graph encoded is the one that clears, before anything of this frame writes.
|
|
507
|
+
*
|
|
508
|
+
* @param {FrameGraph} graph
|
|
509
|
+
* @returns {number} resource handle
|
|
510
|
+
*/
|
|
511
|
+
feedback_in(graph) {
|
|
512
|
+
assert.equal(this.#frame_open, true, 'the feedback buffer is a buffer of an open frame');
|
|
513
|
+
|
|
514
|
+
const known = this.#imports.get(graph);
|
|
515
|
+
|
|
516
|
+
if (known !== undefined) {
|
|
517
|
+
return known;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
const buffer = this.#feedback_buffer;
|
|
521
|
+
|
|
522
|
+
let handle = graph.import_resource(
|
|
523
|
+
'vgeo feedback', BufferResourceDescriptor.fromBuffer(buffer), buffer
|
|
524
|
+
);
|
|
525
|
+
|
|
526
|
+
if (!this.#cleared) {
|
|
527
|
+
const bytes = this.#layout.clear_word_count * 4;
|
|
528
|
+
|
|
529
|
+
const data = {};
|
|
530
|
+
|
|
531
|
+
const pass = graph.add('vgeo/frame clear', data, (data, resources, context) => {
|
|
532
|
+
context.encoder.clearBuffer(resources.get(data.feedback), 0, bytes);
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
handle = data.feedback = pass.write(handle);
|
|
536
|
+
|
|
537
|
+
this.#cleared = true;
|
|
538
|
+
}
|
|
418
539
|
|
|
419
|
-
|
|
540
|
+
this.#imports.set(graph, handle);
|
|
541
|
+
|
|
542
|
+
return handle;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Hand back the version of the feedback resource a graph's expansion left behind.
|
|
547
|
+
*
|
|
548
|
+
* A FrameGraph resource is versioned: the handle an import produced is its first version, and a
|
|
549
|
+
* second expansion that wrote that version again after the first had produced a later one would
|
|
550
|
+
* be reading stale contents while claiming not to. The graph says so, loudly, and it is right to.
|
|
551
|
+
* So the runtime carries each graph's current version and each expansion publishes what it
|
|
552
|
+
* produced; the readback then reads the last one.
|
|
553
|
+
*
|
|
554
|
+
* @param {FrameGraph} graph
|
|
555
|
+
* @param {number} handle
|
|
556
|
+
* @returns {void}
|
|
557
|
+
*/
|
|
558
|
+
publish_feedback(graph, handle) {
|
|
559
|
+
assert.isNonNegativeInteger(handle, 'handle');
|
|
560
|
+
assert.equal(this.#imports.has(graph), true, 'the graph never imported the feedback buffer');
|
|
561
|
+
|
|
562
|
+
this.#imports.set(graph, handle);
|
|
420
563
|
}
|
|
421
564
|
|
|
422
565
|
/**
|
|
@@ -427,10 +570,9 @@ export class GPUVirtualGeometryRuntime {
|
|
|
427
570
|
* defaulted to 1 << 20 against a meshlet collection whose engine default is 2e5, so `vg_draw`
|
|
428
571
|
* bounds-checked against a number five times the buffer it was writing into (REVIEW_LEDGER M6).
|
|
429
572
|
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
* every pass of the frame executes against.
|
|
573
|
+
* A frame with sites of different sizes takes the **minimum** — conservative, and the direction
|
|
574
|
+
* every other bound in the cut fails in. Each view writes its params at record time from what
|
|
575
|
+
* has been declared so far, which is never more than its own site was handed.
|
|
434
576
|
*
|
|
435
577
|
* @param {Object} options
|
|
436
578
|
* @param {number} options.instance_capacity records the VG instance buffer holds
|
|
@@ -465,29 +607,29 @@ export class GPUVirtualGeometryRuntime {
|
|
|
465
607
|
}
|
|
466
608
|
|
|
467
609
|
/**
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
* A cut writes into the feedback resource `begin_frame` created, and a resource handle belongs
|
|
471
|
-
* to one graph — so a rasterization path running on a *different* graph inside the same frame
|
|
472
|
-
* (a shadow view builds its own) would be naming a resource that graph has never heard of. The
|
|
473
|
-
* seam checks this and skips, which is also design §9's position: one cut per view, and shadow
|
|
474
|
-
* cuts are out of scope for v1.
|
|
610
|
+
* Close a frame. Nothing may cut until the next opens; reading it is {@link VGeoFeedbackLoop}'s,
|
|
611
|
+
* which schedules the readback while the last graph is still being recorded.
|
|
475
612
|
*
|
|
476
|
-
* @returns {
|
|
613
|
+
* @returns {void}
|
|
477
614
|
*/
|
|
478
|
-
|
|
479
|
-
|
|
615
|
+
end_frame() {
|
|
616
|
+
this.#frame_open = false;
|
|
617
|
+
this.#imports.clear();
|
|
480
618
|
}
|
|
481
619
|
|
|
482
|
-
|
|
483
620
|
/**
|
|
484
|
-
*
|
|
485
|
-
*
|
|
621
|
+
* Release the feedback buffer, which is the one device resource this makes, and close whatever
|
|
622
|
+
* frame is open so that nothing cuts into the buffer afterwards.
|
|
623
|
+
*
|
|
624
|
+
* The pool is not this runtime's to release: it was handed one, and whoever made it tears it
|
|
625
|
+
* down — after this, since a frame of this runtime writes into the pool's tables.
|
|
486
626
|
*
|
|
487
627
|
* @returns {void}
|
|
488
628
|
*/
|
|
489
|
-
|
|
490
|
-
this
|
|
491
|
-
|
|
629
|
+
destroy() {
|
|
630
|
+
this.end_frame();
|
|
631
|
+
|
|
632
|
+
this.#feedback_buffer?.destroy();
|
|
633
|
+
this.#feedback_buffer = null;
|
|
492
634
|
}
|
|
493
635
|
}
|
|
@@ -214,6 +214,36 @@ Two things this pass could not prove below the drive, written down rather than c
|
|
|
214
214
|
reaches the residency manager and that a page arriving after an abort installs nothing. It cannot
|
|
215
215
|
prove that a host tears the loop down, because there is one host and it is a demo. This is M12's
|
|
216
216
|
shape exactly, and it stays open until an engine-side owner exists.
|
|
217
|
+
|
|
218
|
+
**Closed, in two halves (2026-09-28).** *Ownership*, `28035083b`: the scene context constructs the
|
|
219
|
+
loop and the renderer opens and closes each VG frame (SHADOW_PLAN_2026_09_28 §2.1). *Teardown*,
|
|
220
|
+
`7a9e14fea`: `GPUSceneContext.destroy()` releases everything `enable_virtual_geometry` built, in
|
|
221
|
+
dependency order — the loop and the residency, the fetcher and its workers (the context made it,
|
|
222
|
+
so the residency never released it), then the runtime's feedback buffer (through the runtime's
|
|
223
|
+
new `destroy()`) and the pool — idempotently, and as a no-op when VG was never enabled. The
|
|
224
|
+
scene's own TLAS, volumetrics, volumetric light map and probe-volume mesh BVH were not released
|
|
225
|
+
either way, which was not VG's and predated it; `fab3fd38e` (2026-09-29) releases them, and
|
|
226
|
+
`3685e5bec` stops the scene's teardown giving its rows back one at a time. The hosts' `pagehide`
|
|
227
|
+
stops the frame loop and destroys the renderer and then its device, and nothing VG-specific
|
|
228
|
+
(`87add5e70`, `f9107e835`).
|
|
229
|
+
|
|
230
|
+
What it took besides, each red first:
|
|
231
|
+
- `c3fe2bf3f`: a fetch still queued in the residency's gate started after its container was
|
|
232
|
+
unregistered, and behind a destroyed fetcher it spawned the worker pool again.
|
|
233
|
+
- An adversarial review of the above found four more. `e82476c26`: a reading in flight at
|
|
234
|
+
teardown landed on destroyed views and an emptied residency, or was logged as a failed readback;
|
|
235
|
+
a destroyed loop now drops it. `1beafcb9e`: a throw partway through `enable_virtual_geometry`
|
|
236
|
+
left a runtime with no loop, and `destroy()` then threw before the rest of the scene; the four
|
|
237
|
+
are installed together now. `3d241c331`: a destroyed fetcher's next `fetch()` spawned the pool
|
|
238
|
+
again; it refuses now. `f9107e835`: the hosts released neither the loop nor the device.
|
|
239
|
+
|
|
240
|
+
Tested by `scene/GPUSceneContext.destroy.spec.js` (buffers on the software device, aborted reads,
|
|
241
|
+
terminated workers, a failed enable, a second destroy) and the residency, loop and fetcher specs'
|
|
242
|
+
own tests. Each teardown call removed in turn turns a spec red except the scene's call to the
|
|
243
|
+
loop's `destroy()`: the scene spec schedules no reading, and the loop's spec is what holds that
|
|
244
|
+
method. Tier 4: `vgeo_runtime` under headless Chrome, 126 frames and 7 worker fetches in, a
|
|
245
|
+
`pagehide` left no VG, no feedback buffer, no resident page, nothing in flight and a frame counter
|
|
246
|
+
that stopped.
|
|
217
247
|
- **U2 — nothing below the drive executes a cut through the seam.** The software device runs copies
|
|
218
248
|
and not shaders, so `graph_vgeo_expand.spec.js` proves what the seam *records* — the passes, the
|
|
219
249
|
resource behind each handle, the version chain, the capacities that reach the runtime — and
|
|
@@ -258,7 +258,10 @@ reader keeps decode, its page map, and quarantine.
|
|
|
258
258
|
`GPUSceneContext.enable_virtual_geometry` constructs the pool, the runtime, **and the residency and
|
|
259
259
|
the feedback loop** *(rev 2)*, from an options object with a `residency` key rather than one
|
|
260
260
|
spread; the playground stops building any of them and wires only the two frame extensions. That
|
|
261
|
-
closes REVIEW_LEDGER U1: an engine host gets the loop by enabling virtual geometry.
|
|
261
|
+
closes REVIEW_LEDGER U1: an engine host gets the loop by enabling virtual geometry. *(2026-09-28:
|
|
262
|
+
construction only — hosts still drove the frame and tore the loop down by hand. The engine drives
|
|
263
|
+
it since SHADOW_PLAN_2026_09_28 §2.1, `28035083b`, and releases it since `7a9e14fea`; REVIEW_LEDGER
|
|
264
|
+
U1 records both.)*
|
|
262
265
|
|
|
263
266
|
### 4.1 State
|
|
264
267
|
|