@woosh/meep-engine 3.61.1 → 3.61.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +111 -0
- package/package.json +1 -1
- package/src/engine/network/sim/SimActionExecutor.d.ts +4 -0
- package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
- package/src/engine/network/sim/SimActionExecutor.js +4 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/generation/foliage/material/foliage_atlas_cutout.d.ts.map +1 -1
- package/src/generation/foliage/material/foliage_atlas_cutout.js +21 -5
- package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts +8 -0
- package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts.map +1 -1
- package/src/generation/foliage/mesh/tree_cluster_representatives.js +178 -78
- package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts.map +1 -1
- package/src/generation/foliage/mesh/tree_mesh_build_bark.js +178 -97
- package/src/generation/foliage/skeleton/ShootLightField.d.ts +1 -0
- package/src/generation/foliage/skeleton/ShootLightField.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/ShootLightField.js +88 -17
- package/src/generation/foliage/skeleton/ShootWoodHash.d.ts +5 -2
- package/src/generation/foliage/skeleton/ShootWoodHash.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/ShootWoodHash.js +191 -25
- package/src/shade/playground/probe_clipmap/README.md +3 -4
- package/src/shade/playground/probe_clipmap/index.html +5 -13
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +4 -5
- package/src/shade/playground/probe_clipmap_box/README.md +55 -0
- package/src/shade/playground/probe_clipmap_box/index.html +185 -0
- package/src/shade/playground/probe_clipmap_box/main.d.ts +8 -0
- package/src/shade/playground/probe_clipmap_box/main.d.ts.map +1 -0
- package/src/shade/playground/probe_clipmap_box/main.js +323 -0
- package/src/shade/playground/probe_clipmap_box/scene.d.ts +93 -0
- package/src/shade/playground/probe_clipmap_box/scene.d.ts.map +1 -0
- package/src/shade/playground/probe_clipmap_box/scene.js +256 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +56 -12
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts +10 -0
- package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts.map +1 -0
- package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.js +54 -0
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +85 -36
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +813 -412
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +7 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF.js +8 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts +14 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.js +35 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.js +0 -4
- package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts +55 -10
- package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.js +86 -16
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts +2 -2
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.js +28 -2
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts +54 -0
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.js +146 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +2 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts +18 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.js +66 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts +17 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.js +66 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +5 -3
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +15 -14
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts +2 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.js +12 -3
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts +21 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.js +84 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts +53 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.js +343 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts +3 -3
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.js +9 -5
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts +2 -2
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.js +3 -2
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts +69 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.js +294 -0
- package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts +16 -0
- package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.js +36 -0
- package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts +126 -0
- package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.js +148 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts +10 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.js +140 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts +8 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.js +76 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts +9 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.js +23 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts +13 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.js +23 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +262 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +1819 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +118 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +204 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts +66 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.js +103 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts +19 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.js +23 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts +15 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.js +70 -0
- package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts +13 -0
- package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.js +35 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts +32 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.js +111 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts +17 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.js +49 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts +13 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.js +35 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts +24 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.js +169 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts +19 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.js +49 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts +19 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.js +67 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts +78 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.js +320 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts +15 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.js +48 -0
- package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts +51 -0
- package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.js +109 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts +11 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.js +51 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts +26 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.js +453 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts +12 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.js +99 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts +22 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.js +140 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts +32 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.js +261 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +2 -2
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +6 -6
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +7 -7
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.d.ts +12 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js +49 -24
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.d.ts +12 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js +50 -19
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js +6 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +20 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +89 -20
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +26 -19
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +226 -148
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +25 -52
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +29 -69
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +19 -16
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js +24 -21
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +46 -22
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +49 -36
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts +3 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js +7 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +8 -22
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +15 -51
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +1 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +6 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +0 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts +4 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +9 -34
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +15 -39
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts +1 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js +2 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js +5 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.d.ts +5 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.js +16 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts +45 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.js +208 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts +24 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.js +40 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts +34 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/{graph_probe_clipmap_debug_mesh_cards.js → graph_probe_clipmap_debug_mesh_surfaces.js} +38 -57
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +61 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +193 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts +67 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.js +142 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts +32 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.js +70 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts +30 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.js +71 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts +26 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.js +176 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +23 -12
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +72 -52
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +32 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +37 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts +10 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.js +11 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts +11 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.js +15 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +55 -23
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +134 -69
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts +43 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.js +138 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts +21 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.js +49 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +4 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +19 -24
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +14 -19
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts +22 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.js +50 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +4 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +8 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +8 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +5 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +18 -23
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.js +4 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.js +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts +2 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +9 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +4 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js +14 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +7 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js +30 -26
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +6 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +19 -21
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js +6 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +6 -6
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts +14 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js +22 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts +37 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.js +122 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.js +1 -11
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts +8 -0
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js +6 -4
- package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +5 -1
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +2 -18
- package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts +17 -0
- package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts.map +1 -0
- package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.js +16 -0
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts +1 -1
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.js +1 -1
- package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.js +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts +20 -0
- package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.js +65 -0
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +26 -8
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +170 -142
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.js +5 -8
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +15 -4
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +33 -7
- package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts +12 -0
- package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/albedo_compress.js +26 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.js +22 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.js +23 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.js +25 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.js +36 -0
- package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/metal_rough_compress.js +38 -0
- package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.d.ts +40 -0
- package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.js +75 -0
- package/src/shade/renderer/shader/chunk/noise/chunk_vdc_radical_inverse.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_vdc_radical_inverse.js +3 -1
- package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.d.ts +28 -0
- package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.js +41 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.d.ts +12 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.js +24 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.js +35 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts +28 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.js +79 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.js +89 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts +31 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.js +66 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.js +2 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.js +34 -0
- package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts +18 -0
- package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.js +31 -23
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +3 -2
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +4 -0
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +2 -5
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +3 -20
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +5 -6
- package/src/shade/renderer/water/chunk_water_gi.d.ts +1 -1
- package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_gi.js +6 -8
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +76 -32
- package/src/core/math/hash/squirrel3.d.ts +0 -17
- package/src/core/math/hash/squirrel3.d.ts.map +0 -1
- package/src/core/math/hash/squirrel3.js +0 -30
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +0 -213
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +0 -1468
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts +0 -82
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.js +0 -127
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts +0 -24
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.js +0 -29
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts +0 -12
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.js +0 -31
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts +0 -11
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.js +0 -21
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts +0 -29
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.js +0 -179
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts +0 -17
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.js +0 -107
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts +0 -65
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +0 -376
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts +0 -40
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.js +0 -301
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts +0 -19
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.js +0 -61
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +0 -18
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +0 -102
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts +0 -15
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.js +0 -65
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts +0 -22
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.js +0 -136
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts +0 -20
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.js +0 -104
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts +0 -20
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.js +0 -80
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts +0 -18
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.js +0 -113
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts +0 -30
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.js +0 -146
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts +0 -34
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts +0 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.js +0 -82
- package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.d.ts +0 -12
- package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.js +0 -30
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What the probe clipmap GI holds of one scene's geometry caches (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md
|
|
3
|
-
* §6.1
|
|
3
|
+
* §6.1), kept by entity and moved as the rows' events say, O(changes):
|
|
4
4
|
*
|
|
5
5
|
* - a hold on the cache of the geometry each mesh row in the SDF world draws, drawing both sides
|
|
6
6
|
* when the row's material does;
|
|
7
|
-
* - one
|
|
8
|
-
*
|
|
7
|
+
* - one Model Surface Cache per (geometry, material) pair those rows draw, with the rows drawing each
|
|
8
|
+
* pair, which the brick material is gathered from;
|
|
9
|
+
* - the row → surface cache table readers find a row's cache in: the pair's once it is resident,
|
|
9
10
|
* `GPU_DATABASE_NULL` until then and for a row out of the SDF world.
|
|
10
11
|
*
|
|
11
12
|
* A row is in the SDF world when its `flags` carry `MESH_FLAG_SDF_WORLD`, whatever its geometry: a
|
|
12
13
|
* virtual geometry's cache is held as a mesh's is, and is its proxy's once `VGeoSDFProxies` aliases it: the
|
|
13
|
-
* hold and its side move to the proxy, and the pair's
|
|
14
|
+
* hold and its side move to the proxy, and the pair's cache follows the proxy's field.
|
|
14
15
|
* A skinned row draws a clone: the hold and the pair are its source's,
|
|
15
|
-
* whose unskinned field and
|
|
16
|
-
* its hold and its pair, the new ones taken before the old ones go, so a cache
|
|
17
|
-
*
|
|
16
|
+
* whose unskinned field and caches the clone's header is aliased to (§6.3). A row written again moves
|
|
17
|
+
* its hold and its pair, the new ones taken before the old ones go, so a cache a row keeps drawing is
|
|
18
|
+
* never let go in between.
|
|
19
|
+
*
|
|
20
|
+
* Rows the world's bricks must be built again over are kept until drained: a row whose geometry's field
|
|
21
|
+
* turned resident, one that joined or left the SDF world (§6.4, §7.4), and each row of a pair whose
|
|
22
|
+
* surface cache a bake completed, the first and every one after, since the bricks hold the materials
|
|
23
|
+
* their caches held when each was gathered.
|
|
18
24
|
*
|
|
19
25
|
* When the material manager restages a material whose version moved, each of that material's pairs
|
|
20
|
-
* is
|
|
26
|
+
* is baked again, and the holds of its rows move to the side it draws now.
|
|
21
27
|
*
|
|
22
|
-
* {@link attach} subscribes and walks the rows already there; {@link detach} gives every hold and
|
|
23
|
-
*
|
|
24
|
-
* the
|
|
28
|
+
* {@link attach} subscribes and walks the rows already there; {@link detach} gives every hold and cache
|
|
29
|
+
* back. Neither trims: a field with no holder stays until its user trims, so leaving the mode keeps
|
|
30
|
+
* the fields for the next time (D28). Caches go with their last row, and are made again.
|
|
25
31
|
*/
|
|
26
32
|
export class ProbeClipmapSceneHolds {
|
|
27
33
|
/**
|
|
28
34
|
* @param {GPUSceneContext} scene
|
|
29
|
-
* @param {GraphicsContext} graphics whose material manager's restages
|
|
35
|
+
* @param {GraphicsContext} graphics whose material manager's restages bake the pairs of the material again
|
|
30
36
|
*/
|
|
31
37
|
constructor(scene: GPUSceneContext, graphics: GraphicsContext);
|
|
32
38
|
/**
|
|
@@ -39,12 +45,12 @@ export class ProbeClipmapSceneHolds {
|
|
|
39
45
|
*/
|
|
40
46
|
get hold_count(): number;
|
|
41
47
|
/**
|
|
42
|
-
* (geometry, material) pairs the rows draw, a
|
|
48
|
+
* (geometry, material) pairs the rows draw, a cache each.
|
|
43
49
|
* @returns {number}
|
|
44
50
|
*/
|
|
45
51
|
get pair_count(): number;
|
|
46
52
|
/**
|
|
47
|
-
*
|
|
53
|
+
* Bakes again asked for, a pair each time its material was restaged.
|
|
48
54
|
* @returns {number}
|
|
49
55
|
*/
|
|
50
56
|
get recaptures_requested(): number;
|
|
@@ -55,19 +61,20 @@ export class ProbeClipmapSceneHolds {
|
|
|
55
61
|
get invalidated(): readonly number[];
|
|
56
62
|
clear_invalidated(): void;
|
|
57
63
|
/**
|
|
58
|
-
* The
|
|
64
|
+
* The Model Surface Cache of the pair `material` makes with a geometry, or undefined when no row
|
|
65
|
+
* draws it.
|
|
59
66
|
*
|
|
60
67
|
* @param {GPUGeometryMetadata} record
|
|
61
68
|
* @param {ShadeMaterial} material
|
|
62
69
|
* @returns {number|undefined}
|
|
63
70
|
*/
|
|
64
|
-
|
|
71
|
+
surface_cache_of(record: GPUGeometryMetadata, material: ShadeMaterial): number | undefined;
|
|
65
72
|
/**
|
|
66
|
-
* The row →
|
|
67
|
-
* each frame, after {@link flush}.
|
|
73
|
+
* The row → Model Surface Cache table: a word a `meshes` row. Made on first use, replaced when it
|
|
74
|
+
* grows; take it each frame, after {@link flush}.
|
|
68
75
|
* @returns {GPUBuffer}
|
|
69
76
|
*/
|
|
70
|
-
get
|
|
77
|
+
get surface_rows_buffer(): GPUBuffer;
|
|
71
78
|
attach(): void;
|
|
72
79
|
detach(): void;
|
|
73
80
|
/**
|
package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProbeClipmapSceneHolds.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProbeClipmapSceneHolds.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js"],"names":[],"mappings":"AAyLA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH;IAiEI;;;OAGG;IACH,mBAHW,eAAe,YACf,eAAe,EASzB;IAED;;OAEG;IACH,sEAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,qCAEC;IAED,0BAEC;IAED;;;;;;;OAOG;IACH,yBAJW,mBAAmB,YACnB,aAAa,GACX,MAAM,GAAC,SAAS,CAI5B;IAED;;;;OAIG;IACH,qCAEC;IAED,eAmBC;IAED,eAoCC;IAED;;OAEG;IACH,cAEC;;CA2RJ;8BAzrBY,OAAO,gCAAgC,EAAE,eAAe;8BACxD,OAAO,mCAAmC,EAAE,eAAe;kCAC3D,OAAO,uCAAuC,EAAE,mBAAmB;4BACnE,OAAO,iCAAiC,EAAE,aAAa;iCACvD,OAAO,sCAAsC,EAAE,kBAAkB;8BACjE,OAAO,0BAA0B,EAAE,eAAe"}
|
|
@@ -22,13 +22,14 @@ import { row_of_entity } from "../../scene/rows/GPUSceneRows.js";
|
|
|
22
22
|
const PAIR_KEY_MATERIAL_SPAN = 2 ** 20;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Rows
|
|
25
|
+
* Rows a row table starts with room for; it doubles past that.
|
|
26
26
|
* @type {number}
|
|
27
27
|
*/
|
|
28
28
|
const INITIAL_ROW_CAPACITY = 256;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* A (geometry, material) pair some row in the SDF world draws, and the
|
|
31
|
+
* A (geometry, material) pair some row in the SDF world draws, and the Model Surface Cache of it the
|
|
32
|
+
* holds keep.
|
|
32
33
|
*/
|
|
33
34
|
class Pair {
|
|
34
35
|
/** @type {number} */
|
|
@@ -38,7 +39,7 @@ class Pair {
|
|
|
38
39
|
material = undefined;
|
|
39
40
|
|
|
40
41
|
/** @type {number} */
|
|
41
|
-
|
|
42
|
+
cache = 0;
|
|
42
43
|
|
|
43
44
|
/**
|
|
44
45
|
* Whether its rows hold the geometry's cache as drawing both sides: the material's side, as it was
|
|
@@ -54,30 +55,164 @@ class Pair {
|
|
|
54
55
|
rows = new Set();
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
/**
|
|
59
|
+
* A row → cache table: a word a `meshes` row, mirrored on the host and put on the device by changed
|
|
60
|
+
* range. A row with nothing is `GPU_DATABASE_NULL`.
|
|
61
|
+
*/
|
|
62
|
+
class RowTable {
|
|
63
|
+
#mirror = new Uint32Array(0);
|
|
64
|
+
/** @type {GPUBuffer|null} */
|
|
65
|
+
#buffer = null;
|
|
66
|
+
#dirty_low = Infinity;
|
|
67
|
+
#dirty_high = -1;
|
|
68
|
+
#label;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @param {string} label
|
|
72
|
+
*/
|
|
73
|
+
constructor(label) {
|
|
74
|
+
this.#label = label;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @param {number} row
|
|
79
|
+
* @param {number} value
|
|
80
|
+
*/
|
|
81
|
+
write(row, value) {
|
|
82
|
+
if (row >= this.#mirror.length) {
|
|
83
|
+
this.#grow_mirror(row + 1);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (this.#mirror[row] === value) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
this.#mirror[row] = value;
|
|
91
|
+
|
|
92
|
+
this.#dirty_low = Math.min(this.#dirty_low, row);
|
|
93
|
+
this.#dirty_high = Math.max(this.#dirty_high, row);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @param {GPUDevice} device
|
|
98
|
+
* @returns {GPUBuffer}
|
|
99
|
+
*/
|
|
100
|
+
buffer(device) {
|
|
101
|
+
this.#ensure(device, 1);
|
|
102
|
+
|
|
103
|
+
return this.#buffer;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @param {GPUDevice} device
|
|
108
|
+
*/
|
|
109
|
+
flush(device) {
|
|
110
|
+
const low = this.#dirty_low;
|
|
111
|
+
const high = this.#dirty_high;
|
|
112
|
+
|
|
113
|
+
if (high < low) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
this.#dirty_low = Infinity;
|
|
118
|
+
this.#dirty_high = -1;
|
|
119
|
+
|
|
120
|
+
if (this.#ensure(device, high + 1)) {
|
|
121
|
+
// a new table took the whole mirror
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
device.queue.writeBuffer(this.#buffer, 4 * low, this.#mirror, low, high + 1 - low);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
clear() {
|
|
129
|
+
this.#buffer?.destroy();
|
|
130
|
+
this.#buffer = null;
|
|
131
|
+
this.#mirror = new Uint32Array(0);
|
|
132
|
+
this.#dirty_low = Infinity;
|
|
133
|
+
this.#dirty_high = -1;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @param {number} length
|
|
138
|
+
*/
|
|
139
|
+
#grow_mirror(length) {
|
|
140
|
+
let capacity = Math.max(INITIAL_ROW_CAPACITY, this.#mirror.length);
|
|
141
|
+
|
|
142
|
+
while (capacity < length) {
|
|
143
|
+
capacity *= 2;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const grown = new Uint32Array(capacity).fill(GPU_DATABASE_NULL);
|
|
147
|
+
|
|
148
|
+
grown.set(this.#mirror);
|
|
149
|
+
|
|
150
|
+
this.#mirror = grown;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* A table buffer for at least `rows` rows; a new one gets the whole mirror.
|
|
155
|
+
*
|
|
156
|
+
* @param {GPUDevice} device
|
|
157
|
+
* @param {number} rows
|
|
158
|
+
* @returns {boolean} whether the buffer is new
|
|
159
|
+
*/
|
|
160
|
+
#ensure(device, rows) {
|
|
161
|
+
if (rows > this.#mirror.length) {
|
|
162
|
+
this.#grow_mirror(rows);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (this.#buffer !== null && this.#buffer.size >= 4 * this.#mirror.length) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
this.#buffer?.destroy();
|
|
170
|
+
|
|
171
|
+
this.#buffer = device.createBuffer(BufferDescriptor.fromJSON({
|
|
172
|
+
label: this.#label,
|
|
173
|
+
size: 4 * this.#mirror.length,
|
|
174
|
+
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,
|
|
175
|
+
}));
|
|
176
|
+
|
|
177
|
+
device.queue.writeBuffer(this.#buffer, 0, this.#mirror);
|
|
178
|
+
|
|
179
|
+
this.#dirty_low = Infinity;
|
|
180
|
+
this.#dirty_high = -1;
|
|
181
|
+
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
57
186
|
/**
|
|
58
187
|
* What the probe clipmap GI holds of one scene's geometry caches (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md
|
|
59
|
-
* §6.1
|
|
188
|
+
* §6.1), kept by entity and moved as the rows' events say, O(changes):
|
|
60
189
|
*
|
|
61
190
|
* - a hold on the cache of the geometry each mesh row in the SDF world draws, drawing both sides
|
|
62
191
|
* when the row's material does;
|
|
63
|
-
* - one
|
|
64
|
-
*
|
|
192
|
+
* - one Model Surface Cache per (geometry, material) pair those rows draw, with the rows drawing each
|
|
193
|
+
* pair, which the brick material is gathered from;
|
|
194
|
+
* - the row → surface cache table readers find a row's cache in: the pair's once it is resident,
|
|
65
195
|
* `GPU_DATABASE_NULL` until then and for a row out of the SDF world.
|
|
66
196
|
*
|
|
67
197
|
* A row is in the SDF world when its `flags` carry `MESH_FLAG_SDF_WORLD`, whatever its geometry: a
|
|
68
198
|
* virtual geometry's cache is held as a mesh's is, and is its proxy's once `VGeoSDFProxies` aliases it: the
|
|
69
|
-
* hold and its side move to the proxy, and the pair's
|
|
199
|
+
* hold and its side move to the proxy, and the pair's cache follows the proxy's field.
|
|
70
200
|
* A skinned row draws a clone: the hold and the pair are its source's,
|
|
71
|
-
* whose unskinned field and
|
|
72
|
-
* its hold and its pair, the new ones taken before the old ones go, so a cache
|
|
73
|
-
*
|
|
201
|
+
* whose unskinned field and caches the clone's header is aliased to (§6.3). A row written again moves
|
|
202
|
+
* its hold and its pair, the new ones taken before the old ones go, so a cache a row keeps drawing is
|
|
203
|
+
* never let go in between.
|
|
204
|
+
*
|
|
205
|
+
* Rows the world's bricks must be built again over are kept until drained: a row whose geometry's field
|
|
206
|
+
* turned resident, one that joined or left the SDF world (§6.4, §7.4), and each row of a pair whose
|
|
207
|
+
* surface cache a bake completed, the first and every one after, since the bricks hold the materials
|
|
208
|
+
* their caches held when each was gathered.
|
|
74
209
|
*
|
|
75
210
|
* When the material manager restages a material whose version moved, each of that material's pairs
|
|
76
|
-
* is
|
|
211
|
+
* is baked again, and the holds of its rows move to the side it draws now.
|
|
77
212
|
*
|
|
78
|
-
* {@link attach} subscribes and walks the rows already there; {@link detach} gives every hold and
|
|
79
|
-
*
|
|
80
|
-
* the
|
|
213
|
+
* {@link attach} subscribes and walks the rows already there; {@link detach} gives every hold and cache
|
|
214
|
+
* back. Neither trims: a field with no holder stays until its user trims, so leaving the mode keeps
|
|
215
|
+
* the fields for the next time (D28). Caches go with their last row, and are made again.
|
|
81
216
|
*/
|
|
82
217
|
export class ProbeClipmapSceneHolds {
|
|
83
218
|
|
|
@@ -126,34 +261,27 @@ export class ProbeClipmapSceneHolds {
|
|
|
126
261
|
#pairs_of_geometry = new Map();
|
|
127
262
|
|
|
128
263
|
/**
|
|
129
|
-
* Rows the world's bricks must be built again over, since they were last drained
|
|
130
|
-
*
|
|
131
|
-
* as the GPU's tables address them (`row_of_entity`), not entities.
|
|
264
|
+
* Rows the world's bricks must be built again over, since they were last drained. Rows as the GPU's
|
|
265
|
+
* tables address them (`row_of_entity`), not entities.
|
|
132
266
|
* @type {number[]}
|
|
133
267
|
*/
|
|
134
268
|
#invalidated = [];
|
|
135
269
|
|
|
136
270
|
/**
|
|
137
|
-
* Each
|
|
271
|
+
* Each cache's pair, by cache id.
|
|
138
272
|
* @type {(Pair|undefined)[]}
|
|
139
273
|
*/
|
|
140
|
-
#
|
|
274
|
+
#pair_of_cache = [];
|
|
141
275
|
|
|
142
276
|
#recaptures_requested = 0;
|
|
143
277
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
#rows_mirror = new Uint32Array(0);
|
|
147
|
-
/** @type {GPUBuffer|null} */
|
|
148
|
-
#rows_buffer = null;
|
|
149
|
-
#rows_dirty_low = Infinity;
|
|
150
|
-
#rows_dirty_high = -1;
|
|
278
|
+
#surface_rows = new RowTable("ProbeClipmapSceneHolds/surface rows");
|
|
151
279
|
|
|
152
280
|
#attached = false;
|
|
153
281
|
|
|
154
282
|
/**
|
|
155
283
|
* @param {GPUSceneContext} scene
|
|
156
|
-
* @param {GraphicsContext} graphics whose material manager's restages
|
|
284
|
+
* @param {GraphicsContext} graphics whose material manager's restages bake the pairs of the material again
|
|
157
285
|
*/
|
|
158
286
|
constructor(scene, graphics) {
|
|
159
287
|
assert.defined(scene, 'scene');
|
|
@@ -180,7 +308,7 @@ export class ProbeClipmapSceneHolds {
|
|
|
180
308
|
}
|
|
181
309
|
|
|
182
310
|
/**
|
|
183
|
-
* (geometry, material) pairs the rows draw, a
|
|
311
|
+
* (geometry, material) pairs the rows draw, a cache each.
|
|
184
312
|
* @returns {number}
|
|
185
313
|
*/
|
|
186
314
|
get pair_count() {
|
|
@@ -188,7 +316,7 @@ export class ProbeClipmapSceneHolds {
|
|
|
188
316
|
}
|
|
189
317
|
|
|
190
318
|
/**
|
|
191
|
-
*
|
|
319
|
+
* Bakes again asked for, a pair each time its material was restaged.
|
|
192
320
|
* @returns {number}
|
|
193
321
|
*/
|
|
194
322
|
get recaptures_requested() {
|
|
@@ -208,25 +336,24 @@ export class ProbeClipmapSceneHolds {
|
|
|
208
336
|
}
|
|
209
337
|
|
|
210
338
|
/**
|
|
211
|
-
* The
|
|
339
|
+
* The Model Surface Cache of the pair `material` makes with a geometry, or undefined when no row
|
|
340
|
+
* draws it.
|
|
212
341
|
*
|
|
213
342
|
* @param {GPUGeometryMetadata} record
|
|
214
343
|
* @param {ShadeMaterial} material
|
|
215
344
|
* @returns {number|undefined}
|
|
216
345
|
*/
|
|
217
|
-
|
|
218
|
-
return this.#pairs.get(record.index * PAIR_KEY_MATERIAL_SPAN + material.id)?.
|
|
346
|
+
surface_cache_of(record, material) {
|
|
347
|
+
return this.#pairs.get(record.index * PAIR_KEY_MATERIAL_SPAN + material.id)?.cache;
|
|
219
348
|
}
|
|
220
349
|
|
|
221
350
|
/**
|
|
222
|
-
* The row →
|
|
223
|
-
* each frame, after {@link flush}.
|
|
351
|
+
* The row → Model Surface Cache table: a word a `meshes` row. Made on first use, replaced when it
|
|
352
|
+
* grows; take it each frame, after {@link flush}.
|
|
224
353
|
* @returns {GPUBuffer}
|
|
225
354
|
*/
|
|
226
|
-
get
|
|
227
|
-
this.#
|
|
228
|
-
|
|
229
|
-
return this.#rows_buffer;
|
|
355
|
+
get surface_rows_buffer() {
|
|
356
|
+
return this.#surface_rows.buffer(this.#device);
|
|
230
357
|
}
|
|
231
358
|
|
|
232
359
|
attach() {
|
|
@@ -235,13 +362,15 @@ export class ProbeClipmapSceneHolds {
|
|
|
235
362
|
this.#attached = true;
|
|
236
363
|
|
|
237
364
|
const rows = this.#scene.rows;
|
|
238
|
-
const
|
|
365
|
+
const sdf = this.#scene.geometries.sdf;
|
|
239
366
|
|
|
240
367
|
rows.onMeshWritten.add(this.#written, this);
|
|
241
368
|
rows.onMeshReleased.add(this.#released, this);
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
369
|
+
sdf.onBaked.add(this.#baked, this);
|
|
370
|
+
|
|
371
|
+
sdf.surfaces.onBaked.add(this.#surface_baked, this);
|
|
372
|
+
sdf.surfaces.onWithdrawn.add(this.#cache_withdrawn, this);
|
|
373
|
+
|
|
245
374
|
this.#materials.onMaterialRestaged.add(this.#restaged, this);
|
|
246
375
|
|
|
247
376
|
// a row not yet written is taken now, and moved when it is
|
|
@@ -257,13 +386,14 @@ export class ProbeClipmapSceneHolds {
|
|
|
257
386
|
|
|
258
387
|
const rows = this.#scene.rows;
|
|
259
388
|
const sdf = this.#scene.geometries.sdf;
|
|
260
|
-
const cards = sdf.cards;
|
|
261
389
|
|
|
262
390
|
rows.onMeshWritten.remove(this.#written, this);
|
|
263
391
|
rows.onMeshReleased.remove(this.#released, this);
|
|
264
392
|
sdf.onBaked.remove(this.#baked, this);
|
|
265
|
-
|
|
266
|
-
|
|
393
|
+
|
|
394
|
+
sdf.surfaces.onBaked.remove(this.#surface_baked, this);
|
|
395
|
+
sdf.surfaces.onWithdrawn.remove(this.#cache_withdrawn, this);
|
|
396
|
+
|
|
267
397
|
this.#materials.onMaterialRestaged.remove(this.#restaged, this);
|
|
268
398
|
|
|
269
399
|
for (const [entity, record] of this.#held) {
|
|
@@ -271,7 +401,7 @@ export class ProbeClipmapSceneHolds {
|
|
|
271
401
|
}
|
|
272
402
|
|
|
273
403
|
for (const pair of this.#pairs.values()) {
|
|
274
|
-
|
|
404
|
+
this.#release_cache(pair.cache);
|
|
275
405
|
}
|
|
276
406
|
|
|
277
407
|
this.#held.clear();
|
|
@@ -279,36 +409,17 @@ export class ProbeClipmapSceneHolds {
|
|
|
279
409
|
this.#pairs.clear();
|
|
280
410
|
this.#pairs_of_material.clear();
|
|
281
411
|
this.#pairs_of_geometry.clear();
|
|
282
|
-
this.#
|
|
412
|
+
this.#pair_of_cache.length = 0;
|
|
283
413
|
this.#invalidated.length = 0;
|
|
284
414
|
|
|
285
|
-
this.#
|
|
286
|
-
this.#rows_buffer = null;
|
|
287
|
-
this.#rows_mirror = new Uint32Array(0);
|
|
288
|
-
this.#rows_dirty_low = Infinity;
|
|
289
|
-
this.#rows_dirty_high = -1;
|
|
415
|
+
this.#surface_rows.clear();
|
|
290
416
|
}
|
|
291
417
|
|
|
292
418
|
/**
|
|
293
419
|
* Put the table's changed rows on the device, ahead of the frame's commands.
|
|
294
420
|
*/
|
|
295
421
|
flush() {
|
|
296
|
-
|
|
297
|
-
const high = this.#rows_dirty_high;
|
|
298
|
-
|
|
299
|
-
if (high < low) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
this.#rows_dirty_low = Infinity;
|
|
304
|
-
this.#rows_dirty_high = -1;
|
|
305
|
-
|
|
306
|
-
if (this.#ensure_rows(high + 1)) {
|
|
307
|
-
// a new table took the whole mirror
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
this.#device.queue.writeBuffer(this.#rows_buffer, 4 * low, this.#rows_mirror, low, high + 1 - low);
|
|
422
|
+
this.#surface_rows.flush(this.#device);
|
|
312
423
|
}
|
|
313
424
|
|
|
314
425
|
/**
|
|
@@ -359,7 +470,7 @@ export class ProbeClipmapSceneHolds {
|
|
|
359
470
|
}
|
|
360
471
|
}
|
|
361
472
|
|
|
362
|
-
this.#write_row(entity, pair !== undefined &&
|
|
473
|
+
this.#write_row(entity, pair !== undefined && this.#is_resident(pair.cache) ? pair.cache : GPU_DATABASE_NULL);
|
|
363
474
|
|
|
364
475
|
// in the SDF world or out of it now: the bricks its box reaches are built again
|
|
365
476
|
if ((previous === undefined) !== (record === undefined)) {
|
|
@@ -384,9 +495,7 @@ export class ProbeClipmapSceneHolds {
|
|
|
384
495
|
}
|
|
385
496
|
|
|
386
497
|
for (const pair of pairs) {
|
|
387
|
-
|
|
388
|
-
this.#invalidated.push(row_of_entity(entity));
|
|
389
|
-
}
|
|
498
|
+
this.#invalidate_pair(pair);
|
|
390
499
|
}
|
|
391
500
|
}
|
|
392
501
|
|
|
@@ -427,15 +536,17 @@ export class ProbeClipmapSceneHolds {
|
|
|
427
536
|
return pair;
|
|
428
537
|
}
|
|
429
538
|
|
|
539
|
+
const sdf = this.#scene.geometries.sdf;
|
|
540
|
+
|
|
430
541
|
pair = new Pair();
|
|
431
542
|
|
|
432
543
|
pair.key = key;
|
|
433
544
|
pair.material = material;
|
|
434
545
|
pair.two_sided = material.draw_side === ShadeDrawSide.Double;
|
|
435
|
-
pair.
|
|
546
|
+
pair.cache = sdf.surfaces.acquire(record.index, material);
|
|
436
547
|
|
|
437
548
|
this.#pairs.set(key, pair);
|
|
438
|
-
this.#
|
|
549
|
+
this.#pair_of_cache[pair.cache] = pair;
|
|
439
550
|
|
|
440
551
|
let of_material = this.#pairs_of_material.get(material.id);
|
|
441
552
|
|
|
@@ -469,10 +580,10 @@ export class ProbeClipmapSceneHolds {
|
|
|
469
580
|
return;
|
|
470
581
|
}
|
|
471
582
|
|
|
472
|
-
this.#
|
|
583
|
+
this.#release_cache(pair.cache);
|
|
473
584
|
|
|
474
585
|
this.#pairs.delete(pair.key);
|
|
475
|
-
this.#
|
|
586
|
+
this.#pair_of_cache[pair.cache] = undefined;
|
|
476
587
|
|
|
477
588
|
const of_material = this.#pairs_of_material.get(pair.material.id);
|
|
478
589
|
|
|
@@ -493,25 +604,54 @@ export class ProbeClipmapSceneHolds {
|
|
|
493
604
|
}
|
|
494
605
|
|
|
495
606
|
/**
|
|
496
|
-
* @param {number}
|
|
607
|
+
* @param {number} cache
|
|
497
608
|
*/
|
|
498
|
-
#
|
|
499
|
-
|
|
609
|
+
#release_cache(cache) {
|
|
610
|
+
this.#scene.geometries.sdf.surfaces.release(cache);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* @param {number} cache
|
|
615
|
+
* @returns {boolean}
|
|
616
|
+
*/
|
|
617
|
+
#is_resident(cache) {
|
|
618
|
+
return this.#scene.geometries.sdf.surfaces.is_resident(cache);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* @param {Pair} pair
|
|
623
|
+
*/
|
|
624
|
+
#invalidate_pair(pair) {
|
|
625
|
+
for (const entity of pair.rows) {
|
|
626
|
+
this.#invalidated.push(row_of_entity(entity));
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* A bake of a surface cache is recorded in full: its rows find it, and the bricks they reach gather
|
|
632
|
+
* what it holds now.
|
|
633
|
+
*
|
|
634
|
+
* @param {number} cache
|
|
635
|
+
*/
|
|
636
|
+
#surface_baked(cache) {
|
|
637
|
+
const pair = this.#pair_of_cache[cache];
|
|
500
638
|
|
|
501
639
|
if (pair === undefined) {
|
|
502
640
|
return;
|
|
503
641
|
}
|
|
504
642
|
|
|
505
643
|
for (const entity of pair.rows) {
|
|
506
|
-
this.#write_row(entity,
|
|
644
|
+
this.#write_row(entity, cache);
|
|
507
645
|
}
|
|
646
|
+
|
|
647
|
+
this.#invalidate_pair(pair);
|
|
508
648
|
}
|
|
509
649
|
|
|
510
650
|
/**
|
|
511
|
-
* @param {number}
|
|
651
|
+
* @param {number} cache
|
|
512
652
|
*/
|
|
513
|
-
#
|
|
514
|
-
const pair = this.#
|
|
653
|
+
#cache_withdrawn(cache) {
|
|
654
|
+
const pair = this.#pair_of_cache[cache];
|
|
515
655
|
|
|
516
656
|
if (pair === undefined) {
|
|
517
657
|
return;
|
|
@@ -536,7 +676,8 @@ export class ProbeClipmapSceneHolds {
|
|
|
536
676
|
const two_sided = material.draw_side === ShadeDrawSide.Double;
|
|
537
677
|
|
|
538
678
|
for (const pair of of_material) {
|
|
539
|
-
sdf.
|
|
679
|
+
sdf.surfaces.recapture(pair.cache);
|
|
680
|
+
|
|
540
681
|
this.#recaptures_requested++;
|
|
541
682
|
|
|
542
683
|
if (pair.two_sided === two_sided) {
|
|
@@ -560,69 +701,6 @@ export class ProbeClipmapSceneHolds {
|
|
|
560
701
|
* @param {number} value
|
|
561
702
|
*/
|
|
562
703
|
#write_row(entity, value) {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
if (row >= this.#rows_mirror.length) {
|
|
566
|
-
this.#grow_mirror(row + 1);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
if (this.#rows_mirror[row] === value) {
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
this.#rows_mirror[row] = value;
|
|
574
|
-
|
|
575
|
-
this.#rows_dirty_low = Math.min(this.#rows_dirty_low, row);
|
|
576
|
-
this.#rows_dirty_high = Math.max(this.#rows_dirty_high, row);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* @param {number} length
|
|
581
|
-
*/
|
|
582
|
-
#grow_mirror(length) {
|
|
583
|
-
let capacity = Math.max(INITIAL_ROW_CAPACITY, this.#rows_mirror.length);
|
|
584
|
-
|
|
585
|
-
while (capacity < length) {
|
|
586
|
-
capacity *= 2;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
const grown = new Uint32Array(capacity).fill(GPU_DATABASE_NULL);
|
|
590
|
-
|
|
591
|
-
grown.set(this.#rows_mirror);
|
|
592
|
-
|
|
593
|
-
this.#rows_mirror = grown;
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* A table buffer for at least `rows` rows; a new one gets the whole mirror.
|
|
598
|
-
*
|
|
599
|
-
* @param {number} rows
|
|
600
|
-
* @returns {boolean} whether the buffer is new
|
|
601
|
-
*/
|
|
602
|
-
#ensure_rows(rows) {
|
|
603
|
-
if (rows > this.#rows_mirror.length) {
|
|
604
|
-
this.#grow_mirror(rows);
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
if (this.#rows_buffer !== null && this.#rows_buffer.size >= 4 * this.#rows_mirror.length) {
|
|
608
|
-
return false;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
this.#rows_buffer?.destroy();
|
|
612
|
-
|
|
613
|
-
const device = this.#device;
|
|
614
|
-
|
|
615
|
-
this.#rows_buffer = device.createBuffer(BufferDescriptor.fromJSON({
|
|
616
|
-
label: "ProbeClipmapSceneHolds/rows",
|
|
617
|
-
size: 4 * this.#rows_mirror.length,
|
|
618
|
-
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,
|
|
619
|
-
}));
|
|
620
|
-
|
|
621
|
-
device.queue.writeBuffer(this.#rows_buffer, 0, this.#rows_mirror);
|
|
622
|
-
|
|
623
|
-
this.#rows_dirty_low = Infinity;
|
|
624
|
-
this.#rows_dirty_high = -1;
|
|
625
|
-
|
|
626
|
-
return true;
|
|
704
|
+
this.#surface_rows.write(row_of_entity(entity), value);
|
|
627
705
|
}
|
|
628
706
|
}
|