@woosh/meep-engine 3.24.0 → 3.26.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/package.json +1 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts +59 -0
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.js +285 -0
- package/src/core/geom/3d/shape/PosedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/PosedShape3D.js +57 -0
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +102 -0
- package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnionShape3D.js +64 -0
- package/src/engine/graphics3/PickingSystem.d.ts +3 -3
- package/src/engine/graphics3/PickingSystem.d.ts.map +1 -1
- package/src/engine/graphics3/PickingSystem.js +52 -55
- package/src/engine/graphics3/shader_picking_gather.d.ts +40 -0
- package/src/engine/graphics3/shader_picking_gather.d.ts.map +1 -0
- package/src/engine/graphics3/shader_picking_gather.js +120 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +1632 -0
- package/src/engine/physics/cloth/PLAN.md +738 -95
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +84 -17
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +451 -42
- package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts +52 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSerializationAdapter.js +70 -0
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts +12 -3
- package/src/engine/physics/cloth/ecs/ClothDynamics.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothDynamics.js +340 -331
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +101 -29
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +110 -31
- package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts +84 -0
- package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothSerializationAdapter.js +141 -0
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +71 -81
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +135 -856
- package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts +48 -0
- package/src/engine/physics/cloth/ecs/ClothWorkerCore.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothWorkerCore.js +107 -0
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +323 -0
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothWorld.js +1248 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +192 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +578 -0
- package/src/engine/physics/cloth/ecs/cloth.worker.d.ts +2 -0
- package/src/engine/physics/cloth/ecs/cloth.worker.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth.worker.js +12 -0
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +2 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts +85 -3
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_map.js +366 -271
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +95 -12
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +170 -27
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +19 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +249 -201
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +21 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +62 -1
- package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts +29 -0
- package/src/engine/physics/cloth/ecs/cloth_worker_protocol.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_worker_protocol.js +78 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +18 -10
- package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts +17 -0
- package/src/engine/physics/cloth/ecs/makeClothWorker.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/makeClothWorker.js +18 -0
- package/src/engine/physics/cloth/playground/README.md +73 -2
- package/src/engine/physics/cloth/playground/collide_main.js +1 -1
- package/src/engine/physics/cloth/playground/wind.html +166 -0
- package/src/engine/physics/cloth/playground/wind_build.d.ts +81 -0
- package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/wind_build.js +141 -0
- package/src/engine/physics/cloth/playground/wind_main.d.ts +2 -0
- package/src/engine/physics/cloth/playground/wind_main.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/wind_main.js +681 -0
- package/src/engine/physics/cloth/solver/ClothState.d.ts +134 -79
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +273 -12
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +29 -8
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +37 -9
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +45 -2
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +46 -2
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +21 -2
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +173 -4
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +40 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +284 -0
- package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts +107 -0
- package/src/engine/physics/cloth/solver/cloth_wind_accelerate.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_wind_accelerate.js +263 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +9 -2
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +9 -2
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +102 -0
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/AbstractClothWind.js +114 -0
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +87 -0
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/ClothAmbientWind.js +185 -0
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +79 -0
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +213 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +106 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +297 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
- package/src/shade/device/mock/texture_copy.js +28 -0
- package/src/shade/playground/vgeo_runtime/README.md +94 -0
- package/src/shade/playground/vgeo_runtime/index.html +62 -0
- package/src/shade/playground/vgeo_runtime/main.d.ts +2 -0
- package/src/shade/playground/vgeo_runtime/main.d.ts.map +1 -0
- package/src/shade/playground/vgeo_runtime/main.js +399 -0
- package/src/shade/playground/vgeo_viewer/sample_asset.js +1 -1
- package/src/shade/renderer/camera/Camera.d.ts +14 -0
- package/src/shade/renderer/camera/Camera.d.ts.map +1 -1
- package/src/shade/renderer/camera/Camera.js +7 -1
- package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GEOMETRY_METADATA_STRUCT.js +16 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +29 -9
- package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +10 -0
- package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryMetadata.js +13 -0
- package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +46 -18
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +70 -22
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +97 -19
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +12 -2
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +14 -3
- package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/vgeo_assemble_pages.js +124 -6
- package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts +22 -0
- package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/vgeo_page_node_count.js +53 -0
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts +8 -1
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/VGeoWriteOptions.js +8 -1
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts +16 -0
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/header/VGEO_FEATURE_IGNORABLE_BOUNDED_PAGES.js +15 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +54 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +53 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts +13 -2
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerHeader.js +14 -2
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts +100 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoPage.js +113 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_header.js +5 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +108 -0
- package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +23 -0
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +40 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts +228 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryPool.js +932 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +176 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +425 -0
- package/src/shade/renderer/geometry/virtual/runtime/REVIEW_LEDGER.md +241 -0
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +574 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +120 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +674 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts +287 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoRuntimeTables.js +976 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +42 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +96 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts +16 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_FLAG_CULL.js +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_PARAMS_STRUCT.js +83 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_WORKGROUP_SIZE.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +160 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +255 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_queue_prepare.js +80 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +144 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts +3 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +530 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts +39 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/vgeo_cut_feedback_layout.js +54 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts +41 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js +56 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts +49 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +328 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_OFFSET.js +51 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CLUSTER_ROW_WORDS.js +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT.js +99 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_CUT_STAT_COUNT.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_FEEDBACK_OFFSET.js +27 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_NONE.js +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_OFFSET.js +35 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GEOMETRY_ROW_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_FLAG_SELECTABLE.js +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_OFFSET.js +36 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_GROUP_ROW_WORDS.js +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +54 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_LEAF_BIT.js +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts +7 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_OFFSET.js +30 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NODE_ROW_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_NO_CHILD_PAGE.js +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_NONE.js +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_OFFSET.js +61 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_PAGE_ROW_WORDS.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js +12 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js +8 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts +23 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js +70 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts +18 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js +25 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts +35 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js +41 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts +32 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js +138 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +9 -0
- 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 +12 -1
- 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 +12 -1
- 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 +10 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +18 -0
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +647 -594
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +22 -0
- package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts +35 -0
- package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/mat3/chunk_mat3_singular_values.js +91 -0
- package/src/engine/graphics3/instantiate_scene_bundle.d.ts +0 -54
- package/src/engine/graphics3/instantiate_scene_bundle.d.ts.map +0 -1
- package/src/engine/graphics3/shade_node_to_entity_composition.d.ts +0 -39
- package/src/engine/graphics3/shade_node_to_entity_composition.d.ts.map +0 -1
- package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts +0 -35
- package/src/shade/renderer/animation/compute_skin_world_bounds.d.ts.map +0 -1
- package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts +0 -96
- package/src/shade/renderer/animation/compute_skinned_mesh_clip_bounding_sphere.d.ts.map +0 -1
- package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts +0 -20
- package/src/shade/renderer/animation/pose/pose_evaluate_world.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_bind_transform.d.ts +0 -25
- package/src/shade/renderer/animation/skin_bind_transform.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_frame_defect.d.ts +0 -34
- package/src/shade/renderer/animation/skin_frame_defect.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_joint_matrix.d.ts +0 -24
- package/src/shade/renderer/animation/skin_joint_matrix.d.ts.map +0 -1
- package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts +0 -70
- package/src/shade/renderer/animation/skin_normalize_mesh_frame.d.ts.map +0 -1
- package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts +0 -96
- package/src/shade/renderer/buffer/table/GPUReadbackStagingRing.d.ts.map +0 -1
- package/src/shade/renderer/scene/InstanceBatch.d.ts +0 -92
- package/src/shade/renderer/scene/InstanceBatch.d.ts.map +0 -1
- package/src/shade/renderer/scene/Mesh.d.ts +0 -55
- package/src/shade/renderer/scene/Mesh.d.ts.map +0 -1
- package/src/shade/renderer/scene/Node3D.d.ts +0 -159
- package/src/shade/renderer/scene/Node3D.d.ts.map +0 -1
- package/src/shade/renderer/scene/Node3DDirtyList.d.ts +0 -59
- package/src/shade/renderer/scene/Node3DDirtyList.d.ts.map +0 -1
- package/src/shade/renderer/scene/SceneNodeBinding.d.ts +0 -52
- package/src/shade/renderer/scene/SceneNodeBinding.d.ts.map +0 -1
- package/src/shade/renderer/scene/SkinnedMesh.d.ts +0 -27
- package/src/shade/renderer/scene/SkinnedMesh.d.ts.map +0 -1
- package/src/shade/renderer/scene/TransformAuthority.d.ts +0 -19
- package/src/shade/renderer/scene/TransformAuthority.d.ts.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words in one traversal queue item: `instance slot`, `page row`, `target`, `first cluster`.
|
|
3
|
+
*
|
|
4
|
+
* `target` is a node index, or a group index with {@link VGEO_QUEUE_TARGET_GROUP_BIT} set. One
|
|
5
|
+
* queue, one kernel, two shapes — which is what lets a node leaf hand off its clusters in bounded
|
|
6
|
+
* chunks rather than walking up to four groups of four thousand in the lane that popped it.
|
|
7
|
+
*
|
|
8
|
+
* @author Alex Goldring
|
|
9
|
+
* @copyright Company Named Limited (c) 2026
|
|
10
|
+
* @type {number}
|
|
11
|
+
*/
|
|
12
|
+
export const VGEO_QUEUE_ITEM_WORDS: number;
|
|
13
|
+
//# sourceMappingURL=VGEO_QUEUE_ITEM_WORDS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VGEO_QUEUE_ITEM_WORDS.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_ITEM_WORDS.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,oCAFU,MAAM,CAEuB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words in one traversal queue item: `instance slot`, `page row`, `target`, `first cluster`.
|
|
3
|
+
*
|
|
4
|
+
* `target` is a node index, or a group index with {@link VGEO_QUEUE_TARGET_GROUP_BIT} set. One
|
|
5
|
+
* queue, one kernel, two shapes — which is what lets a node leaf hand off its clusters in bounded
|
|
6
|
+
* chunks rather than walking up to four groups of four thousand in the lane that popped it.
|
|
7
|
+
*
|
|
8
|
+
* @author Alex Goldring
|
|
9
|
+
* @copyright Company Named Limited (c) 2026
|
|
10
|
+
* @type {number}
|
|
11
|
+
*/
|
|
12
|
+
export const VGEO_QUEUE_ITEM_WORDS = 4;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set in a queue item's `target` when it names a group to evaluate rather than a node to descend.
|
|
3
|
+
*
|
|
4
|
+
* @author Alex Goldring
|
|
5
|
+
* @copyright Company Named Limited (c) 2026
|
|
6
|
+
* @type {number}
|
|
7
|
+
*/
|
|
8
|
+
export const VGEO_QUEUE_TARGET_GROUP_BIT: number;
|
|
9
|
+
//# sourceMappingURL=VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map
|
package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VGEO_QUEUE_TARGET_GROUP_BIT.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/runtime/layout/VGEO_QUEUE_TARGET_GROUP_BIT.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,0CAFU,MAAM,CAEsC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words in one want record: `source page row`, `child ref`, `child page index`, `priority bits`.
|
|
3
|
+
*
|
|
4
|
+
* The **source** page row is in there on purpose. A want that named only the page wanted would
|
|
5
|
+
* leave `VGEO_FORMAT.md` §10's in-flight pin unclosable — "a fetch discovered through parent page
|
|
6
|
+
* P pins P until the child installs" needs somebody to say which P, and the format deliberately
|
|
7
|
+
* stores parent *counts* rather than parent references, so nothing but the cut can. It also
|
|
8
|
+
* resolves the byte range without a directory: the source page's child table holds
|
|
9
|
+
* `frame_offset`, `fetch_size` and `decoded_size` at exactly `child ref`.
|
|
10
|
+
*
|
|
11
|
+
* `priority bits` is the clamped cluster's projected error as an f32 bit pattern — pixels past the
|
|
12
|
+
* threshold, and therefore comparable across assets by construction, which is what
|
|
13
|
+
* `VGeoResidencyManager`'s single global queue needs and what no per-reader queue could claim.
|
|
14
|
+
*
|
|
15
|
+
* @author Alex Goldring
|
|
16
|
+
* @copyright Company Named Limited (c) 2026
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
export const VGEO_WANT_WORDS: number;
|
|
20
|
+
//# sourceMappingURL=VGEO_WANT_WORDS.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VGEO_WANT_WORDS.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/runtime/layout/VGEO_WANT_WORDS.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAFU,MAAM,CAEiB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words in one want record: `source page row`, `child ref`, `child page index`, `priority bits`.
|
|
3
|
+
*
|
|
4
|
+
* The **source** page row is in there on purpose. A want that named only the page wanted would
|
|
5
|
+
* leave `VGEO_FORMAT.md` §10's in-flight pin unclosable — "a fetch discovered through parent page
|
|
6
|
+
* P pins P until the child installs" needs somebody to say which P, and the format deliberately
|
|
7
|
+
* stores parent *counts* rather than parent references, so nothing but the cut can. It also
|
|
8
|
+
* resolves the byte range without a directory: the source page's child table holds
|
|
9
|
+
* `frame_offset`, `fetch_size` and `decoded_size` at exactly `child ref`.
|
|
10
|
+
*
|
|
11
|
+
* `priority bits` is the clamped cluster's projected error as an f32 bit pattern — pixels past the
|
|
12
|
+
* threshold, and therefore comparable across assets by construction, which is what
|
|
13
|
+
* `VGeoResidencyManager`'s single global queue needs and what no per-reader queue could claim.
|
|
14
|
+
*
|
|
15
|
+
* @author Alex Goldring
|
|
16
|
+
* @copyright Company Named Limited (c) 2026
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
export const VGEO_WANT_WORDS = 4;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A decoded page, as the meshlet pool takes it.
|
|
3
|
+
*
|
|
4
|
+
* `VGEO_FORMAT.md` §8 pins the bargain this function collects on: the payload block is
|
|
5
|
+
* **byte-compatible** with `GPUMeshletManager`'s data pool, so residency is a copy and the 40-byte
|
|
6
|
+
* metadata rows are a pack step — `aabb` becomes `bounds_box`, the u8 counts widen to u32,
|
|
7
|
+
* `encoding_flags` passes through, and `address` is the cluster's payload offset in words, which
|
|
8
|
+
* the manager then biases by wherever it put the data.
|
|
9
|
+
*
|
|
10
|
+
* The one real cost is that copy. `writeBuffer` takes an `ArrayBuffer` and the payload is a window
|
|
11
|
+
* into the page's decoded bytes, so a page install allocates and copies its payload section once.
|
|
12
|
+
* That is the same order of work the decode already did, and the alternative — handing the manager
|
|
13
|
+
* a view and asking it to honour the offset — is a change to a class four other paths share.
|
|
14
|
+
*
|
|
15
|
+
* @param {VGeoPage} page
|
|
16
|
+
* @returns {MeshletBatch} ready for `GPUMeshletManager.add_batch`
|
|
17
|
+
*
|
|
18
|
+
* @author Alex Goldring
|
|
19
|
+
* @copyright Company Named Limited (c) 2026
|
|
20
|
+
*/
|
|
21
|
+
export function vgeo_runtime_meshlet_batch(page: VGeoPage): MeshletBatch;
|
|
22
|
+
import { MeshletBatch } from "../../meshlet/MeshletBatch.js";
|
|
23
|
+
//# sourceMappingURL=vgeo_runtime_meshlet_batch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vgeo_runtime_meshlet_batch.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_meshlet_batch.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DALa,YAAY,CA6CxB;6BA9D4B,+BAA+B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { BinaryBuffer } from "../../../../../core/binary/BinaryBuffer.js";
|
|
3
|
+
import { platform_compute_endianness } from "../../../../../core/binary/platform_compute_endianness.js";
|
|
4
|
+
import { write_wgsl_type_value } from "../../../shader/type/serde/write_gpu_typed_buffer.js";
|
|
5
|
+
import {
|
|
6
|
+
MESHLET_METADATA_STRUCT
|
|
7
|
+
} from "../../meshlet/encoding/MESHLET_METADATA_STRUCT.js";
|
|
8
|
+
import { MeshletBatch } from "../../meshlet/MeshletBatch.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A decoded page, as the meshlet pool takes it.
|
|
12
|
+
*
|
|
13
|
+
* `VGEO_FORMAT.md` §8 pins the bargain this function collects on: the payload block is
|
|
14
|
+
* **byte-compatible** with `GPUMeshletManager`'s data pool, so residency is a copy and the 40-byte
|
|
15
|
+
* metadata rows are a pack step — `aabb` becomes `bounds_box`, the u8 counts widen to u32,
|
|
16
|
+
* `encoding_flags` passes through, and `address` is the cluster's payload offset in words, which
|
|
17
|
+
* the manager then biases by wherever it put the data.
|
|
18
|
+
*
|
|
19
|
+
* The one real cost is that copy. `writeBuffer` takes an `ArrayBuffer` and the payload is a window
|
|
20
|
+
* into the page's decoded bytes, so a page install allocates and copies its payload section once.
|
|
21
|
+
* That is the same order of work the decode already did, and the alternative — handing the manager
|
|
22
|
+
* a view and asking it to honour the offset — is a change to a class four other paths share.
|
|
23
|
+
*
|
|
24
|
+
* @param {VGeoPage} page
|
|
25
|
+
* @returns {MeshletBatch} ready for `GPUMeshletManager.add_batch`
|
|
26
|
+
*
|
|
27
|
+
* @author Alex Goldring
|
|
28
|
+
* @copyright Company Named Limited (c) 2026
|
|
29
|
+
*/
|
|
30
|
+
export function vgeo_runtime_meshlet_batch(page) {
|
|
31
|
+
assert.defined(page, 'page');
|
|
32
|
+
|
|
33
|
+
const count = page.cluster_count;
|
|
34
|
+
|
|
35
|
+
const batch = new MeshletBatch();
|
|
36
|
+
|
|
37
|
+
batch.count = count;
|
|
38
|
+
|
|
39
|
+
batch.data_buffer = page.bytes.buffer.slice(
|
|
40
|
+
page.bytes.byteOffset + page.payload_offset,
|
|
41
|
+
page.bytes.byteOffset + page.payload_offset + page.payload_size
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const metadata = BinaryBuffer.fromEndianness(platform_compute_endianness());
|
|
45
|
+
|
|
46
|
+
metadata.setCapacity(count * MESHLET_METADATA_STRUCT.size);
|
|
47
|
+
|
|
48
|
+
for (let cluster = 0; cluster < count; cluster++) {
|
|
49
|
+
write_wgsl_type_value({
|
|
50
|
+
bounds_box: page.aabb.subarray(cluster * 6, cluster * 6 + 6),
|
|
51
|
+
/*
|
|
52
|
+
Words, and relative to the page's payload section — `GPUMeshletManager` adds the
|
|
53
|
+
allocation's own offset when it uploads. Format §11.8 makes every payload offset a
|
|
54
|
+
multiple of four, so this division is exact rather than rounded.
|
|
55
|
+
*/
|
|
56
|
+
address: page.cluster_payload_offset[cluster] >>> 2,
|
|
57
|
+
primitive_count: page.triangle_count[cluster],
|
|
58
|
+
vertex_count: page.vertex_count[cluster],
|
|
59
|
+
flags: page.encoding_flags[cluster],
|
|
60
|
+
}, metadata, MESHLET_METADATA_STRUCT);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// `BinaryBuffer.data` is the ArrayBuffer itself, and `setCapacity` may have rounded it up;
|
|
64
|
+
// `add_batch` reads exactly `count` records out of it, so the slice is for clarity rather than
|
|
65
|
+
// for correctness — a metadata buffer whose length says something other than what it holds is
|
|
66
|
+
// the kind of thing that is read once, wrongly, years later.
|
|
67
|
+
batch.metadata_buffer = metadata.data.slice(0, count * MESHLET_METADATA_STRUCT.size);
|
|
68
|
+
|
|
69
|
+
return batch;
|
|
70
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How many arena words one page's block runs to.
|
|
3
|
+
*
|
|
4
|
+
* A page is **one allocation** — `[node rows][group rows][cluster rows]`, back to back — so this is
|
|
5
|
+
* the whole of what installing it costs the arena and the whole of what evicting it returns. Every
|
|
6
|
+
* base inside the block is a count away from the block's own start, which is why a page row carries
|
|
7
|
+
* three counts and one offset and nothing can move inside a resident page.
|
|
8
|
+
*
|
|
9
|
+
* @param {number} node_count
|
|
10
|
+
* @param {number} group_count
|
|
11
|
+
* @param {number} cluster_count
|
|
12
|
+
* @returns {number} words
|
|
13
|
+
*
|
|
14
|
+
* @author Alex Goldring
|
|
15
|
+
* @copyright Company Named Limited (c) 2026
|
|
16
|
+
*/
|
|
17
|
+
export function vgeo_runtime_page_block_words(node_count: number, group_count: number, cluster_count: number): number;
|
|
18
|
+
//# sourceMappingURL=vgeo_runtime_page_block_words.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vgeo_runtime_page_block_words.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_block_words.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,0DARW,MAAM,eACN,MAAM,iBACN,MAAM,GACJ,MAAM,CASlB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { VGEO_CLUSTER_ROW_WORDS } from "./layout/VGEO_CLUSTER_ROW_WORDS.js";
|
|
2
|
+
import { VGEO_GROUP_ROW_WORDS } from "./layout/VGEO_GROUP_ROW_WORDS.js";
|
|
3
|
+
import { VGEO_NODE_ROW_WORDS } from "./layout/VGEO_NODE_ROW_WORDS.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* How many arena words one page's block runs to.
|
|
7
|
+
*
|
|
8
|
+
* A page is **one allocation** — `[node rows][group rows][cluster rows]`, back to back — so this is
|
|
9
|
+
* the whole of what installing it costs the arena and the whole of what evicting it returns. Every
|
|
10
|
+
* base inside the block is a count away from the block's own start, which is why a page row carries
|
|
11
|
+
* three counts and one offset and nothing can move inside a resident page.
|
|
12
|
+
*
|
|
13
|
+
* @param {number} node_count
|
|
14
|
+
* @param {number} group_count
|
|
15
|
+
* @param {number} cluster_count
|
|
16
|
+
* @returns {number} words
|
|
17
|
+
*
|
|
18
|
+
* @author Alex Goldring
|
|
19
|
+
* @copyright Company Named Limited (c) 2026
|
|
20
|
+
*/
|
|
21
|
+
export function vgeo_runtime_page_block_words(node_count, group_count, cluster_count) {
|
|
22
|
+
return node_count * VGEO_NODE_ROW_WORDS
|
|
23
|
+
+ group_count * VGEO_GROUP_ROW_WORDS
|
|
24
|
+
+ cluster_count * VGEO_CLUSTER_ROW_WORDS;
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Words of arena one page slot holds, for a tier built at `page_size`.
|
|
3
|
+
*
|
|
4
|
+
* The stride has to hold the widest legal page's runtime rows, and "legal" and "widest observed"
|
|
5
|
+
* are a factor of fifteen apart, so the number here is a **choice** rather than a derivation and it
|
|
6
|
+
* is worth writing down which.
|
|
7
|
+
*
|
|
8
|
+
* **The provable bound is about half the page size.** A page's decoded bytes are
|
|
9
|
+
* `56 + 32·nodes + 8·groups + 112·clusters + payload`, and its runtime rows are
|
|
10
|
+
* `32·nodes + 16·groups + 52·clusters`. Every group holds at least one cluster (format §11.1) and
|
|
11
|
+
* the node tree over `g` groups has at most `(g+2)/2` nodes, so the runtime side is at most
|
|
12
|
+
* `84·clusters + 32` against a decoded side of at least `56 + 112·clusters` — a ratio of 0.75, or
|
|
13
|
+
* 0.53 once a cluster's minimum payload is counted. A stride sized that way is correct for every
|
|
14
|
+
* container the format admits and wastes an order of magnitude on every container anyone builds.
|
|
15
|
+
*
|
|
16
|
+
* **The measured maximum is 3.9%.** A 160×80 torus built at 16, 32, 64 and 128 KB pages put its
|
|
17
|
+
* widest page's rows at 3.7%, 3.9%, 3.4% and 3.5% of the page size respectively, because a page is
|
|
18
|
+
* overwhelmingly payload: 38 clusters in a 64 KB page is 4.5 KB of records against 59 KB of
|
|
19
|
+
* vertices and indices.
|
|
20
|
+
*
|
|
21
|
+
* So this takes **an eighth of the page**, which is 3.2× the widest measured page at the tightest
|
|
22
|
+
* page size, and an install that does not fit is **refused and counted** rather than overrunning
|
|
23
|
+
* its slot — the same direction `register` takes for a container built at the wrong page size, and
|
|
24
|
+
* for the same reason: a tier that silently reconciles a size it was not built for is a tier whose
|
|
25
|
+
* pages point into each other. A caller holding an asset this refuses raises `page_slot_words`,
|
|
26
|
+
* and the refusal names the number.
|
|
27
|
+
*
|
|
28
|
+
* @param {number} page_size bytes, the container's `nominal_page_size`
|
|
29
|
+
* @returns {number} words
|
|
30
|
+
*
|
|
31
|
+
* @author Alex Goldring
|
|
32
|
+
* @copyright Company Named Limited (c) 2026
|
|
33
|
+
*/
|
|
34
|
+
export function vgeo_runtime_page_slot_words(page_size: number): number;
|
|
35
|
+
//# sourceMappingURL=vgeo_runtime_page_slot_words.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vgeo_runtime_page_slot_words.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_page_slot_words.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wDANW,MAAM,GACJ,MAAM,CAUlB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Words of arena one page slot holds, for a tier built at `page_size`.
|
|
5
|
+
*
|
|
6
|
+
* The stride has to hold the widest legal page's runtime rows, and "legal" and "widest observed"
|
|
7
|
+
* are a factor of fifteen apart, so the number here is a **choice** rather than a derivation and it
|
|
8
|
+
* is worth writing down which.
|
|
9
|
+
*
|
|
10
|
+
* **The provable bound is about half the page size.** A page's decoded bytes are
|
|
11
|
+
* `56 + 32·nodes + 8·groups + 112·clusters + payload`, and its runtime rows are
|
|
12
|
+
* `32·nodes + 16·groups + 52·clusters`. Every group holds at least one cluster (format §11.1) and
|
|
13
|
+
* the node tree over `g` groups has at most `(g+2)/2` nodes, so the runtime side is at most
|
|
14
|
+
* `84·clusters + 32` against a decoded side of at least `56 + 112·clusters` — a ratio of 0.75, or
|
|
15
|
+
* 0.53 once a cluster's minimum payload is counted. A stride sized that way is correct for every
|
|
16
|
+
* container the format admits and wastes an order of magnitude on every container anyone builds.
|
|
17
|
+
*
|
|
18
|
+
* **The measured maximum is 3.9%.** A 160×80 torus built at 16, 32, 64 and 128 KB pages put its
|
|
19
|
+
* widest page's rows at 3.7%, 3.9%, 3.4% and 3.5% of the page size respectively, because a page is
|
|
20
|
+
* overwhelmingly payload: 38 clusters in a 64 KB page is 4.5 KB of records against 59 KB of
|
|
21
|
+
* vertices and indices.
|
|
22
|
+
*
|
|
23
|
+
* So this takes **an eighth of the page**, which is 3.2× the widest measured page at the tightest
|
|
24
|
+
* page size, and an install that does not fit is **refused and counted** rather than overrunning
|
|
25
|
+
* its slot — the same direction `register` takes for a container built at the wrong page size, and
|
|
26
|
+
* for the same reason: a tier that silently reconciles a size it was not built for is a tier whose
|
|
27
|
+
* pages point into each other. A caller holding an asset this refuses raises `page_slot_words`,
|
|
28
|
+
* and the refusal names the number.
|
|
29
|
+
*
|
|
30
|
+
* @param {number} page_size bytes, the container's `nominal_page_size`
|
|
31
|
+
* @returns {number} words
|
|
32
|
+
*
|
|
33
|
+
* @author Alex Goldring
|
|
34
|
+
* @copyright Company Named Limited (c) 2026
|
|
35
|
+
*/
|
|
36
|
+
export function vgeo_runtime_page_slot_words(page_size) {
|
|
37
|
+
assert.isPositiveInteger(page_size, 'page_size');
|
|
38
|
+
|
|
39
|
+
// a multiple of four words, so a slot boundary is also a 16-byte boundary
|
|
40
|
+
return Math.ceil(page_size / 128) * 4;
|
|
41
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lay one decoded page's node, group and cluster rows into the arena.
|
|
3
|
+
*
|
|
4
|
+
* This is the whole of what a page install writes besides its payload, and it is deliberately a
|
|
5
|
+
* free function over two views rather than a method: the pool calls it against a mapped GPU upload
|
|
6
|
+
* range, and the agreement spec calls it against a plain array, and neither should have to own the
|
|
7
|
+
* other's machinery.
|
|
8
|
+
*
|
|
9
|
+
* **What it resolves, and why here.** A cluster's `child_ref` is an index into its page's child
|
|
10
|
+
* table, with two sentinels — `VGEO_SAME_PAGE` when the child group is in this very page, and
|
|
11
|
+
* `VGEO_NO_CHILD` for a leaf. The kernel does not see any of that: this writes a *global container
|
|
12
|
+
* page index* into every row, using the page's own index for `SAME_PAGE`, so the traversal's lookup
|
|
13
|
+
* path is uniform and there is no `SAME_PAGE` branch in the shader at all. `SAME_PAGE` then
|
|
14
|
+
* resolves to a page that is trivially resident — itself — and falls straight through to the
|
|
15
|
+
* selectability question, which is the only one it was ever really asking.
|
|
16
|
+
*
|
|
17
|
+
* Group selectability is **not** written here. It changes after install, as the reader's activation
|
|
18
|
+
* cascades run, and it is the one field of a resident page that moves.
|
|
19
|
+
*
|
|
20
|
+
* @param {Uint32Array} words arena as u32, indexed from its own element 0
|
|
21
|
+
* @param {Float32Array} floats the same memory as f32 — one view each rather than a DataView per
|
|
22
|
+
* field, because this runs per cluster of every page that arrives
|
|
23
|
+
* @param {number} base word offset of the page's block
|
|
24
|
+
* @param {VGeoPage} page
|
|
25
|
+
* @returns {number} clusters whose `child_ref` named an entry outside the page's child table — zero
|
|
26
|
+
* for any container the validator accepts
|
|
27
|
+
*
|
|
28
|
+
* @author Alex Goldring
|
|
29
|
+
* @copyright Company Named Limited (c) 2026
|
|
30
|
+
*/
|
|
31
|
+
export function vgeo_runtime_write_page_block(words: Uint32Array, floats: Float32Array, base: number, page: VGeoPage): number;
|
|
32
|
+
//# sourceMappingURL=vgeo_runtime_write_page_block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vgeo_runtime_write_page_block.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/runtime/vgeo_runtime_write_page_block.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qDAXW,WAAW,UACX,YAAY,QAEZ,MAAM,mBAEJ,MAAM,CAoGlB"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { VGEO_NO_CHILD } from "../format/cluster/VGEO_NO_CHILD.js";
|
|
3
|
+
import { VGEO_SAME_PAGE } from "../format/cluster/VGEO_SAME_PAGE.js";
|
|
4
|
+
import { VGEO_NODE_FLAG_LEAF } from "../format/page/VGEO_NODE_FLAG_LEAF.js";
|
|
5
|
+
import { VGEO_CLUSTER_ROW_OFFSET } from "./layout/VGEO_CLUSTER_ROW_OFFSET.js";
|
|
6
|
+
import { VGEO_CLUSTER_ROW_WORDS } from "./layout/VGEO_CLUSTER_ROW_WORDS.js";
|
|
7
|
+
import { VGEO_GROUP_ROW_OFFSET } from "./layout/VGEO_GROUP_ROW_OFFSET.js";
|
|
8
|
+
import { VGEO_GROUP_ROW_WORDS } from "./layout/VGEO_GROUP_ROW_WORDS.js";
|
|
9
|
+
import { VGEO_NODE_ROW_LEAF_BIT } from "./layout/VGEO_NODE_ROW_LEAF_BIT.js";
|
|
10
|
+
import { VGEO_NODE_ROW_OFFSET } from "./layout/VGEO_NODE_ROW_OFFSET.js";
|
|
11
|
+
import { VGEO_NODE_ROW_WORDS } from "./layout/VGEO_NODE_ROW_WORDS.js";
|
|
12
|
+
import { VGEO_NO_CHILD_PAGE } from "./layout/VGEO_NO_CHILD_PAGE.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Lay one decoded page's node, group and cluster rows into the arena.
|
|
16
|
+
*
|
|
17
|
+
* This is the whole of what a page install writes besides its payload, and it is deliberately a
|
|
18
|
+
* free function over two views rather than a method: the pool calls it against a mapped GPU upload
|
|
19
|
+
* range, and the agreement spec calls it against a plain array, and neither should have to own the
|
|
20
|
+
* other's machinery.
|
|
21
|
+
*
|
|
22
|
+
* **What it resolves, and why here.** A cluster's `child_ref` is an index into its page's child
|
|
23
|
+
* table, with two sentinels — `VGEO_SAME_PAGE` when the child group is in this very page, and
|
|
24
|
+
* `VGEO_NO_CHILD` for a leaf. The kernel does not see any of that: this writes a *global container
|
|
25
|
+
* page index* into every row, using the page's own index for `SAME_PAGE`, so the traversal's lookup
|
|
26
|
+
* path is uniform and there is no `SAME_PAGE` branch in the shader at all. `SAME_PAGE` then
|
|
27
|
+
* resolves to a page that is trivially resident — itself — and falls straight through to the
|
|
28
|
+
* selectability question, which is the only one it was ever really asking.
|
|
29
|
+
*
|
|
30
|
+
* Group selectability is **not** written here. It changes after install, as the reader's activation
|
|
31
|
+
* cascades run, and it is the one field of a resident page that moves.
|
|
32
|
+
*
|
|
33
|
+
* @param {Uint32Array} words arena as u32, indexed from its own element 0
|
|
34
|
+
* @param {Float32Array} floats the same memory as f32 — one view each rather than a DataView per
|
|
35
|
+
* field, because this runs per cluster of every page that arrives
|
|
36
|
+
* @param {number} base word offset of the page's block
|
|
37
|
+
* @param {VGeoPage} page
|
|
38
|
+
* @returns {number} clusters whose `child_ref` named an entry outside the page's child table — zero
|
|
39
|
+
* for any container the validator accepts
|
|
40
|
+
*
|
|
41
|
+
* @author Alex Goldring
|
|
42
|
+
* @copyright Company Named Limited (c) 2026
|
|
43
|
+
*/
|
|
44
|
+
export function vgeo_runtime_write_page_block(words, floats, base, page) {
|
|
45
|
+
assert.isNonNegativeInteger(base, 'base');
|
|
46
|
+
assert.defined(page, 'page');
|
|
47
|
+
|
|
48
|
+
const node_count = page.node_count;
|
|
49
|
+
const group_count = page.group_cluster_first.length;
|
|
50
|
+
const cluster_count = page.cluster_count;
|
|
51
|
+
|
|
52
|
+
const group_base = base + node_count * VGEO_NODE_ROW_WORDS;
|
|
53
|
+
const cluster_base = group_base + group_count * VGEO_GROUP_ROW_WORDS;
|
|
54
|
+
|
|
55
|
+
let broken_child_refs = 0;
|
|
56
|
+
|
|
57
|
+
for (let node = 0; node < node_count; node++) {
|
|
58
|
+
const row = base + node * VGEO_NODE_ROW_WORDS;
|
|
59
|
+
|
|
60
|
+
for (let c = 0; c < 4; c++) {
|
|
61
|
+
floats[row + VGEO_NODE_ROW_OFFSET.SPHERE + c] = page.node_sphere[node * 4 + c];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
floats[row + VGEO_NODE_ROW_OFFSET.MAX_PARENT_ERROR] = page.node_max_parent_error[node];
|
|
65
|
+
|
|
66
|
+
words[row + VGEO_NODE_ROW_OFFSET.CHILD_FIRST] = page.node_child_first[node];
|
|
67
|
+
|
|
68
|
+
const leaf = (page.node_flags[node] & VGEO_NODE_FLAG_LEAF) !== 0;
|
|
69
|
+
|
|
70
|
+
words[row + VGEO_NODE_ROW_OFFSET.CHILD_COUNT_AND_FLAGS] =
|
|
71
|
+
page.node_child_count[node] | (leaf ? VGEO_NODE_ROW_LEAF_BIT : 0);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
for (let group = 0; group < group_count; group++) {
|
|
75
|
+
const row = group_base + group * VGEO_GROUP_ROW_WORDS;
|
|
76
|
+
|
|
77
|
+
words[row + VGEO_GROUP_ROW_OFFSET.CLUSTER_FIRST] = page.group_cluster_first[group];
|
|
78
|
+
words[row + VGEO_GROUP_ROW_OFFSET.CLUSTER_COUNT] = page.group_cluster_count[group];
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
How many clusters anywhere in the container refine into this group. It travels with the
|
|
82
|
+
page so that this tier can run its **own** activation rule over its **own** residency —
|
|
83
|
+
see VGEO_GROUP_ROW_OFFSET.PARENT_COUNT, and REVIEW_LEDGER C1 for what publishing another
|
|
84
|
+
tier's answer costs.
|
|
85
|
+
*/
|
|
86
|
+
words[row + VGEO_GROUP_ROW_OFFSET.PARENT_COUNT] = page.group_parent_count[group];
|
|
87
|
+
|
|
88
|
+
// not selectable until activation says so; a page installs drawing nothing. Any other
|
|
89
|
+
// default draws a group before the ancestors it hangs off have arrived.
|
|
90
|
+
words[row + VGEO_GROUP_ROW_OFFSET.FLAGS] = 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
for (let cluster = 0; cluster < cluster_count; cluster++) {
|
|
94
|
+
const row = cluster_base + cluster * VGEO_CLUSTER_ROW_WORDS;
|
|
95
|
+
|
|
96
|
+
for (let c = 0; c < 4; c++) {
|
|
97
|
+
floats[row + VGEO_CLUSTER_ROW_OFFSET.SELF_SPHERE + c] =
|
|
98
|
+
page.self_sphere[cluster * 4 + c];
|
|
99
|
+
floats[row + VGEO_CLUSTER_ROW_OFFSET.PARENT_SPHERE + c] =
|
|
100
|
+
page.parent_sphere[cluster * 4 + c];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
floats[row + VGEO_CLUSTER_ROW_OFFSET.SELF_ERROR] = page.self_error[cluster];
|
|
104
|
+
floats[row + VGEO_CLUSTER_ROW_OFFSET.PARENT_ERROR] = page.parent_error[cluster];
|
|
105
|
+
|
|
106
|
+
const child_ref = page.child_ref[cluster];
|
|
107
|
+
|
|
108
|
+
let child_page_index;
|
|
109
|
+
|
|
110
|
+
if (child_ref === VGEO_NO_CHILD) {
|
|
111
|
+
child_page_index = VGEO_NO_CHILD_PAGE;
|
|
112
|
+
} else if (child_ref === VGEO_SAME_PAGE) {
|
|
113
|
+
child_page_index = page.index;
|
|
114
|
+
} else if (child_ref < page.child_page_index.length) {
|
|
115
|
+
child_page_index = page.child_page_index[child_ref];
|
|
116
|
+
} else {
|
|
117
|
+
/*
|
|
118
|
+
A `child_ref` outside this page's child table. Impossible in a container the validator
|
|
119
|
+
accepts, and reachable because validation is off by default — so it is counted and the
|
|
120
|
+
cluster becomes a leaf, which is what `vgeo_select_cut` does with the same input.
|
|
121
|
+
|
|
122
|
+
The alternative is what this used to do: index past the child table, take `undefined`,
|
|
123
|
+
and store it as **zero** in a `Uint32Array`. Zero is the root page, which is pinned and
|
|
124
|
+
therefore always resident, so the cluster silently descended into whatever group of the
|
|
125
|
+
root carried that index instead of being drawn.
|
|
126
|
+
*/
|
|
127
|
+
child_page_index = VGEO_NO_CHILD_PAGE;
|
|
128
|
+
|
|
129
|
+
broken_child_refs++;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
words[row + VGEO_CLUSTER_ROW_OFFSET.CHILD_PAGE_INDEX] = child_page_index;
|
|
133
|
+
words[row + VGEO_CLUSTER_ROW_OFFSET.CHILD_GROUP] = page.child_group[cluster];
|
|
134
|
+
words[row + VGEO_CLUSTER_ROW_OFFSET.CHILD_REF] = child_ref;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return broken_child_refs;
|
|
138
|
+
}
|
|
@@ -13,7 +13,7 @@ export class TinyGltf {
|
|
|
13
13
|
* @readonly
|
|
14
14
|
* @type {TextureFormat}
|
|
15
15
|
*/
|
|
16
|
-
static readonly "__#
|
|
16
|
+
static readonly "__#240@#UNCOMPRESSED_TARGET": TextureFormat;
|
|
17
17
|
/**
|
|
18
18
|
* @param {AssetManager} assetManager
|
|
19
19
|
* @param {AssetRequestScope} [scope]
|
|
@@ -53,7 +53,7 @@ export class NSS {
|
|
|
53
53
|
* @returns {number}
|
|
54
54
|
*/
|
|
55
55
|
static recommended_jitter_sequence_size(upscale_ratio: number): number;
|
|
56
|
-
static "__#
|
|
56
|
+
static "__#173@#preprocess_tensor_descriptor"(render_w: any, render_h: any): TextureResourceDescriptor;
|
|
57
57
|
/**
|
|
58
58
|
* @param {GraphicsContext} graphics
|
|
59
59
|
*/
|
package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare_meshlet_draw_commands_by_material.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;;;;GAeG;AACH,uKAJa;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,wBAAwB,EAAE,MAAM,CAAA;CAAC,
|
|
1
|
+
{"version":3,"file":"prepare_meshlet_draw_commands_by_material.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;;;;GAeG;AACH,uKAJa;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,wBAAwB,EAAE,MAAM,CAAA;CAAC,CAgUnH"}
|
|
@@ -129,6 +129,15 @@ export function graph_prepare_meshlet_draw_commands_by_material({
|
|
|
129
129
|
expected_output_size: meshlet_buffer_size,
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
+
/*
|
|
133
|
+
No virtual-geometry seam here, and not for want of a place to put one. This path serves the
|
|
134
|
+
transparent and alpha-tested draws, and it is handed a `scene` and an optional camera
|
|
135
|
+
*resource* rather than a `GPUViewContext` — where a cut needs the camera's uniform buffer to
|
|
136
|
+
put each instance into object space. The deeper reason is that it would be the wrong thing to
|
|
137
|
+
add: `VIRTUAL_GEOMETRY_DESIGN.md` §9 scopes v1 to static opaque geometry, and the opaque paths
|
|
138
|
+
are where the seam lives.
|
|
139
|
+
*/
|
|
140
|
+
|
|
132
141
|
graph_record_stat(graph, limits.stats, RasterizationCollectionType.Meshlets, meshlets);
|
|
133
142
|
|
|
134
143
|
if (hzb !== -1 && camera !== -1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_rasterize_scene_fast.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_rasterize_scene_fast.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;GAUG;AACH;;;;;;;IAFa;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAC,CAoJ3D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAJ+B,KAAK;IACC,GAAG;IACA,MAAM;SA8C7C"}
|
|
@@ -9,6 +9,7 @@ import { rasterization_material_bucket } from "../expand/bucket/chunk_rasterizat
|
|
|
9
9
|
import { graph_meshes_classify_buckets } from "../expand/bucket/mesh/graph_meshes_classify_buckets.js";
|
|
10
10
|
import { graph_meshlets_rasterize } from "../expand/graph_meshlets_rasterize.js";
|
|
11
11
|
import { graph_expand_meshes_to_meshlets } from "../expand/mesh/graph_expand_meshes_to_meshlets.js";
|
|
12
|
+
import { graph_vgeo_expand_if_enabled } from "../../geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js";
|
|
12
13
|
import { RasterizationCollectionType } from "../expand/RasterizationCollectionType.js";
|
|
13
14
|
import { construct_primitive_state } from "../bucket/construct_primitive_state.js";
|
|
14
15
|
import { graph_mesh_frustum_cull } from "../compute/graph_mesh_frustum_cull.js";
|
|
@@ -91,7 +92,7 @@ export function graph_rasterize_scene_fast_raw({
|
|
|
91
92
|
limits,
|
|
92
93
|
});
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
let gr_bucket_meshlets = graph_expand_meshes_to_meshlets({
|
|
95
96
|
graph,
|
|
96
97
|
input_meshes: gr_bucket_meshes,
|
|
97
98
|
scene: scene_ctx,
|
|
@@ -99,6 +100,16 @@ export function graph_rasterize_scene_fast_raw({
|
|
|
99
100
|
limits,
|
|
100
101
|
});
|
|
101
102
|
|
|
103
|
+
// the seam: this bucket's virtual-geometry instances select their cut and append it to
|
|
104
|
+
// the same collection, which is the whole of what the rest of this function is told
|
|
105
|
+
gr_bucket_meshlets = graph_vgeo_expand_if_enabled({
|
|
106
|
+
graph,
|
|
107
|
+
input_meshes: gr_bucket_meshes,
|
|
108
|
+
output_meshlets: gr_bucket_meshlets,
|
|
109
|
+
view: view_ctx,
|
|
110
|
+
limits,
|
|
111
|
+
});
|
|
112
|
+
|
|
102
113
|
graph_record_stat(graph, limits.stats, RasterizationCollectionType.Meshlets, gr_bucket_meshlets);
|
|
103
114
|
|
|
104
115
|
const primitive_state = construct_primitive_state(draw_mode, side, job.cull_policy);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_rasterize_partial_opaque.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_rasterize_partial_opaque.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js"],"names":[],"mappings":"AAwBA;;;;;;;;;;;;;;;GAeG;AACH,gMAFa;IAAC,eAAe,EAAC,MAAM,CAAC;IAAC,cAAc,EAAC,MAAM,CAAC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,aAAa,EAAC,MAAM,EAAE,CAAA;CAAC,CAwMjG"}
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { rasterization_material_bucket } from "../expand/bucket/chunk_rasterization_material_bucket.js";
|
|
18
18
|
import { graph_meshlets_rasterize } from "../expand/graph_meshlets_rasterize.js";
|
|
19
19
|
import { graph_expand_meshes_to_meshlets } from "../expand/mesh/graph_expand_meshes_to_meshlets.js";
|
|
20
|
+
import { graph_vgeo_expand_if_enabled } from "../../geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js";
|
|
20
21
|
import { MeshletFilter2WayPassData, pass_filter_meshlets_2way } from "../expand/pass1/pass_filter_meshlets_2way.js";
|
|
21
22
|
import { RasterizationCollectionType } from "../expand/RasterizationCollectionType.js";
|
|
22
23
|
import { construct_primitive_state, CullPolicy } from "../bucket/construct_primitive_state.js";
|
|
@@ -166,7 +167,7 @@ export function graph_rasterize_partial_opaque({
|
|
|
166
167
|
|
|
167
168
|
gr_instances_maybe = pass_data_instances_0.instances_maybe = pass_instances_0.write(gr_instances_maybe);
|
|
168
169
|
|
|
169
|
-
|
|
170
|
+
let meshlet_expansion_0 = graph_expand_meshes_to_meshlets({
|
|
170
171
|
graph,
|
|
171
172
|
input_meshes: pass_data_instances_0.instances_positive,
|
|
172
173
|
scene: scene_ctx,
|
|
@@ -174,6 +175,16 @@ export function graph_rasterize_partial_opaque({
|
|
|
174
175
|
limits,
|
|
175
176
|
});
|
|
176
177
|
|
|
178
|
+
// the seam. The instance sets of the two HZB passes are disjoint, so cutting each of
|
|
179
|
+
// them costs one cut per view in total and no instance is ever cut twice
|
|
180
|
+
meshlet_expansion_0 = graph_vgeo_expand_if_enabled({
|
|
181
|
+
graph,
|
|
182
|
+
input_meshes: pass_data_instances_0.instances_positive,
|
|
183
|
+
output_meshlets: meshlet_expansion_0,
|
|
184
|
+
view,
|
|
185
|
+
limits,
|
|
186
|
+
});
|
|
187
|
+
|
|
177
188
|
|
|
178
189
|
graph_record_stat(graph, limits.stats, RasterizationCollectionType.Meshlets, meshlet_expansion_0);
|
|
179
190
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_rasterize_remaining_opaque.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_rasterize_remaining_opaque.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;;;;;;GAiBG;AACH,kOAFa;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,aAAa,EAAC,MAAM,EAAE,CAAA;CAAC,CA4GlD"}
|