@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
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MESH_CARD_ALBEDO_RESOURCE,
|
|
3
|
-
MESH_CARD_EMISSIVE_RESOURCE,
|
|
4
|
-
MESH_CARD_ROWS_RESOURCE,
|
|
5
|
-
MESH_CARD_SETS_RESOURCE
|
|
6
|
-
} from "../../../geometry/sdf/cards/MESH_CARD_RESOURCES.js";
|
|
7
|
-
import { MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
8
|
-
import { MESH_SDF_HEADERS_RESOURCE, MESH_SDF_INDIRECTION_RESOURCE } from "../../../geometry/sdf/MESH_SDF_RESOURCES.js";
|
|
9
1
|
import { ENVIRONMENT_MAP_SAMPLER_RESOURCE } from "../../../light/environment/ENVIRONMENT_MAP_SAMPLER_RESOURCE.js";
|
|
10
|
-
import { SCENE_DATABASE_RESOURCE } from "../../../scene/SCENE_DATABASE_RESOURCE.js";
|
|
11
2
|
import { chunk_rgbe9995_decode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.js";
|
|
12
3
|
import { chunk_rgbe9995_encode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_encode.js";
|
|
13
4
|
import {
|
|
@@ -15,12 +6,20 @@ import {
|
|
|
15
6
|
} from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
|
|
16
7
|
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
17
8
|
import { RECIPROCAL_PI_DECLARATION } from "../../../shader/chunk/math/RECIPROCAL_PI_DECLARATION.js";
|
|
9
|
+
import { chunk_hash_to_float01 } from "../../../shader/chunk/random/chunk_hash_to_float01.js";
|
|
10
|
+
import { chunk_pcg4d } from "../../../shader/chunk/random/pcg/chunk_pcg4d.js";
|
|
18
11
|
import { chunk_sample_environment_map } from "../../../shader/chunk/texture/sample/chunk_sample_environment_map.js";
|
|
19
12
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
20
13
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
21
14
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
22
15
|
import { BRICK_TRACE_HIT, BRICK_TRACE_MISS } from "../brick/BRICK_CLIPMAP.js";
|
|
23
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
BRICK_ATLAS_TEXTURE_RESOURCE,
|
|
18
|
+
BRICK_LEVELS_RESOURCE,
|
|
19
|
+
BRICK_MAP_TEXTURE_RESOURCE,
|
|
20
|
+
BRICK_SAMPLER_RESOURCE
|
|
21
|
+
} from "../brick/chunk_brick_clipmap_trace.js";
|
|
22
|
+
import { BRICK_MATERIAL_ALBEDO_RESOURCE, BRICK_MATERIAL_EMISSIVE_RESOURCE } from "../material/chunk_brick_material.js";
|
|
24
23
|
import {
|
|
25
24
|
chunk_probe_clipmap,
|
|
26
25
|
chunk_probe_clipmap_ray_origin,
|
|
@@ -28,7 +27,7 @@ import {
|
|
|
28
27
|
PROBE_RAYS_WRITE_RESOURCE,
|
|
29
28
|
PROBE_TRACE_READ_RESOURCE
|
|
30
29
|
} from "./chunk_probe_clipmap.js";
|
|
31
|
-
import {
|
|
30
|
+
import { chunk_probe_clipmap_hit_material_pick } from "./chunk_probe_clipmap_hit_material.js";
|
|
32
31
|
import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
|
|
33
32
|
import { PROBE_TRACE_SETTINGS } from "./shader_probe_clipmap_trace.js";
|
|
34
33
|
|
|
@@ -44,14 +43,13 @@ resources.createGroup()
|
|
|
44
43
|
.addTexture("tEnvironment", "float", "2d")
|
|
45
44
|
.add(ENVIRONMENT_MAP_SAMPLER_RESOURCE);
|
|
46
45
|
|
|
46
|
+
// what the brick material's read takes
|
|
47
47
|
resources.createGroup()
|
|
48
|
-
.add(
|
|
49
|
-
.add(
|
|
50
|
-
.add(
|
|
51
|
-
.add(
|
|
52
|
-
.add(
|
|
53
|
-
.add(MESH_CARD_ALBEDO_RESOURCE)
|
|
54
|
-
.add(MESH_CARD_EMISSIVE_RESOURCE);
|
|
48
|
+
.add(BRICK_MAP_TEXTURE_RESOURCE)
|
|
49
|
+
.add(BRICK_ATLAS_TEXTURE_RESOURCE)
|
|
50
|
+
.add(BRICK_SAMPLER_RESOURCE)
|
|
51
|
+
.add(BRICK_MATERIAL_ALBEDO_RESOURCE)
|
|
52
|
+
.add(BRICK_MATERIAL_EMISSIVE_RESOURCE);
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* Shade (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7): a thread a ray of the frame's updates, dispatched
|
|
@@ -65,13 +63,16 @@ resources.createGroup()
|
|
|
65
63
|
* 4πm²·(1 − (1 − e^(−k))/k), k = 2/m²: m = 1/n_r to 0.2% at n_r = 16, so the roughness is 1/√n_r. A sun
|
|
66
64
|
* a few texels wide at level 0 is then a lobe a texel wide, which a texel's jittered rays all see,
|
|
67
65
|
* rather than a point that only some probes' jitter ever lands on;
|
|
68
|
-
* - a **front-face hit** is `emissive + ρ_d·E_dir/π` (D7), its surface from
|
|
69
|
-
* at the hit's position, the probe's origin plus t along the ray,
|
|
70
|
-
*
|
|
66
|
+
* - a **front-face hit** is `emissive + ρ_d·E_dir/π` (D7), its surface from
|
|
67
|
+
* `probe_clipmap_hit_material_pick` at the hit's position, the probe's origin plus t along the ray,
|
|
68
|
+
* with the hit's normal, in its cascade: one texel of the brick material there, drawn from the ray's
|
|
69
|
+
* slot and direction, fresh every update and apart from the light pass's draws, in proportion to its
|
|
70
|
+
* weight in the texels' blend, which the probe's blend of its rays so takes on average; E_dir is what
|
|
71
|
+
* trace left in the light;
|
|
71
72
|
* - an **unresolved** ray and a **back face** bring nothing back: accumulation discards the one and
|
|
72
73
|
* counts the other (§8.4, §8.8).
|
|
73
74
|
*
|
|
74
|
-
* A front-face hit's diffuse albedo goes
|
|
75
|
+
* A front-face hit's diffuse albedo goes into its `albedo`, `pack4x8unorm`, and every other ray's to
|
|
75
76
|
* zero: the light pass adds ρ_d·(E_loc + E_ind)/π after it (S5).
|
|
76
77
|
*
|
|
77
78
|
* @type {ComputeShader}
|
|
@@ -106,9 +107,10 @@ fn main(
|
|
|
106
107
|
let origin = probe_clipmap_ray_origin(probe_origins[k], probe_trace.elements[k], record.direction);
|
|
107
108
|
let position = origin + record.t * direction;
|
|
108
109
|
let normal = uv_octahedral_unit_decode(unpack2x16unorm(record.normal));
|
|
109
|
-
let
|
|
110
|
+
let cascade = (record.flags >> PROBE_RAY_CASCADE_SHIFT) & PROBE_RAY_CASCADE_MASK;
|
|
110
111
|
|
|
111
|
-
let
|
|
112
|
+
let draw = hash_to_float01(pcg4d(vec4<u32>(probe_trace.elements[k], record.direction, 0x510E527Fu, 0u)).x);
|
|
113
|
+
let surface = probe_clipmap_hit_material_pick(position, normal, cascade, draw);
|
|
112
114
|
let direct = rgbe9995_decode(record.light);
|
|
113
115
|
|
|
114
116
|
radiance = surface.emissive + surface.albedo * direct * RECIPROCAL_PI;
|
|
@@ -118,7 +120,7 @@ fn main(
|
|
|
118
120
|
// held to RGB9E5's largest value, which the half-float atlas also holds: an infinity there times a
|
|
119
121
|
// zero weight would be a NaN in every sum it reaches
|
|
120
122
|
probe_rays[ray].light = rgbe9995_encode(radiance);
|
|
121
|
-
probe_rays[ray].
|
|
123
|
+
probe_rays[ray].albedo = pack4x8unorm(vec4<f32>(albedo, 0.0));
|
|
122
124
|
}
|
|
123
125
|
`, [
|
|
124
126
|
chunk_probe_clipmap,
|
|
@@ -126,7 +128,9 @@ fn main(
|
|
|
126
128
|
chunk_folded_workgroup_index,
|
|
127
129
|
chunk_uv_octahedral_unit_decode,
|
|
128
130
|
chunk_sample_environment_map,
|
|
129
|
-
|
|
131
|
+
chunk_probe_clipmap_hit_material_pick,
|
|
132
|
+
chunk_pcg4d,
|
|
133
|
+
chunk_hash_to_float01,
|
|
130
134
|
chunk_rgbe9995_decode,
|
|
131
135
|
chunk_rgbe9995_encode,
|
|
132
136
|
RECIPROCAL_PI_DECLARATION,
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ export const PROBE_TRACE_SETTINGS: WebGPUStruct;
|
|
|
12
12
|
* or a spread subset below R = n_r². On a guided one, the walk position whose rays the ray is among
|
|
13
13
|
* in the probe's guide (`chunk_probe_clipmap_guide`), found by bisecting the first rays. A texel's rays
|
|
14
14
|
* then follow one another, in the walk's order.
|
|
15
|
-
* - **Direction**: the texel's octahedral square, jittered by
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* - **Direction**: the texel's octahedral square, jittered by a point of one of the texel's Sobol sequences
|
|
16
|
+
* (`probe_clipmap_ray_jitter`): the sequence of the ray's round among the texel's rays and of the kind of
|
|
17
|
+
* update, at the count of the probe's earlier updates of that kind (`probe_clipmap_ray_visit`). A texel's
|
|
18
|
+
* rays of a round and kind are stratified inside it over the updates of that kind it takes them on.
|
|
19
19
|
* - **Origin**: a point of a small ball around the probe where relocation left it, `probe_origins`, one a
|
|
20
20
|
* ray (`probe_clipmap_ray_origin`); t_min one voxel of the brick cascade there.
|
|
21
21
|
* - **Direct light**: a hit off a front face takes E_dir = Σ colour·max(0, n·l)·visibility over the
|
|
@@ -29,8 +29,8 @@ export const PROBE_TRACE_SETTINGS: WebGPUStruct;
|
|
|
29
29
|
* surface turned from a light traces no ray toward it, since the light gives it nothing.
|
|
30
30
|
* - **Back face**: a hit whose field's gradient is along the ray, so it came from inside a solid.
|
|
31
31
|
*
|
|
32
|
-
* Writes the ray's `PROBE_RAY_STRUCT`, with
|
|
33
|
-
*
|
|
32
|
+
* Writes the ray's `PROBE_RAY_STRUCT`, with E_dir as its light, which shade turns into the ray's
|
|
33
|
+
* radiance, and its probe's place in the list in its flags.
|
|
34
34
|
*
|
|
35
35
|
* @type {ComputeShader}
|
|
36
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js"],"names":[],"mappings":"AAkDA;;GAEG;AACH,mCAFU,YAAY,CAeG;AAsBzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,yCAFU,aAAa,CAuJpB;6BAvP0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js
CHANGED
|
@@ -21,24 +21,21 @@ import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
|
21
21
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
22
22
|
import { f32, u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
23
23
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
24
|
-
import { STBN_VEC2_RESOURCE } from "../../../STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js";
|
|
25
24
|
import {
|
|
26
25
|
BRICK_ATLAS_TEXTURE_RESOURCE,
|
|
27
26
|
BRICK_LEVELS_RESOURCE,
|
|
28
27
|
BRICK_MAP_TEXTURE_RESOURCE,
|
|
29
|
-
BRICK_OBJECTS_RESOURCE,
|
|
30
28
|
BRICK_OCCUPANCY_TEXTURE_RESOURCE,
|
|
31
29
|
BRICK_SAMPLER_RESOURCE,
|
|
32
|
-
chunk_brick_clipmap_object,
|
|
33
30
|
chunk_brick_clipmap_trace
|
|
34
31
|
} from "../brick/chunk_brick_clipmap_trace.js";
|
|
35
32
|
import {
|
|
36
33
|
chunk_probe_clipmap,
|
|
37
34
|
chunk_probe_clipmap_guide,
|
|
38
|
-
chunk_probe_clipmap_guided_ray_jitter,
|
|
39
|
-
chunk_probe_clipmap_ray_jitter,
|
|
40
35
|
chunk_probe_clipmap_ray_layout,
|
|
36
|
+
chunk_probe_clipmap_ray_jitter,
|
|
41
37
|
chunk_probe_clipmap_ray_origin,
|
|
38
|
+
chunk_probe_clipmap_ray_visit,
|
|
42
39
|
chunk_probe_clipmap_ray_texel,
|
|
43
40
|
PROBE_GUIDE_READ_RESOURCE,
|
|
44
41
|
PROBE_ORIGINS_READ_RESOURCE,
|
|
@@ -80,7 +77,6 @@ resources.createGroup()
|
|
|
80
77
|
.add(PROBE_RAYS_WRITE_RESOURCE)
|
|
81
78
|
.add(PROBE_RAY_SUMS_READ_RESOURCE)
|
|
82
79
|
.add(PROBE_GUIDE_READ_RESOURCE)
|
|
83
|
-
.add(STBN_VEC2_RESOURCE)
|
|
84
80
|
.add(LIGHT_DATA_RESOURCE);
|
|
85
81
|
|
|
86
82
|
resources.createGroup()
|
|
@@ -88,8 +84,7 @@ resources.createGroup()
|
|
|
88
84
|
.add(BRICK_MAP_TEXTURE_RESOURCE)
|
|
89
85
|
.add(BRICK_OCCUPANCY_TEXTURE_RESOURCE)
|
|
90
86
|
.add(BRICK_ATLAS_TEXTURE_RESOURCE)
|
|
91
|
-
.add(BRICK_SAMPLER_RESOURCE)
|
|
92
|
-
.add(BRICK_OBJECTS_RESOURCE);
|
|
87
|
+
.add(BRICK_SAMPLER_RESOURCE);
|
|
93
88
|
|
|
94
89
|
/**
|
|
95
90
|
* Trace (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.6): a thread a ray of the frame's updates, dispatched
|
|
@@ -101,10 +96,10 @@ resources.createGroup()
|
|
|
101
96
|
* or a spread subset below R = n_r². On a guided one, the walk position whose rays the ray is among
|
|
102
97
|
* in the probe's guide (`chunk_probe_clipmap_guide`), found by bisecting the first rays. A texel's rays
|
|
103
98
|
* then follow one another, in the walk's order.
|
|
104
|
-
* - **Direction**: the texel's octahedral square, jittered by
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
99
|
+
* - **Direction**: the texel's octahedral square, jittered by a point of one of the texel's Sobol sequences
|
|
100
|
+
* (`probe_clipmap_ray_jitter`): the sequence of the ray's round among the texel's rays and of the kind of
|
|
101
|
+
* update, at the count of the probe's earlier updates of that kind (`probe_clipmap_ray_visit`). A texel's
|
|
102
|
+
* rays of a round and kind are stratified inside it over the updates of that kind it takes them on.
|
|
108
103
|
* - **Origin**: a point of a small ball around the probe where relocation left it, `probe_origins`, one a
|
|
109
104
|
* ray (`probe_clipmap_ray_origin`); t_min one voxel of the brick cascade there.
|
|
110
105
|
* - **Direct light**: a hit off a front face takes E_dir = Σ colour·max(0, n·l)·visibility over the
|
|
@@ -118,8 +113,8 @@ resources.createGroup()
|
|
|
118
113
|
* surface turned from a light traces no ray toward it, since the light gives it nothing.
|
|
119
114
|
* - **Back face**: a hit whose field's gradient is along the ray, so it came from inside a solid.
|
|
120
115
|
*
|
|
121
|
-
* Writes the ray's `PROBE_RAY_STRUCT`, with
|
|
122
|
-
*
|
|
116
|
+
* Writes the ray's `PROBE_RAY_STRUCT`, with E_dir as its light, which shade turns into the ray's
|
|
117
|
+
* radiance, and its probe's place in the list in its flags.
|
|
123
118
|
*
|
|
124
119
|
* @type {ComputeShader}
|
|
125
120
|
*/
|
|
@@ -158,7 +153,7 @@ fn main(
|
|
|
158
153
|
let k = probe_clipmap_ray_probe(ray);
|
|
159
154
|
|
|
160
155
|
if (k >= probe_ray_sums.count) {
|
|
161
|
-
probe_rays[ray].
|
|
156
|
+
probe_rays[ray].albedo = 0u;
|
|
162
157
|
probe_rays[ray].flags = PROBE_RAY_NONE;
|
|
163
158
|
|
|
164
159
|
return;
|
|
@@ -177,19 +172,23 @@ fn main(
|
|
|
177
172
|
let updates = probe_state_updates(state.x);
|
|
178
173
|
|
|
179
174
|
var texel: u32;
|
|
180
|
-
|
|
175
|
+
// the ray's place among its texel's rays in the update, as accumulation counts them
|
|
176
|
+
var round: u32;
|
|
181
177
|
|
|
182
178
|
if (probe_clipmap_guided(state.x, settings.uniform_period, settings.rays_per_probe, texels)) {
|
|
183
179
|
let base = k * probe_clipmap_guide_words(n);
|
|
184
180
|
let position = probe_trace_guided_position(base, i, texels);
|
|
185
181
|
|
|
186
182
|
texel = probe_clipmap_guide_texel(position, updates, n);
|
|
187
|
-
|
|
183
|
+
round = i - probe_guide[base + position];
|
|
188
184
|
} else {
|
|
189
185
|
texel = probe_clipmap_ray_texel(i, updates, rays, texels);
|
|
190
|
-
|
|
186
|
+
// every texel once, then again: below R = n_r² the update's rays are all its first
|
|
187
|
+
round = i / texels;
|
|
191
188
|
}
|
|
192
189
|
|
|
190
|
+
let visit = probe_clipmap_ray_visit(state.x, round, rays, texels, settings.uniform_period, settings.rays_per_probe);
|
|
191
|
+
let jitter = probe_clipmap_ray_jitter(slot, texel, visit.x, visit.y);
|
|
193
192
|
let direction = uv_octahedral_unit_decode((vec2<f32>(f32(texel % n), f32(texel / n)) + jitter) / f32(n));
|
|
194
193
|
let packed = pack2x16unorm(uv_octahedral_unit_encode(direction));
|
|
195
194
|
|
|
@@ -245,7 +244,7 @@ fn main(
|
|
|
245
244
|
probe_rays[ray].t = hit.t;
|
|
246
245
|
probe_rays[ray].direction = packed;
|
|
247
246
|
probe_rays[ray].normal = select(0u, pack2x16unorm(uv_octahedral_unit_encode(hit.normal)), is_hit);
|
|
248
|
-
probe_rays[ray].
|
|
247
|
+
probe_rays[ray].albedo = 0u;
|
|
249
248
|
probe_rays[ray].flags = hit.kind | select(0u, PROBE_RAY_BACK_FACE, back_face) | (select(0u, hit.cascade, is_hit) << PROBE_RAY_CASCADE_SHIFT) | (k << PROBE_RAY_PROBE_SHIFT);
|
|
250
249
|
probe_rays[ray].light = rgbe9995_encode(direct);
|
|
251
250
|
}
|
|
@@ -254,14 +253,13 @@ fn main(
|
|
|
254
253
|
chunk_probe_clipmap_ray_layout,
|
|
255
254
|
chunk_probe_clipmap_ray_texel,
|
|
256
255
|
chunk_probe_clipmap_ray_jitter,
|
|
256
|
+
chunk_probe_clipmap_ray_visit,
|
|
257
257
|
chunk_probe_clipmap_ray_origin,
|
|
258
258
|
chunk_probe_clipmap_guide,
|
|
259
|
-
chunk_probe_clipmap_guided_ray_jitter,
|
|
260
259
|
chunk_folded_workgroup_index,
|
|
261
260
|
chunk_uv_octahedral_unit_decode,
|
|
262
261
|
chunk_uv_octahedral_unit_encode,
|
|
263
262
|
chunk_brick_clipmap_trace,
|
|
264
|
-
chunk_brick_clipmap_object,
|
|
265
263
|
chunk_cone_sample_direction,
|
|
266
264
|
chunk_pcg3d,
|
|
267
265
|
chunk_hash_to_float01,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_want.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js"],"names":[],"mappings":"AAqBA;;GAEG;AACH,kCAFU,YAAY,
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_want.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js"],"names":[],"mappings":"AAqBA;;GAEG;AACH,kCAFU,YAAY,CAcE;AAexB;;;;;;;;;;;;;GAaG;AACH,wCAFU,aAAa,CAqCpB;6BA1F0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js
CHANGED
|
@@ -7,7 +7,7 @@ import { chunk_stbn_sample_vec2 } from "../../../shader/chunk/noise/chunk_stbn_s
|
|
|
7
7
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
8
8
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
9
9
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
10
|
-
import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
10
|
+
import { f32, u32, vec3f } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
11
11
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
12
12
|
import { STBN_VEC2_RESOURCE } from "../../../STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js";
|
|
13
13
|
import {
|
|
@@ -30,6 +30,10 @@ export const PROBE_WANT_SETTINGS = WebGPUStruct.from({
|
|
|
30
30
|
frame: u32,
|
|
31
31
|
/** what the wanted list holds at most: every key, or fewer where the wants cannot want more */
|
|
32
32
|
wanted_capacity: u32,
|
|
33
|
+
/** where the windows were placed around, world metres: the selection boxes' centre, as the pick reads it */
|
|
34
|
+
anchor: vec3f,
|
|
35
|
+
/** a selection box's half side, in its cascade's cells, as the pick reads it */
|
|
36
|
+
select_half: f32,
|
|
33
37
|
}, "ProbeWantSettings");
|
|
34
38
|
|
|
35
39
|
const resources = new ShaderResourceSetDescriptor();
|
|
@@ -83,7 +87,7 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) {
|
|
|
83
87
|
let view_direction = normalize(mat4_extract_position(camera.transform) - position);
|
|
84
88
|
let bias_direction = mix(normal, view_direction, ${PROBE_RECEIVER_BIAS_VIEW});
|
|
85
89
|
|
|
86
|
-
probe_clipmap_want(on_screen && !is_background(depth), position, bias_direction, settings.cascade_count, settings.resolution, settings.wanted_capacity);
|
|
90
|
+
probe_clipmap_want(on_screen && !is_background(depth), position, bias_direction, settings.cascade_count, settings.resolution, settings.anchor, settings.select_half, settings.wanted_capacity);
|
|
87
91
|
}
|
|
88
92
|
`, [
|
|
89
93
|
chunk_probe_clipmap,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* `PROBE_DISPATCH_RAYS` of that clipmap, before its frame's lifetime writes them over. The points go on this
|
|
5
5
|
* clipmap's wanted list, through its levels.
|
|
6
6
|
*
|
|
7
|
-
* A front-face hit whose `
|
|
8
|
-
* the bounce pass clears the
|
|
7
|
+
* A front-face hit whose `albedo` the light passes left non-zero wants the cages its pick reads in this clipmap:
|
|
8
|
+
* the bounce pass clears the albedo of a hit whose first set held probes, so a hit wants only where that set
|
|
9
9
|
* had none, and this clipmap's probes are its fallback (`shader_probe_clipmap_bounce`). So a probe a hit needs
|
|
10
10
|
* is admitted where the first set has none, and kept while hits read it. Until its first update a NEW probe
|
|
11
11
|
* weighs nothing and the hit takes no bounce: light is lost for a frame or two, never invented.
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js
CHANGED
|
@@ -37,8 +37,8 @@ resources.createGroup()
|
|
|
37
37
|
* `PROBE_DISPATCH_RAYS` of that clipmap, before its frame's lifetime writes them over. The points go on this
|
|
38
38
|
* clipmap's wanted list, through its levels.
|
|
39
39
|
*
|
|
40
|
-
* A front-face hit whose `
|
|
41
|
-
* the bounce pass clears the
|
|
40
|
+
* A front-face hit whose `albedo` the light passes left non-zero wants the cages its pick reads in this clipmap:
|
|
41
|
+
* the bounce pass clears the albedo of a hit whose first set held probes, so a hit wants only where that set
|
|
42
42
|
* had none, and this clipmap's probes are its fallback (`shader_probe_clipmap_bounce`). So a probe a hit needs
|
|
43
43
|
* is admitted where the first set has none, and kept while hits read it. Until its first update a NEW probe
|
|
44
44
|
* weighs nothing and the hit takes no bounce: light is lost for a frame or two, never invented.
|
|
@@ -75,10 +75,10 @@ fn main(
|
|
|
75
75
|
let k = record.flags >> PROBE_RAY_PROBE_SHIFT;
|
|
76
76
|
let slot = probe_trace.elements[k];
|
|
77
77
|
|
|
78
|
-
// shade left a front-face hit's albedo
|
|
79
|
-
//
|
|
78
|
+
// shade left a front-face hit's albedo and zero in any other ray's, and the bounce pass cleared the
|
|
79
|
+
// albedo of a hit its first set served: a ray that takes no bounce, a black hit's among them,
|
|
80
80
|
// or that had its probes, wants nothing
|
|
81
|
-
wants = record.
|
|
81
|
+
wants = record.albedo != 0u;
|
|
82
82
|
|
|
83
83
|
let direction = uv_octahedral_unit_decode(unpack2x16unorm(record.direction));
|
|
84
84
|
let normal = uv_octahedral_unit_decode(unpack2x16unorm(record.normal));
|
|
@@ -88,7 +88,7 @@ fn main(
|
|
|
88
88
|
bias_direction = mix(normal, -direction, ${PROBE_RECEIVER_BIAS_VIEW});
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
probe_clipmap_want(wants, position, bias_direction, settings.cascade_count, settings.resolution, settings.wanted_capacity);
|
|
91
|
+
probe_clipmap_want(wants, position, bias_direction, settings.cascade_count, settings.resolution, settings.anchor, settings.select_half, settings.wanted_capacity);
|
|
92
92
|
}
|
|
93
93
|
`, [
|
|
94
94
|
chunk_probe_clipmap,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The step of a hash table's probe sequence: `(5 index + 1) mod 2^K`, which visits every record of a
|
|
3
|
+
* table of 2^K records once before it repeats. The WGSL twin of
|
|
4
|
+
* `core/collection/map/generate_next_linear_congruential_index.js`.
|
|
5
|
+
*
|
|
6
|
+
* ```wgsl
|
|
7
|
+
* fn generate_next_linear_congruential_index(index: u32, mask: u32) -> u32 // mask: 2^K - 1
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @type {CodeChunk}
|
|
11
|
+
*/
|
|
12
|
+
export const chunk_generate_next_linear_congruential_index: CodeChunk;
|
|
13
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
14
|
+
//# sourceMappingURL=chunk_generate_next_linear_congruential_index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_generate_next_linear_congruential_index.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,4DAFU,SAAS,CAUhB;0BArBuB,oCAAoC"}
|
package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The step of a hash table's probe sequence: `(5 index + 1) mod 2^K`, which visits every record of a
|
|
5
|
+
* table of 2^K records once before it repeats. The WGSL twin of
|
|
6
|
+
* `core/collection/map/generate_next_linear_congruential_index.js`.
|
|
7
|
+
*
|
|
8
|
+
* ```wgsl
|
|
9
|
+
* fn generate_next_linear_congruential_index(index: u32, mask: u32) -> u32 // mask: 2^K - 1
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @type {CodeChunk}
|
|
13
|
+
*/
|
|
14
|
+
export const chunk_generate_next_linear_congruential_index = CodeChunk.from(
|
|
15
|
+
//language=WGSL
|
|
16
|
+
`
|
|
17
|
+
fn generate_next_linear_congruential_index(index: u32, mask: u32) -> u32 {
|
|
18
|
+
let index5 = index * 5u;
|
|
19
|
+
|
|
20
|
+
return (index5 + 1u) & mask;
|
|
21
|
+
}
|
|
22
|
+
`);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The encoded key of a record removed from a table the device keeps ({@link chunk_hash_table_atomic}):
|
|
3
|
+
* a probe passes over it as over another key's record, and an insert may take its place. No key
|
|
4
|
+
* encodes to it, keys staying below `0xFFFFFFFE`.
|
|
5
|
+
* @type {number}
|
|
6
|
+
*/
|
|
7
|
+
export const HASH_TABLE_REMOVED: number;
|
|
8
|
+
/**
|
|
9
|
+
* The table `cpu_build_hash_table` lays out (`[element_count, table_size]`, then `table_size` records
|
|
10
|
+
* of `(key + 1, value)`, an empty record 0) kept on the device: inserted into and removed from by
|
|
11
|
+
* atomics, on `hash_table_get`'s probe sequence and limit. A key may hold several records, which find
|
|
12
|
+
* visits in turn; the caller tells them apart by what their values name. `element_count` counts the
|
|
13
|
+
* records held.
|
|
14
|
+
*
|
|
15
|
+
* ```wgsl
|
|
16
|
+
* fn hash_table_atomic_start(table, offset: u32, key: u32) -> vec2<u32> // a cursor at the key's first record
|
|
17
|
+
* fn hash_table_atomic_find(table, offset: u32, key: u32, cursor: ptr<function, vec2<u32>>) -> u32 // the key's next record, or HASH_TABLE_MISS
|
|
18
|
+
* fn hash_table_atomic_value(table, record: u32) -> u32
|
|
19
|
+
* fn hash_table_atomic_insert(table, offset: u32, key: u32, value: u32) -> bool // false: no record free within the probe limit
|
|
20
|
+
* fn hash_table_atomic_remove(table, offset: u32, record: u32)
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* `table` is a `ptr<storage, array<atomic<u32>>, read_write>`, and a record is named by the word it
|
|
24
|
+
* starts at. Insert claims the first empty or removed record of the key's sequence by
|
|
25
|
+
* compare-exchange on its key and stores the value after it, so a find racing that insert in one
|
|
26
|
+
* dispatch may read the value before it lands: a caller whose inserts share a dispatch with its finds
|
|
27
|
+
* checks what a value names before trusting it. Inserts and removes of different records may share a
|
|
28
|
+
* dispatch. A find ends at the sequence's first empty record or at the probe limit.
|
|
29
|
+
*
|
|
30
|
+
* A table holds at least `HASH_TABLE_PROBE_LIMIT` records, a power of two, so that the probes of a
|
|
31
|
+
* key's sequence meet no record twice.
|
|
32
|
+
*
|
|
33
|
+
* @type {CodeChunk}
|
|
34
|
+
*/
|
|
35
|
+
export const chunk_hash_table_atomic: CodeChunk;
|
|
36
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
37
|
+
//# sourceMappingURL=chunk_hash_table_atomic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_hash_table_atomic.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,iCAFU,MAAM,CAE6B;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,sCAFU,SAAS,CAmFZ;0BAxHmB,oCAAoC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { chunk_hash_lowbias32 } from "../../shader/chunk/random/chunk_hash_lowbias32.js";
|
|
2
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
3
|
+
import { chunk_generate_next_linear_congruential_index } from "./chunk_generate_next_linear_congruential_index.js";
|
|
4
|
+
import { HASH_TABLE_MISS, HASH_TABLE_PROBE_LIMIT } from "./cpu_build_hash_table.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The encoded key of a record removed from a table the device keeps ({@link chunk_hash_table_atomic}):
|
|
8
|
+
* a probe passes over it as over another key's record, and an insert may take its place. No key
|
|
9
|
+
* encodes to it, keys staying below `0xFFFFFFFE`.
|
|
10
|
+
* @type {number}
|
|
11
|
+
*/
|
|
12
|
+
export const HASH_TABLE_REMOVED = 0xFFFFFFFF;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The table `cpu_build_hash_table` lays out (`[element_count, table_size]`, then `table_size` records
|
|
16
|
+
* of `(key + 1, value)`, an empty record 0) kept on the device: inserted into and removed from by
|
|
17
|
+
* atomics, on `hash_table_get`'s probe sequence and limit. A key may hold several records, which find
|
|
18
|
+
* visits in turn; the caller tells them apart by what their values name. `element_count` counts the
|
|
19
|
+
* records held.
|
|
20
|
+
*
|
|
21
|
+
* ```wgsl
|
|
22
|
+
* fn hash_table_atomic_start(table, offset: u32, key: u32) -> vec2<u32> // a cursor at the key's first record
|
|
23
|
+
* fn hash_table_atomic_find(table, offset: u32, key: u32, cursor: ptr<function, vec2<u32>>) -> u32 // the key's next record, or HASH_TABLE_MISS
|
|
24
|
+
* fn hash_table_atomic_value(table, record: u32) -> u32
|
|
25
|
+
* fn hash_table_atomic_insert(table, offset: u32, key: u32, value: u32) -> bool // false: no record free within the probe limit
|
|
26
|
+
* fn hash_table_atomic_remove(table, offset: u32, record: u32)
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* `table` is a `ptr<storage, array<atomic<u32>>, read_write>`, and a record is named by the word it
|
|
30
|
+
* starts at. Insert claims the first empty or removed record of the key's sequence by
|
|
31
|
+
* compare-exchange on its key and stores the value after it, so a find racing that insert in one
|
|
32
|
+
* dispatch may read the value before it lands: a caller whose inserts share a dispatch with its finds
|
|
33
|
+
* checks what a value names before trusting it. Inserts and removes of different records may share a
|
|
34
|
+
* dispatch. A find ends at the sequence's first empty record or at the probe limit.
|
|
35
|
+
*
|
|
36
|
+
* A table holds at least `HASH_TABLE_PROBE_LIMIT` records, a power of two, so that the probes of a
|
|
37
|
+
* key's sequence meet no record twice.
|
|
38
|
+
*
|
|
39
|
+
* @type {CodeChunk}
|
|
40
|
+
*/
|
|
41
|
+
export const chunk_hash_table_atomic = CodeChunk.from(
|
|
42
|
+
//language=WGSL
|
|
43
|
+
`
|
|
44
|
+
const HASH_TABLE_MISS = ${HASH_TABLE_MISS}u;
|
|
45
|
+
const HASH_TABLE_REMOVED = ${HASH_TABLE_REMOVED}u;
|
|
46
|
+
const HASH_TABLE_PROBE_LIMIT = ${HASH_TABLE_PROBE_LIMIT}u;
|
|
47
|
+
|
|
48
|
+
fn hash_table_atomic_start(table: ptr<storage, array<atomic<u32>>, read_write>, offset: u32, key: u32) -> vec2<u32> {
|
|
49
|
+
let mask = atomicLoad(&(*table)[offset + 1u]) - 1u;
|
|
50
|
+
|
|
51
|
+
// the record index, then the probes taken
|
|
52
|
+
return vec2<u32>(hash_lowbias32(key) & mask, 0u);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
fn hash_table_atomic_find(table: ptr<storage, array<atomic<u32>>, read_write>, offset: u32, key: u32, cursor: ptr<function, vec2<u32>>) -> u32 {
|
|
56
|
+
let mask = atomicLoad(&(*table)[offset + 1u]) - 1u;
|
|
57
|
+
let encoded = key + 1u;
|
|
58
|
+
|
|
59
|
+
while ((*cursor).y < HASH_TABLE_PROBE_LIMIT) {
|
|
60
|
+
let record = offset + 2u + 2u * (*cursor).x;
|
|
61
|
+
let stored = atomicLoad(&(*table)[record]);
|
|
62
|
+
|
|
63
|
+
*cursor = vec2<u32>(generate_next_linear_congruential_index((*cursor).x, mask), (*cursor).y + 1u);
|
|
64
|
+
|
|
65
|
+
if (stored == 0u) {
|
|
66
|
+
// the key's sequence ends at its first empty record
|
|
67
|
+
(*cursor).y = HASH_TABLE_PROBE_LIMIT;
|
|
68
|
+
|
|
69
|
+
return HASH_TABLE_MISS;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (stored == encoded) {
|
|
73
|
+
return record;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return HASH_TABLE_MISS;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
fn hash_table_atomic_value(table: ptr<storage, array<atomic<u32>>, read_write>, record: u32) -> u32 {
|
|
81
|
+
return atomicLoad(&(*table)[record + 1u]);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
fn hash_table_atomic_insert(table: ptr<storage, array<atomic<u32>>, read_write>, offset: u32, key: u32, value: u32) -> bool {
|
|
85
|
+
let mask = atomicLoad(&(*table)[offset + 1u]) - 1u;
|
|
86
|
+
|
|
87
|
+
var index = hash_lowbias32(key) & mask;
|
|
88
|
+
|
|
89
|
+
for (var probe = 0u; probe < HASH_TABLE_PROBE_LIMIT; probe++) {
|
|
90
|
+
let record = offset + 2u + 2u * index;
|
|
91
|
+
let stored = atomicLoad(&(*table)[record]);
|
|
92
|
+
|
|
93
|
+
if (stored == 0u || stored == HASH_TABLE_REMOVED) {
|
|
94
|
+
let claim = atomicCompareExchangeWeak(&(*table)[record], stored, key + 1u);
|
|
95
|
+
|
|
96
|
+
if (claim.exchanged) {
|
|
97
|
+
atomicStore(&(*table)[record + 1u], value);
|
|
98
|
+
atomicAdd(&(*table)[offset], 1u);
|
|
99
|
+
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (claim.old_value == stored) {
|
|
104
|
+
// a weak exchange may fail on a record that still holds what it read: the same record again
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
index = generate_next_linear_congruential_index(index, mask);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
fn hash_table_atomic_remove(table: ptr<storage, array<atomic<u32>>, read_write>, offset: u32, record: u32) {
|
|
116
|
+
atomicStore(&(*table)[record], HASH_TABLE_REMOVED);
|
|
117
|
+
atomicSub(&(*table)[offset], 1u);
|
|
118
|
+
}
|
|
119
|
+
`, [
|
|
120
|
+
chunk_generate_next_linear_congruential_index,
|
|
121
|
+
chunk_hash_lowbias32,
|
|
122
|
+
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_hash_table_get.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_hash_table_get.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH,mCAFU,SAAS,CAkDlB;0BAvDyB,oCAAoC"}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { chunk_hash_lowbias32 } from "../../shader/chunk/random/chunk_hash_lowbias32.js";
|
|
2
2
|
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
3
|
-
|
|
4
|
-
const chunk_generate_next_linear_congruential_index = CodeChunk.from(
|
|
5
|
-
//language=WGSL
|
|
6
|
-
`
|
|
7
|
-
fn generate_next_linear_congruential_index(index:u32, mask: u32) -> u32{
|
|
8
|
-
let index5 = index * 5;
|
|
9
|
-
|
|
10
|
-
return (index5 + 1) & mask;
|
|
11
|
-
}
|
|
12
|
-
`
|
|
13
|
-
)
|
|
3
|
+
import { chunk_generate_next_linear_congruential_index } from "./chunk_generate_next_linear_congruential_index.js";
|
|
14
4
|
|
|
15
5
|
/**
|
|
16
6
|
* @see cpu_build_hash_table
|
|
@@ -40,6 +40,14 @@ export function cpu_hash_table_word_count(input_size: number): number;
|
|
|
40
40
|
* @see cpu_build_hash_table to build at a given size
|
|
41
41
|
*/
|
|
42
42
|
export function cpu_hash_table_create(table: Uint32Array, inputs: number[], input_size: number): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Maximum number of slots visited per operation.
|
|
45
|
+
* Must match the WGSL twins ({@link chunk_hash_table_get}, `chunk_hash_table_atomic`): a lookup probes
|
|
46
|
+
* at most this many slots, so an insert that cannot place a record within the limit must report it —
|
|
47
|
+
* otherwise it would create an entry that lookups can never reach.
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
export const HASH_TABLE_PROBE_LIMIT: number;
|
|
43
51
|
/**
|
|
44
52
|
* Sentinel returned on lookup miss.
|
|
45
53
|
* Must match the WGSL twin ({@link chunk_hash_table_get}).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cpu_build_hash_table.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cpu_build_hash_table.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js"],"names":[],"mappings":"AAsEA;;;;;;GAMG;AACH,0CALW,WAAW,UACX,MAAM,OACN,MAAM,GACJ,MAAM,CAsClB;AAED;;;;;;;;;GASG;AACH,6CARW,WAAW,iBACX,MAAM,cACN,MAAM,UACN,MAAM,EAAE,cACR,MAAM,GACJ,OAAO,CA2BnB;AAWD;;;;;GAKG;AACH,sDAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;;;;;;;;;;GAcG;AACH,6CARW,WAAW,UACX,MAAM,EAAE,cACR,MAAM,GACJ,OAAO,CAkBnB;AA9LD;;;;;;GAMG;AACH,qCAFU,MAAM,CAEyB;AAIzC;;;;GAIG;AACH,8BAFU,MAAM,CAE0B"}
|
|
@@ -8,12 +8,14 @@ import { isPowerOfTwo } from "../../../../core/math/isPowerOfTwo.js";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Maximum number of slots visited per operation.
|
|
11
|
-
* Must match the WGSL
|
|
12
|
-
* so an insert that cannot place a record within the limit must report it —
|
|
13
|
-
* create an entry that lookups can never reach.
|
|
11
|
+
* Must match the WGSL twins ({@link chunk_hash_table_get}, `chunk_hash_table_atomic`): a lookup probes
|
|
12
|
+
* at most this many slots, so an insert that cannot place a record within the limit must report it —
|
|
13
|
+
* otherwise it would create an entry that lookups can never reach.
|
|
14
14
|
* @type {number}
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
export const HASH_TABLE_PROBE_LIMIT = 32;
|
|
17
|
+
|
|
18
|
+
const PROBE_LIMIT = HASH_TABLE_PROBE_LIMIT;
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* Sentinel returned on lookup miss.
|