@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
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
import { graph_import_buffer } from "../../../shader/graph/graph_import_buffer.js";
|
|
27
27
|
import { GPUTileAtlas3D } from "../../../texture/atlas/GPUTileAtlas3D.js";
|
|
28
28
|
import {
|
|
29
|
-
BRICK_OBJECT_CELLS,
|
|
30
29
|
BRICK_OCCUPANCY_BLOCK,
|
|
31
30
|
BRICK_STAGING_WORDS,
|
|
32
31
|
BRICK_STATE_FREE,
|
|
@@ -80,6 +79,12 @@ const BRICK_CASCADE_NEST_MARGIN = 1;
|
|
|
80
79
|
*/
|
|
81
80
|
const BRICK_ATLAS_SLOTS_XY = 16;
|
|
82
81
|
|
|
82
|
+
/**
|
|
83
|
+
* A build with no payload written after its store.
|
|
84
|
+
* @type {ReadonlyArray<BrickMaterialWriter>}
|
|
85
|
+
*/
|
|
86
|
+
const NO_MATERIAL_WRITERS = Object.freeze([]);
|
|
87
|
+
|
|
83
88
|
/**
|
|
84
89
|
* Boxes a moved window exposes at most: one an axis.
|
|
85
90
|
* @type {number}
|
|
@@ -94,9 +99,9 @@ const SCROLL_BOXES_PER_CASCADE = 3;
|
|
|
94
99
|
* @typedef {Object} BrickProviderContext
|
|
95
100
|
* @property {FrameGraph} graph
|
|
96
101
|
* @property {number} state `brick_state`'s handle: the ring's head and tail, and the free slots
|
|
97
|
-
* @property {number} take `brick_take`'s handle: the taken keys' first and count,
|
|
98
|
-
* at {@link BRICK_TAKE_CELL_DISPATCH}, a workgroup a taken cell
|
|
99
|
-
* through it.
|
|
102
|
+
* @property {number} take `brick_take`'s handle: the taken keys' first and count, the cell dispatch
|
|
103
|
+
* at {@link BRICK_TAKE_CELL_DISPATCH}, a workgroup a taken cell, and the texel dispatch at
|
|
104
|
+
* `BRICK_TAKE_TEXEL_DISPATCH`, a thread a texel of them. Bind it read-only and dispatch through it.
|
|
100
105
|
* @property {number} staging `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot. A provider
|
|
101
106
|
* that could not finish a cell sets its `BRICK_STAGING_RETRY_WORD`, and the cell is built again (§7.6, contract 7)
|
|
102
107
|
* @property {number} staging_capacity build slots the staging holds: at least the frame's taken cells
|
|
@@ -108,6 +113,9 @@ const SCROLL_BOXES_PER_CASCADE = 3;
|
|
|
108
113
|
* cell one brick of 7 voxels
|
|
109
114
|
* @property {GPUSceneContext} scene the view's scene: its database, its TLAS over the mesh rows, and
|
|
110
115
|
* its geometry caches
|
|
116
|
+
* @property {GPUBrickClipmap} clipmap the clipmap being built, whose {@link GPUBrickClipmap#write_bindings}
|
|
117
|
+
* a material writer binds the stored bricks through; a provider, which runs before the store, reads
|
|
118
|
+
* none of it
|
|
111
119
|
*/
|
|
112
120
|
|
|
113
121
|
/**
|
|
@@ -115,6 +123,16 @@ const SCROLL_BOXES_PER_CASCADE = 3;
|
|
|
115
123
|
* @property {function(FrameGraph, BrickProviderContext): void} graph_write_bricks
|
|
116
124
|
*/
|
|
117
125
|
|
|
126
|
+
/**
|
|
127
|
+
* What writes per-slot payloads of its own over the frame's taken cells once the store has put their
|
|
128
|
+
* bricks in their slots, such as their surface material (§7.6). The context's `state` is then the
|
|
129
|
+
* store's handle; a writer that records a pass replaces it with its own, so the next writer and the
|
|
130
|
+
* bricks' readers come after it. `take` holds the texel dispatch at `BRICK_TAKE_TEXEL_DISPATCH` too.
|
|
131
|
+
*
|
|
132
|
+
* @typedef {Object} BrickMaterialWriter
|
|
133
|
+
* @property {function(FrameGraph, BrickProviderContext): void} graph_write_material
|
|
134
|
+
*/
|
|
135
|
+
|
|
118
136
|
/**
|
|
119
137
|
* The world as the probe clipmap's rays see it (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7):
|
|
120
138
|
* {@link cascade_count} cascades of {@link resolution}³ cells around an anchor, a cell one brick of
|
|
@@ -126,20 +144,19 @@ const SCROLL_BOXES_PER_CASCADE = 3;
|
|
|
126
144
|
* - {@link occupancy}, `r32uint`, a texel a {@link BRICK_OCCUPANCY_BLOCK}³-cell block of storage: how many
|
|
127
145
|
* of its cells a ray must read;
|
|
128
146
|
* - {@link atlas}, `r8unorm` bricks of 8³ texels, the mesh caches' lattice and encoding, its slots
|
|
129
|
-
* handed out by a free list on the device
|
|
130
|
-
* - {@link objects}, 64 words a slot: the `meshes` row nearest in each 2³-texel cell of the brick.
|
|
147
|
+
* handed out by a free list on the device.
|
|
131
148
|
*
|
|
132
149
|
* **A frame** ({@link graph_update}): the windows are placed around the anchor, coarsest first,
|
|
133
150
|
* each child a parent cell inside its parent (`ClipmapCascadePlacement`), and what a move exposed is
|
|
134
151
|
* queued (scroll). Then the frame takes up to its budget of queued cells, clears their staging, has
|
|
135
|
-
* each provider merge its distances
|
|
152
|
+
* each provider merge its distances into it, frees what needs no brick, stores what does,
|
|
136
153
|
* and counts the occupancy of the blocks it built. Every pass after scroll is sized by take's count
|
|
137
154
|
* on the device, and scroll by the cells the moves exposed: nothing by the clipmap's size.
|
|
138
155
|
*
|
|
139
156
|
* **Capacity** (§7.10) starts at `2·N²·C` slots, a ground plane two cells thick through every
|
|
140
157
|
* cascade. A take the free slots held back is counted on the device and read back, and the next
|
|
141
|
-
* frame doubles the capacity: the atlas reserves more layers, and the
|
|
142
|
-
*
|
|
158
|
+
* frame doubles the capacity: the atlas reserves more layers, and the free list grows with a copy,
|
|
159
|
+
* the new slots pushed. Nothing shrinks.
|
|
143
160
|
*/
|
|
144
161
|
export class GPUBrickClipmap {
|
|
145
162
|
/**
|
|
@@ -183,9 +200,6 @@ export class GPUBrickClipmap {
|
|
|
183
200
|
/** @type {GPUTileAtlas3D} */
|
|
184
201
|
#atlas;
|
|
185
202
|
|
|
186
|
-
/** @type {GPUBuffer} */
|
|
187
|
-
#objects;
|
|
188
|
-
|
|
189
203
|
/** @type {GPUBuffer} */
|
|
190
204
|
#free;
|
|
191
205
|
|
|
@@ -229,7 +243,7 @@ export class GPUBrickClipmap {
|
|
|
229
243
|
/** @type {GPUBuffer} */
|
|
230
244
|
#levels;
|
|
231
245
|
|
|
232
|
-
/** Slots of the atlas
|
|
246
|
+
/** Slots of the atlas. */
|
|
233
247
|
#capacity = 0;
|
|
234
248
|
|
|
235
249
|
#ring_capacity = 0;
|
|
@@ -294,6 +308,7 @@ export class GPUBrickClipmap {
|
|
|
294
308
|
cascade_count: 0,
|
|
295
309
|
levels: null,
|
|
296
310
|
scene: null,
|
|
311
|
+
clipmap: null,
|
|
297
312
|
};
|
|
298
313
|
|
|
299
314
|
/**
|
|
@@ -367,7 +382,6 @@ export class GPUBrickClipmap {
|
|
|
367
382
|
|
|
368
383
|
this.#atlas.reserve(capacity);
|
|
369
384
|
|
|
370
|
-
this.#objects = this.#create_buffer('brick objects', 4 * BRICK_OBJECT_CELLS * capacity, GPUBufferUsage.COPY_SRC);
|
|
371
385
|
this.#free = this.#create_buffer('brick free list', 4 * capacity, GPUBufferUsage.COPY_SRC);
|
|
372
386
|
|
|
373
387
|
const keys = resolution ** 3 * cascade_count;
|
|
@@ -423,13 +437,6 @@ export class GPUBrickClipmap {
|
|
|
423
437
|
return this.#atlas;
|
|
424
438
|
}
|
|
425
439
|
|
|
426
|
-
/**
|
|
427
|
-
* @returns {GPUBuffer}
|
|
428
|
-
*/
|
|
429
|
-
get objects() {
|
|
430
|
-
return this.#objects;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
440
|
/**
|
|
434
441
|
* The cascades' windows, a {@link CLIPMAP_LEVEL_ARRAY} as a uniform, finest first: as placed by the
|
|
435
442
|
* last {@link graph_update}.
|
|
@@ -441,9 +448,8 @@ export class GPUBrickClipmap {
|
|
|
441
448
|
|
|
442
449
|
/**
|
|
443
450
|
* Put what the tracer's chunks read (`chunk_brick_clipmap_trace.js`) into a reader's bindings,
|
|
444
|
-
* under the names they take: the levels, the map, the occupancy, the atlas
|
|
445
|
-
*
|
|
446
|
-
* frame.
|
|
451
|
+
* under the names they take: the levels, the map, the occupancy, the atlas and its sampler. The atlas
|
|
452
|
+
* is replaced when the capacity grows: take it each frame.
|
|
447
453
|
*
|
|
448
454
|
* @param {Object} bindings
|
|
449
455
|
* @returns {Object} bindings
|
|
@@ -454,13 +460,12 @@ export class GPUBrickClipmap {
|
|
|
454
460
|
bindings.brick_occupancy = this.#occupancy_view;
|
|
455
461
|
bindings.brick_atlas = this.#atlas.texture.obtainView();
|
|
456
462
|
bindings.brick_sampler = MESH_SDF_SAMPLER;
|
|
457
|
-
bindings.brick_objects = this.#objects;
|
|
458
463
|
|
|
459
464
|
return bindings;
|
|
460
465
|
}
|
|
461
466
|
|
|
462
467
|
/**
|
|
463
|
-
* Slots of the atlas
|
|
468
|
+
* Slots of the atlas.
|
|
464
469
|
* @returns {number}
|
|
465
470
|
*/
|
|
466
471
|
get capacity() {
|
|
@@ -520,8 +525,9 @@ export class GPUBrickClipmap {
|
|
|
520
525
|
|
|
521
526
|
/**
|
|
522
527
|
* Record the frame's build: place the windows around the anchor and queue what they exposed, then
|
|
523
|
-
* take up to `budget` queued cells, stage them through `providers` in order,
|
|
524
|
-
* need
|
|
528
|
+
* take up to `budget` queued cells, stage them through `providers` in order, store what they
|
|
529
|
+
* need, and have `material_writers` write their payloads over the stored cells in order.
|
|
530
|
+
* Allocates nothing per frame once the staging holds the budget.
|
|
525
531
|
*
|
|
526
532
|
* @param {Object} options
|
|
527
533
|
* @param {FrameGraph} options.graph
|
|
@@ -530,13 +536,14 @@ export class GPUBrickClipmap {
|
|
|
530
536
|
* @param {number} options.z
|
|
531
537
|
* @param {number} options.budget cells built a frame at most, `brick_build_budget`
|
|
532
538
|
* @param {ArrayLike<BrickProvider>} options.providers merged into the staging in this order
|
|
539
|
+
* @param {ArrayLike<BrickMaterialWriter>} [options.material_writers] run after the store in this order
|
|
533
540
|
* @param {GPUSceneContext|null} options.scene what the providers read: the view's scene
|
|
534
541
|
* @param {number} [options.movers] the graph handle of the scene's mover list for the frame,
|
|
535
542
|
* `GPUSceneContext.graph_movers`; none queues nothing but the invalidated rows
|
|
536
543
|
* @returns {number} the graph handle of the build's last write, which a pass reading the bricks reads
|
|
537
544
|
* to come after it
|
|
538
545
|
*/
|
|
539
|
-
graph_update({ graph, x, y, z, budget, providers, scene, movers = -1 }) {
|
|
546
|
+
graph_update({ graph, x, y, z, budget, providers, material_writers = NO_MATERIAL_WRITERS, scene, movers = -1 }) {
|
|
540
547
|
assert.defined(graph, 'graph');
|
|
541
548
|
assert.isPositiveInteger(budget, 'budget');
|
|
542
549
|
assert.notOk(this.#destroyed, 'destroyed');
|
|
@@ -598,6 +605,7 @@ export class GPUBrickClipmap {
|
|
|
598
605
|
context.cascade_count = this.cascade_count;
|
|
599
606
|
context.levels = this.#levels;
|
|
600
607
|
context.scene = scene;
|
|
608
|
+
context.clipmap = this;
|
|
601
609
|
|
|
602
610
|
for (let i = 0; i < providers.length; i++) {
|
|
603
611
|
providers[i].graph_write_bricks(graph, context);
|
|
@@ -630,9 +638,17 @@ export class GPUBrickClipmap {
|
|
|
630
638
|
// a reading lost to a timeout or a lost device: the count runs on, and a later reading carries it
|
|
631
639
|
});
|
|
632
640
|
|
|
641
|
+
// the payloads written over the stored bricks, each writer after the one before it
|
|
642
|
+
context.state = store_data.state;
|
|
643
|
+
context.take = store_data.take;
|
|
644
|
+
|
|
645
|
+
for (let i = 0; i < material_writers.length; i++) {
|
|
646
|
+
material_writers[i].graph_write_material(graph, context);
|
|
647
|
+
}
|
|
648
|
+
|
|
633
649
|
this.#fresh = false;
|
|
634
650
|
|
|
635
|
-
return
|
|
651
|
+
return context.state;
|
|
636
652
|
}
|
|
637
653
|
|
|
638
654
|
/**
|
|
@@ -720,8 +736,8 @@ export class GPUBrickClipmap {
|
|
|
720
736
|
}
|
|
721
737
|
|
|
722
738
|
/**
|
|
723
|
-
* Double the capacity: the atlas reserves the slots, the
|
|
724
|
-
*
|
|
739
|
+
* Double the capacity: the atlas reserves the slots, the free list grows with a copy, and the new
|
|
740
|
+
* slots are pushed by the next frame.
|
|
725
741
|
*/
|
|
726
742
|
#grow() {
|
|
727
743
|
const old_capacity = this.#capacity;
|
|
@@ -733,7 +749,6 @@ export class GPUBrickClipmap {
|
|
|
733
749
|
|
|
734
750
|
this.#atlas.reserve(capacity);
|
|
735
751
|
|
|
736
|
-
this.#objects = this.#regrow(this.#objects, 'brick objects', 4 * BRICK_OBJECT_CELLS * capacity);
|
|
737
752
|
this.#free = this.#regrow(this.#free, 'brick free list', 4 * capacity);
|
|
738
753
|
this.#capacity = capacity;
|
|
739
754
|
this.#pushes.push(old_capacity, capacity - old_capacity);
|
|
@@ -785,7 +800,6 @@ export class GPUBrickClipmap {
|
|
|
785
800
|
b.brick_pending = this.#pending;
|
|
786
801
|
b.brick_free = this.#free;
|
|
787
802
|
b.brick_staging = resources.get(data.staging);
|
|
788
|
-
b.brick_objects = this.#objects;
|
|
789
803
|
b.brick_map = this.#brick_map_view;
|
|
790
804
|
b.brick_occupancy = this.#occupancy_view;
|
|
791
805
|
b.brick_atlas_store = this.#atlas.texture;
|
|
@@ -902,7 +916,6 @@ export class GPUBrickClipmap {
|
|
|
902
916
|
b.brick_pending = this.#pending;
|
|
903
917
|
b.brick_free = this.#free;
|
|
904
918
|
b.brick_staging = resources.get(data.staging);
|
|
905
|
-
b.brick_objects = this.#objects;
|
|
906
919
|
b.brick_map = this.#brick_map_view;
|
|
907
920
|
b.brick_occupancy = this.#occupancy_view;
|
|
908
921
|
b.brick_atlas_store = this.#atlas.texture;
|
|
@@ -999,7 +1012,7 @@ export class GPUBrickClipmap {
|
|
|
999
1012
|
this.#occupancy.destroy();
|
|
1000
1013
|
this.#atlas.destroy();
|
|
1001
1014
|
|
|
1002
|
-
for (const buffer of [this.#
|
|
1015
|
+
for (const buffer of [this.#free, this.#ring, this.#pending, this.#state, this.#take, this.#movers, this.#invalidated, this.#no_movers, this.#staging, this.#runs, this.#levels]) {
|
|
1003
1016
|
buffer?.destroy();
|
|
1004
1017
|
}
|
|
1005
1018
|
}
|
|
@@ -23,14 +23,15 @@ export const BRICK_RING_RESOURCE: ShaderResourceDescriptor;
|
|
|
23
23
|
*/
|
|
24
24
|
export const BRICK_PENDING_RESOURCE: ShaderResourceDescriptor;
|
|
25
25
|
/**
|
|
26
|
-
* The free slots of the atlas
|
|
26
|
+
* The free slots of the atlas, as a slot stack whose count is
|
|
27
27
|
* `brick_state[BRICK_STATE_FREE]`.
|
|
28
28
|
* @type {ShaderResourceDescriptor}
|
|
29
29
|
*/
|
|
30
30
|
export const BRICK_FREE_RESOURCE: ShaderResourceDescriptor;
|
|
31
31
|
/**
|
|
32
32
|
* The taken cells' staging, a build slot each of `BRICK_STAGING_WORDS` words: 512 distance bytes, four
|
|
33
|
-
* a word, then
|
|
33
|
+
* a word, the retry word, then each texel's surface row. Providers merge into it, free and
|
|
34
|
+
* store read it, and the material writers read its surfaces.
|
|
34
35
|
* @type {ShaderResourceDescriptor}
|
|
35
36
|
*/
|
|
36
37
|
export const BRICK_STAGING_RESOURCE: ShaderResourceDescriptor;
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_brick_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js"],"names":[],"mappings":"AA4BA;;;GAGG;AACH,mCAFU,wBAAwB,CAE4F;AAE9H;;;;;GAKG;AACH,kCAFU,wBAAwB,CAEuE;AAEzG;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;GAIG;AACH,qCAFU,wBAAwB,CAEgG;AAElI;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G
|
|
1
|
+
{"version":3,"file":"chunk_brick_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js"],"names":[],"mappings":"AA4BA;;;GAGG;AACH,mCAFU,wBAAwB,CAE4F;AAE9H;;;;;GAKG;AACH,kCAFU,wBAAwB,CAEuE;AAEzG;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;GAIG;AACH,qCAFU,wBAAwB,CAEgG;AAElI;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;;GAKG;AACH,qCAFU,wBAAwB,CAEmF;AAErH;;;;;;;;;;;;;;;;GAgBG;AACH,kCAFU,SAAS,CAwDhB;AAEH;;;;;;;;;;GAUG;AACH,0CAFU,SAAS,CAmBhB;AAMH;;;;;;;;;;GAUG;AACH,kDAFU,SAAS,CAYhB;yCApMsC,sDAAsD;0BADrE,uCAAuC"}
|
|
@@ -10,10 +10,9 @@ import {
|
|
|
10
10
|
BRICK_CLIPMAP_EMPTY_INSIDE,
|
|
11
11
|
BRICK_CLIPMAP_STORE_PENDING,
|
|
12
12
|
BRICK_CLIPMAP_UNKNOWN,
|
|
13
|
-
BRICK_OBJECT_CELLS,
|
|
14
|
-
BRICK_OBJECT_CELLS_PER_AXIS,
|
|
15
13
|
BRICK_STAGING_DISTANCE_WORDS,
|
|
16
14
|
BRICK_STAGING_RETRY_WORD,
|
|
15
|
+
BRICK_STAGING_SURFACE_WORDS,
|
|
17
16
|
BRICK_STAGING_WORDS,
|
|
18
17
|
BRICK_STATE_FREE,
|
|
19
18
|
BRICK_STATE_HEAD,
|
|
@@ -22,6 +21,7 @@ import {
|
|
|
22
21
|
BRICK_TAKE_CELL_DISPATCH,
|
|
23
22
|
BRICK_TAKE_COUNT,
|
|
24
23
|
BRICK_TAKE_FIRST,
|
|
24
|
+
BRICK_TAKE_TEXEL_DISPATCH,
|
|
25
25
|
BRICK_TAKE_WORD_DISPATCH,
|
|
26
26
|
BRICK_THREAD_WORKGROUP_SIZE
|
|
27
27
|
} from "./BRICK_CLIPMAP.js";
|
|
@@ -55,7 +55,7 @@ export const BRICK_RING_RESOURCE = ShaderResourceDescriptor.storageBuffer("brick
|
|
|
55
55
|
export const BRICK_PENDING_RESOURCE = ShaderResourceDescriptor.storageBuffer("brick_pending", WebGPUArray.from(atomic_u32), true);
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* The free slots of the atlas
|
|
58
|
+
* The free slots of the atlas, as a slot stack whose count is
|
|
59
59
|
* `brick_state[BRICK_STATE_FREE]`.
|
|
60
60
|
* @type {ShaderResourceDescriptor}
|
|
61
61
|
*/
|
|
@@ -63,7 +63,8 @@ export const BRICK_FREE_RESOURCE = ShaderResourceDescriptor.storageBuffer("brick
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* The taken cells' staging, a build slot each of `BRICK_STAGING_WORDS` words: 512 distance bytes, four
|
|
66
|
-
* a word, then
|
|
66
|
+
* a word, the retry word, then each texel's surface row. Providers merge into it, free and
|
|
67
|
+
* store read it, and the material writers read its surfaces.
|
|
67
68
|
* @type {ShaderResourceDescriptor}
|
|
68
69
|
*/
|
|
69
70
|
export const BRICK_STAGING_RESOURCE = ShaderResourceDescriptor.storageBuffer("brick_staging", WebGPUArray.u32, true);
|
|
@@ -94,10 +95,9 @@ const BRICK_CLIPMAP_EMPTY_INSIDE = ${BRICK_CLIPMAP_EMPTY_INSIDE}u;
|
|
|
94
95
|
const BRICK_CLIPMAP_STORE_PENDING = ${BRICK_CLIPMAP_STORE_PENDING}u;
|
|
95
96
|
const BRICK_CLIPMAP_BAND_VOXELS = ${MESH_SDF_BAND_VOXELS}.0;
|
|
96
97
|
|
|
97
|
-
const BRICK_OBJECT_CELLS = ${BRICK_OBJECT_CELLS}u;
|
|
98
|
-
const BRICK_OBJECT_CELLS_PER_AXIS = ${BRICK_OBJECT_CELLS_PER_AXIS}u;
|
|
99
98
|
const BRICK_STAGING_DISTANCE_WORDS = ${BRICK_STAGING_DISTANCE_WORDS}u;
|
|
100
99
|
const BRICK_STAGING_RETRY_WORD = ${BRICK_STAGING_RETRY_WORD}u;
|
|
100
|
+
const BRICK_STAGING_SURFACE_WORDS = ${BRICK_STAGING_SURFACE_WORDS}u;
|
|
101
101
|
const BRICK_STAGING_WORDS = ${BRICK_STAGING_WORDS}u;
|
|
102
102
|
const BRICK_CELL_WORKGROUP_SIZE = ${BRICK_CELL_WORKGROUP_SIZE}u;
|
|
103
103
|
const BRICK_THREAD_WORKGROUP_SIZE = ${BRICK_THREAD_WORKGROUP_SIZE}u;
|
|
@@ -109,6 +109,7 @@ const BRICK_STATE_STARVED = ${BRICK_STATE_STARVED}u;
|
|
|
109
109
|
|
|
110
110
|
const BRICK_TAKE_CELL_DISPATCH = ${BRICK_TAKE_CELL_DISPATCH}u;
|
|
111
111
|
const BRICK_TAKE_WORD_DISPATCH = ${BRICK_TAKE_WORD_DISPATCH}u;
|
|
112
|
+
const BRICK_TAKE_TEXEL_DISPATCH = ${BRICK_TAKE_TEXEL_DISPATCH}u;
|
|
112
113
|
const BRICK_TAKE_FIRST = ${BRICK_TAKE_FIRST}u;
|
|
113
114
|
const BRICK_TAKE_COUNT = ${BRICK_TAKE_COUNT}u;
|
|
114
115
|
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts
CHANGED
|
@@ -10,6 +10,12 @@ export const BRICK_TRACE_STEPS: number;
|
|
|
10
10
|
* @type {number}
|
|
11
11
|
*/
|
|
12
12
|
export const BRICK_TRACE_NUDGE: number;
|
|
13
|
+
/**
|
|
14
|
+
* The distance under which the march stands on a surface, in voxels of its cascade: UE's half voxel
|
|
15
|
+
* (§7.9). A hit is reported from anywhere between the surface and this far out.
|
|
16
|
+
* @type {number}
|
|
17
|
+
*/
|
|
18
|
+
export const BRICK_TRACE_HIT_VOXELS: number;
|
|
13
19
|
/**
|
|
14
20
|
* The brick map as the tracer reads it: an entry a cell, the cascades stacked along z.
|
|
15
21
|
* @type {ShaderResourceDescriptor}
|
|
@@ -36,15 +42,11 @@ export const BRICK_SAMPLER_RESOURCE: ShaderResourceDescriptor;
|
|
|
36
42
|
*/
|
|
37
43
|
export const BRICK_LEVELS_RESOURCE: ShaderResourceDescriptor;
|
|
38
44
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @type {ShaderResourceDescriptor}
|
|
41
|
-
*/
|
|
42
|
-
export const BRICK_OBJECTS_RESOURCE: ShaderResourceDescriptor;
|
|
43
|
-
/**
|
|
44
|
-
* A brick's distance at a point of its cell, and the field's gradient there.
|
|
45
|
+
* A brick's distance at a point of its cell, where its slot sits in the atlas, and the field's gradient.
|
|
45
46
|
*
|
|
46
47
|
* ```wgsl
|
|
47
48
|
* fn brick_clipmap_sample(slot: u32, local: vec3<f32>, voxel: f32) -> f32 // local in voxels from the cell's corner
|
|
49
|
+
* fn brick_clipmap_slot_texel(slot: u32) -> vec3<u32> // the slot's texel 0 in the atlas
|
|
48
50
|
* fn brick_clipmap_normal(slot: u32, local: vec3<f32>) -> vec3<f32> // out of the solid, unit length
|
|
49
51
|
* ```
|
|
50
52
|
*
|
|
@@ -142,22 +144,6 @@ export const chunk_brick_clipmap_distance: CodeChunk;
|
|
|
142
144
|
* @type {CodeChunk}
|
|
143
145
|
*/
|
|
144
146
|
export const chunk_brick_clipmap_gradient: CodeChunk;
|
|
145
|
-
/**
|
|
146
|
-
* The `meshes` row whose surface a hit is on (§7.9), 0 for none.
|
|
147
|
-
*
|
|
148
|
-
* ```wgsl
|
|
149
|
-
* fn brick_clipmap_object(hit: BrickClipmapHit) -> u32
|
|
150
|
-
* ```
|
|
151
|
-
*
|
|
152
|
-
* The object cell of the texel nearest the hit moved half a voxel along the normal, onto the ray's
|
|
153
|
-
* side: of a wall thinner than a voxel, whose two faces are in neighbouring object cells, it picks
|
|
154
|
-
* the face the ray hit, as UE's object lookup does. A front face's normal is against the ray, and a
|
|
155
|
-
* back face is counted, never shaded (§8.4), so the move is along the normal. A hit inside a solid
|
|
156
|
-
* has no face: none.
|
|
157
|
-
*
|
|
158
|
-
* @type {CodeChunk}
|
|
159
|
-
*/
|
|
160
|
-
export const chunk_brick_clipmap_object: CodeChunk;
|
|
161
147
|
import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
|
|
162
148
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
163
149
|
//# sourceMappingURL=chunk_brick_clipmap_trace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,gCAFU,MAAM,CAEwB;AAExC;;;;GAIG;AACH,qCAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,yCAFU,wBAAwB,CAEoE;AAEtG;;;GAGG;AACH,+CAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;;;;;;;;;;;;GAcG;AACH,yCAFU,SAAS,CAyCZ;AAKP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAyBZ;AAIP;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wCAFU,SAAS,CAgFZ;AAKP;;;;;;;;;;;;;;;;;;GAkBG;AACH,wCAFU,SAAS,CAoGZ;AAEP;;;;;;;;;;;;GAYG;AACH,2CAFU,SAAS,CAsCZ;AAIP;;;;;;;;;;;;;;GAcG;AACH,2CAFU,SAAS,CA0BZ;yCA7dkC,sDAAsD;0BADrE,uCAAuC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js
CHANGED
|
@@ -11,8 +11,6 @@ import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourc
|
|
|
11
11
|
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
12
12
|
import { chunk_tile_atlas_slot_origin } from "../../../texture/atlas/chunk_tile_atlas_slot_origin.js";
|
|
13
13
|
import {
|
|
14
|
-
BRICK_OBJECT_CELLS,
|
|
15
|
-
BRICK_OBJECT_CELLS_PER_AXIS,
|
|
16
14
|
BRICK_OCCUPANCY_BLOCK,
|
|
17
15
|
BRICK_TRACE_HIT,
|
|
18
16
|
BRICK_TRACE_MISS,
|
|
@@ -34,6 +32,13 @@ export const BRICK_TRACE_STEPS = 64;
|
|
|
34
32
|
*/
|
|
35
33
|
export const BRICK_TRACE_NUDGE = 1 / 64;
|
|
36
34
|
|
|
35
|
+
/**
|
|
36
|
+
* The distance under which the march stands on a surface, in voxels of its cascade: UE's half voxel
|
|
37
|
+
* (§7.9). A hit is reported from anywhere between the surface and this far out.
|
|
38
|
+
* @type {number}
|
|
39
|
+
*/
|
|
40
|
+
export const BRICK_TRACE_HIT_VOXELS = 0.5;
|
|
41
|
+
|
|
37
42
|
/**
|
|
38
43
|
* The brick map as the tracer reads it: an entry a cell, the cascades stacked along z.
|
|
39
44
|
* @type {ShaderResourceDescriptor}
|
|
@@ -65,16 +70,11 @@ export const BRICK_SAMPLER_RESOURCE = ShaderResourceDescriptor.sampler("brick_sa
|
|
|
65
70
|
export const BRICK_LEVELS_RESOURCE = ShaderResourceDescriptor.uniform("brick_levels", CLIPMAP_LEVEL_ARRAY);
|
|
66
71
|
|
|
67
72
|
/**
|
|
68
|
-
*
|
|
69
|
-
* @type {ShaderResourceDescriptor}
|
|
70
|
-
*/
|
|
71
|
-
export const BRICK_OBJECTS_RESOURCE = ShaderResourceDescriptor.storageBuffer("brick_objects", WebGPUArray.u32);
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* A brick's distance at a point of its cell, and the field's gradient there.
|
|
73
|
+
* A brick's distance at a point of its cell, where its slot sits in the atlas, and the field's gradient.
|
|
75
74
|
*
|
|
76
75
|
* ```wgsl
|
|
77
76
|
* fn brick_clipmap_sample(slot: u32, local: vec3<f32>, voxel: f32) -> f32 // local in voxels from the cell's corner
|
|
77
|
+
* fn brick_clipmap_slot_texel(slot: u32) -> vec3<u32> // the slot's texel 0 in the atlas
|
|
78
78
|
* fn brick_clipmap_normal(slot: u32, local: vec3<f32>) -> vec3<f32> // out of the solid, unit length
|
|
79
79
|
* ```
|
|
80
80
|
*
|
|
@@ -87,10 +87,13 @@ export const BRICK_OBJECTS_RESOURCE = ShaderResourceDescriptor.storageBuffer("br
|
|
|
87
87
|
export const chunk_brick_clipmap_sample = CodeChunk.from(
|
|
88
88
|
//language=WGSL
|
|
89
89
|
`
|
|
90
|
+
fn brick_clipmap_slot_texel(slot: u32) -> vec3<u32> {
|
|
91
|
+
return tile_atlas_slot_origin(slot, textureDimensions(brick_atlas, 0).xy / ${MESH_SDF_BRICK_TEXELS}u, vec3<u32>(${MESH_SDF_BRICK_TEXELS}u));
|
|
92
|
+
}
|
|
93
|
+
|
|
90
94
|
fn brick_clipmap_tap(slot: u32, local: vec3<f32>) -> f32 {
|
|
91
95
|
let atlas_size = textureDimensions(brick_atlas, 0);
|
|
92
|
-
let
|
|
93
|
-
let uvw = (vec3<f32>(corner) + 0.5 + clamp(local, vec3<f32>(0.0), vec3<f32>(${MESH_SDF_BRICK_VOXELS}.0))) / vec3<f32>(atlas_size);
|
|
96
|
+
let uvw = (vec3<f32>(brick_clipmap_slot_texel(slot)) + 0.5 + clamp(local, vec3<f32>(0.0), vec3<f32>(${MESH_SDF_BRICK_VOXELS}.0))) / vec3<f32>(atlas_size);
|
|
94
97
|
|
|
95
98
|
return textureSampleLevel(brick_atlas, brick_sampler, uvw, 0.0).r;
|
|
96
99
|
}
|
|
@@ -360,7 +363,7 @@ fn brick_clipmap_trace(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_ma
|
|
|
360
363
|
let local = (march.position - march.cell_min) / march.voxel;
|
|
361
364
|
let distance = brick_clipmap_sample(march.entry, local, march.voxel);
|
|
362
365
|
|
|
363
|
-
if (distance <
|
|
366
|
+
if (distance < ${BRICK_TRACE_HIT_VOXELS} * march.voxel) {
|
|
364
367
|
hit.kind = BRICK_TRACE_HIT;
|
|
365
368
|
hit.t = march.t;
|
|
366
369
|
hit.cascade = march.cascade;
|
|
@@ -482,42 +485,3 @@ fn brick_clipmap_gradient(position: vec3<f32>, cascade_count: u32) -> vec3<f32>
|
|
|
482
485
|
chunk_brick_clipmap_window,
|
|
483
486
|
chunk_brick_clipmap_distance,
|
|
484
487
|
]);
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* The `meshes` row whose surface a hit is on (§7.9), 0 for none.
|
|
488
|
-
*
|
|
489
|
-
* ```wgsl
|
|
490
|
-
* fn brick_clipmap_object(hit: BrickClipmapHit) -> u32
|
|
491
|
-
* ```
|
|
492
|
-
*
|
|
493
|
-
* The object cell of the texel nearest the hit moved half a voxel along the normal, onto the ray's
|
|
494
|
-
* side: of a wall thinner than a voxel, whose two faces are in neighbouring object cells, it picks
|
|
495
|
-
* the face the ray hit, as UE's object lookup does. A front face's normal is against the ray, and a
|
|
496
|
-
* back face is counted, never shaded (§8.4), so the move is along the normal. A hit inside a solid
|
|
497
|
-
* has no face: none.
|
|
498
|
-
*
|
|
499
|
-
* @type {CodeChunk}
|
|
500
|
-
*/
|
|
501
|
-
export const chunk_brick_clipmap_object = CodeChunk.from(
|
|
502
|
-
//language=WGSL
|
|
503
|
-
`
|
|
504
|
-
fn brick_clipmap_object(hit: BrickClipmapHit) -> u32 {
|
|
505
|
-
if (hit.kind != BRICK_TRACE_HIT || !brick_clipmap_entry_holds_slot(hit.slot)) {
|
|
506
|
-
return 0u;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
let voxel = brick_levels[hit.cascade].cell_size / ${MESH_SDF_BRICK_VOXELS}.0;
|
|
510
|
-
|
|
511
|
-
let local = (hit.position + 0.5 * voxel * hit.normal - hit.cell_min) / voxel;
|
|
512
|
-
let texel = vec3<u32>(clamp(round(local), vec3<f32>(0.0), vec3<f32>(${MESH_SDF_BRICK_VOXELS}.0)));
|
|
513
|
-
let cell = min(texel / 2u, vec3<u32>(${BRICK_OBJECT_CELLS_PER_AXIS - 1}u));
|
|
514
|
-
|
|
515
|
-
return brick_objects[hit.slot * ${BRICK_OBJECT_CELLS}u + cell.x + ${BRICK_OBJECT_CELLS_PER_AXIS}u * (cell.y + ${BRICK_OBJECT_CELLS_PER_AXIS}u * cell.z)];
|
|
516
|
-
}
|
|
517
|
-
`, [
|
|
518
|
-
chunk_brick_clipmap,
|
|
519
|
-
chunk_brick_clipmap_trace,
|
|
520
|
-
]);
|
|
521
|
-
|
|
522
|
-
chunk_brick_clipmap_object.requireResource(BRICK_OBJECTS_RESOURCE);
|
|
523
|
-
chunk_brick_clipmap_object.requireResource(BRICK_LEVELS_RESOURCE);
|
|
@@ -38,11 +38,6 @@ export const MESH_BRICK_ROUNDS: number;
|
|
|
38
38
|
* @type {number}
|
|
39
39
|
*/
|
|
40
40
|
export const MESH_BRICK_ROUND_LIMIT: number;
|
|
41
|
-
/**
|
|
42
|
-
* The first of a build slot's object words.
|
|
43
|
-
* @type {number}
|
|
44
|
-
*/
|
|
45
|
-
export const MESH_BRICK_ACCUMULATOR_OBJECTS: number;
|
|
46
41
|
/**
|
|
47
42
|
* The word of the cell's flags for the frame, {@link MESH_BRICK_FLAG_TOUCHED} and
|
|
48
43
|
* {@link MESH_BRICK_FLAG_UNFINISHED}. The walk that sets the first of them lists the cell for the
|
|
@@ -56,7 +51,7 @@ export const MESH_BRICK_ACCUMULATOR_FLAGS: number;
|
|
|
56
51
|
*/
|
|
57
52
|
export const MESH_BRICK_ACCUMULATOR_WORDS: number;
|
|
58
53
|
/**
|
|
59
|
-
* A batch of the cell was made: the resolve merges its texel
|
|
54
|
+
* A batch of the cell was made: the resolve merges its texel words.
|
|
60
55
|
* @type {number}
|
|
61
56
|
*/
|
|
62
57
|
export const MESH_BRICK_FLAG_TOUCHED: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MESH_BRICK.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,+BAFU,MAAM,CAE0C;AAE1D;;;;;;;;;;;GAWG;AACH,kCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,6CAFU,MAAM,CAEgC;AAEhD;;;GAGG;AACH,sCAFU,MAAM,CAEyE;AAEzF;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;;;GAKG;AACH,qCAFU,MAAM,CAEiI;
|
|
1
|
+
{"version":3,"file":"MESH_BRICK.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,+BAFU,MAAM,CAE0C;AAE1D;;;;;;;;;;;GAWG;AACH,kCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,6CAFU,MAAM,CAEgC;AAEhD;;;GAGG;AACH,sCAFU,MAAM,CAEyE;AAEzF;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;;;GAKG;AACH,qCAFU,MAAM,CAEiI;AASjJ;;;;;GAKG;AACH,2CAFU,MAAM,CAEuD;AAEvE;;;GAGG;AACH,2CAFU,MAAM,CAE6D;AAE7E;;;GAGG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;;;GAKG;AACH,yCAFU,MAAM,CAE4B;AAO5C;;;GAGG;AACH,2CAFU,MAAM,CAE8B;AAE9C;;;GAGG;AACH,mDAFU,MAAM,CAEsC;AAEtD;;;GAGG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,gDAFU,MAAM,CAEmC;AAEnD;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,iDAFU,MAAM,CAEoC;AAEpD;;;GAGG;AACH,yCAFU,MAAM,CAE6B;AAE7C;;;GAGG;AACH,yCAFU,MAAM,CAEqD;AAErE;;;;GAIG;AACH,uCAFU,MAAM,CAEuD;AAEvE;;;GAGG;AACH,8CAFU,MAAM,CAE4D;AAE5E;;;GAGG;AACH,8CAFU,MAAM,CAEmE;AAEnF;;;GAGG;AACH,0CAFU,MAAM,CAE+D;AAE/E;;;GAGG;AACH,gDAFU,MAAM,CAEiE;AAEjF;;;GAGG;AACH,uCAFU,MAAM,CAE8D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MESH_SDF_BRICK_TEXEL_COUNT } from "../../../../geometry/sdf/MESH_SDF.js";
|
|
2
|
-
import { BRICK_CELL_WORKGROUP_SIZE
|
|
2
|
+
import { BRICK_CELL_WORKGROUP_SIZE } from "../BRICK_CLIPMAP.js";
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
The mesh provider's device state (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.7, as S9 built it).
|
|
@@ -63,26 +63,19 @@ export const MESH_BRICK_ROUNDS = 2;
|
|
|
63
63
|
export const MESH_BRICK_ROUND_LIMIT = 1 + Math.ceil(Math.log2((1 << 20) / MESH_BRICK_BATCH) / Math.log2(MESH_BRICK_FRONTIER / MESH_BRICK_BATCH));
|
|
64
64
|
|
|
65
65
|
/*
|
|
66
|
-
A build slot's accumulators, MESH_BRICK_ACCUMULATOR_WORDS words: a word a texel holding
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
when nothing reached it, so a buffer the device has zeroed starts empty, and the resolve leaves each
|
|
66
|
+
A build slot's accumulators, MESH_BRICK_ACCUMULATOR_WORDS words: a word a texel holding the largest
|
|
67
|
+
key the batches bid there (`brick_object_key`), its least byte and the row that gave it, then the
|
|
68
|
+
cell's flags for the frame. A texel word is 0 when nothing reached it, so a buffer the device has zeroed starts empty, and the resolve leaves each
|
|
70
69
|
one it merges at 0 for the next frame; the cell's walk from the root clears the flags.
|
|
71
70
|
*/
|
|
72
71
|
|
|
73
|
-
/**
|
|
74
|
-
* The first of a build slot's object words.
|
|
75
|
-
* @type {number}
|
|
76
|
-
*/
|
|
77
|
-
export const MESH_BRICK_ACCUMULATOR_OBJECTS = MESH_SDF_BRICK_TEXEL_COUNT;
|
|
78
|
-
|
|
79
72
|
/**
|
|
80
73
|
* The word of the cell's flags for the frame, {@link MESH_BRICK_FLAG_TOUCHED} and
|
|
81
74
|
* {@link MESH_BRICK_FLAG_UNFINISHED}. The walk that sets the first of them lists the cell for the
|
|
82
75
|
* resolve: most taken cells set none, and the resolve never reads them.
|
|
83
76
|
* @type {number}
|
|
84
77
|
*/
|
|
85
|
-
export const MESH_BRICK_ACCUMULATOR_FLAGS =
|
|
78
|
+
export const MESH_BRICK_ACCUMULATOR_FLAGS = MESH_SDF_BRICK_TEXEL_COUNT;
|
|
86
79
|
|
|
87
80
|
/**
|
|
88
81
|
* Words of a build slot's accumulators.
|
|
@@ -91,7 +84,7 @@ export const MESH_BRICK_ACCUMULATOR_FLAGS = MESH_BRICK_ACCUMULATOR_OBJECTS + BRI
|
|
|
91
84
|
export const MESH_BRICK_ACCUMULATOR_WORDS = MESH_BRICK_ACCUMULATOR_FLAGS + 1;
|
|
92
85
|
|
|
93
86
|
/**
|
|
94
|
-
* A batch of the cell was made: the resolve merges its texel
|
|
87
|
+
* A batch of the cell was made: the resolve merges its texel words.
|
|
95
88
|
* @type {number}
|
|
96
89
|
*/
|
|
97
90
|
export const MESH_BRICK_FLAG_TOUCHED = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_mesh_brick_walk.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_mesh_brick_walk.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,oCAFU,SAAS,CAmChB;0BAjEuB,0CAA0C"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js
CHANGED
|
@@ -2,7 +2,6 @@ import { chunk_divide_round_up_u32 } from "../../../../shader/chunk/math/chunk_d
|
|
|
2
2
|
import { CodeChunk } from "../../../../shader/compiler/CodeChunk.js";
|
|
3
3
|
import {
|
|
4
4
|
MESH_BRICK_ACCUMULATOR_FLAGS,
|
|
5
|
-
MESH_BRICK_ACCUMULATOR_OBJECTS,
|
|
6
5
|
MESH_BRICK_ACCUMULATOR_WORDS,
|
|
7
6
|
MESH_BRICK_BATCH,
|
|
8
7
|
MESH_BRICK_FLAG_TOUCHED,
|
|
@@ -39,7 +38,6 @@ const MESH_BRICK_BATCH = ${MESH_BRICK_BATCH}u;
|
|
|
39
38
|
const MESH_BRICK_FRONTIER = ${MESH_BRICK_FRONTIER}u;
|
|
40
39
|
const MESH_BRICK_RECORD_HEADER_WORDS = ${MESH_BRICK_RECORD_HEADER_WORDS}u;
|
|
41
40
|
const MESH_BRICK_RECORD_WORDS = ${MESH_BRICK_RECORD_WORDS}u;
|
|
42
|
-
const MESH_BRICK_ACCUMULATOR_OBJECTS = ${MESH_BRICK_ACCUMULATOR_OBJECTS}u;
|
|
43
41
|
const MESH_BRICK_ACCUMULATOR_FLAGS = ${MESH_BRICK_ACCUMULATOR_FLAGS}u;
|
|
44
42
|
const MESH_BRICK_ACCUMULATOR_WORDS = ${MESH_BRICK_ACCUMULATOR_WORDS}u;
|
|
45
43
|
const MESH_BRICK_FLAG_TOUCHED = ${MESH_BRICK_FLAG_TOUCHED}u;
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts
CHANGED
|
@@ -9,10 +9,10 @@ export const MESH_BRICK_BATCH_SETTINGS: WebGPUStruct;
|
|
|
9
9
|
* Its up to {@link MESH_BRICK_BATCH} rows, sorted ascending (a bitonic network, a lane a pair), become
|
|
10
10
|
* instances in workgroup memory, a lane each (`mesh_brick_instance`), and its cell's 512 texels are
|
|
11
11
|
* sampled over them in that order, eight a lane
|
|
12
|
-
* (`mesh_brick_texel`: the least distance and its row, the box test first). Each texel's
|
|
13
|
-
* the cell's accumulators by an atomic maximum
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* (`mesh_brick_texel`: the least distance and its row, the box test first). Each texel's key, its byte
|
|
13
|
+
* and its row (`brick_object_key`), goes into the cell's accumulators by an atomic maximum: the least byte
|
|
14
|
+
* and the nearest row over every batch of the cell, whatever order the batches ran in. The staging is the
|
|
15
|
+
* resolve's to write.
|
|
16
16
|
*
|
|
17
17
|
* The order is what keeps a cell of up to {@link MESH_BRICK_BATCH} rows, one batch, the same however the walk
|
|
18
18
|
* found its rows: the box test is exact only where an instance's field is not negative outside its box,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_mesh_brick_batch.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js"],"names":[],"mappings":"AAyBA;;GAEG;AACH,wCAFU,YAAY,CAOO;
|
|
1
|
+
{"version":3,"file":"shader_mesh_brick_batch.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js"],"names":[],"mappings":"AAyBA;;GAEG;AACH,wCAFU,YAAY,CAOO;AA8H7B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,sCAFU,aAAa,CAMpB;6BA1K0B,yCAAyC;8BAJxC,qCAAqC"}
|