@woosh/meep-engine 3.60.5 → 3.60.7
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 +19 -0
- package/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/src/core/binary/BitSet.d.ts.map +1 -1
- package/src/core/binary/BitSet.js +2 -1
- package/src/{format/image/avif/av1/util → core/binary/operations}/ceil_log2.d.ts +2 -2
- package/src/core/binary/operations/ceil_log2.d.ts.map +1 -0
- package/src/{format/image/avif/av1/util → core/binary/operations}/ceil_log2.js +18 -18
- package/src/core/binary/zstd/ZstdReverseBitReader.d.ts.map +1 -1
- package/src/core/binary/zstd/ZstdReverseBitReader.js +225 -223
- package/src/core/binary/zstd/zstd_fse.d.ts.map +1 -1
- package/src/core/binary/zstd/zstd_fse.js +267 -265
- package/src/core/binary/zstd/zstd_huffman.d.ts.map +1 -1
- package/src/core/binary/zstd/zstd_huffman.js +246 -244
- package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts.map +1 -1
- package/src/core/bvh2/binary/2/BinaryUint32BVH.js +8 -2
- package/src/core/bvh2/bvh3/ebvh_optimize_treelet.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/ebvh_optimize_treelet.js +8 -7
- package/src/core/collection/PairUint32Map.d.ts.map +1 -1
- package/src/core/collection/PairUint32Map.js +2 -2
- package/src/core/collection/Uint32Map.d.ts.map +1 -1
- package/src/core/collection/Uint32Map.js +2 -4
- package/src/core/collection/heap/FibonacciHeap.d.ts.map +1 -1
- package/src/core/collection/heap/FibonacciHeap.js +2 -1
- package/src/core/geom/2d/r-tree/StaticR2Tree.d.ts.map +1 -1
- package/src/core/geom/2d/r-tree/StaticR2Tree.js +8 -2
- package/src/core/geom/3d/shape/util/mesh_compute_triangle_edge_flags.d.ts.map +1 -1
- package/src/core/geom/3d/shape/util/mesh_compute_triangle_edge_flags.js +2 -3
- package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/TextureAtlas.js +13 -14
- package/src/engine/graphics/texture/atlas/sprite_atlas_border.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/sprite_atlas_border.js +70 -69
- package/src/engine/graphics/texture/reflection/convolve_equirectangular_reflection.d.ts.map +1 -1
- package/src/engine/graphics/texture/reflection/convolve_equirectangular_reflection.js +2 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +2 -1
- package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts.map +1 -1
- package/src/engine/graphics3/decal/GPUDecalRenderer.js +2 -1
- package/src/engine/graphics3/decal/chunk_decal_record.d.ts +14 -0
- package/src/engine/graphics3/decal/chunk_decal_record.d.ts.map +1 -0
- package/src/engine/graphics3/decal/chunk_decal_record.js +44 -0
- package/src/engine/graphics3/decal/shader_cluster_assign_decals.d.ts.map +1 -1
- package/src/engine/graphics3/decal/shader_cluster_assign_decals.js +2 -15
- package/src/engine/graphics3/decal/shader_cull_decals_frustum.d.ts.map +1 -1
- package/src/engine/graphics3/decal/shader_cull_decals_frustum.js +3 -16
- package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
- package/src/engine/graphics3/decal/shader_decal_composite.js +3 -23
- package/src/engine/graphics3/terrain/TERRAIN_MATERIAL_TEMPLATE.d.ts.map +1 -1
- package/src/engine/graphics3/terrain/TERRAIN_MATERIAL_TEMPLATE.js +2 -1
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/queries/shape_cast.js +2 -2
- package/src/format/image/avif/av1/decode/decode_palette.js +442 -442
- package/src/format/image/avif/av1/entropy/SymbolWriter.d.ts.map +1 -1
- package/src/format/image/avif/av1/entropy/SymbolWriter.js +2 -1
- package/src/generation/foliage/material/foliage_tile.d.ts.map +1 -1
- package/src/generation/foliage/material/foliage_tile.js +2 -1
- package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUDevice.js +6 -13
- package/src/shade/playground/caldera/main.js +3 -2
- package/src/shade/playground/probe_clipmap/README.md +2 -1
- package/src/shade/playground/probe_clipmap/index.html +7 -2
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +17 -7
- package/src/shade/playground/sh_exponential/sh_exp_playground_shaders.d.ts.map +1 -1
- package/src/shade/playground/sh_exponential/sh_exp_playground_shaders.js +7 -13
- package/src/shade/playground/vgeo_scene/main.js +2 -1
- package/src/shade/playground/vsm/VSMDebugOverlay.d.ts.map +1 -1
- package/src/shade/playground/vsm/VSMDebugOverlay.js +3 -1
- package/src/shade/renderer/Renderer.d.ts +11 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +43 -1
- 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/pressure/shader_fluid_mg_coarsest.d.ts.map +1 -1
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarsest.js +5 -4
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.d.ts.map +1 -1
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.js +168 -166
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.d.ts.map +1 -1
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.js +221 -219
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/fow/shader_fog_of_war.d.ts.map +1 -1
- package/src/shade/renderer/fow/shader_fog_of_war.js +8 -19
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +26 -43
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +115 -123
- package/src/shade/renderer/geometry/sdf/MeshSDFLayout.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/MeshSDFLayout.js +2 -1
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +20 -2
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +66 -2
- package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/proxy/vgeo_proxy_triangle_limit.js +25 -0
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +2 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +2 -1
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +38 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +28 -59
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +84 -789
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_decode_from_storage.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_decode_from_storage.js +10 -31
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_encode_to_storage.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v1/chunk_brick4_sh3_color_encode_to_storage.js +9 -15
- package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.d.ts +2 -1
- package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.js +6 -5
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.js +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +15 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +168 -18
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +98 -57
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +168 -77
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +4 -2
- 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 +27 -12
- 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 +12 -7
- 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 +8 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js +2 -2
- 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 +5 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js +5 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_movers_command.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_movers_command.js +4 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.js +1 -1
- 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 +1 -1
- 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 +3 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +114 -41
- 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 +424 -207
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +34 -25
- 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 +41 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts +7 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js +7 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts +47 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js +84 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts +48 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js +101 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +58 -4
- 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 +127 -30
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts +18 -7
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js +39 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +29 -8
- 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 +112 -56
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resample.d.ts +19 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resample.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resample.js +35 -0
- 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 +9 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +3 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +5 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +8 -12
- 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 +23 -56
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +11 -15
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +26 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +173 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts +32 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.js +166 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts +3 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.js +3 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.js +3 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +6 -12
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +15 -65
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.js +7 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +4 -4
- 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 +24 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_publish.d.ts +7 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_publish.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_publish.js +18 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.js +9 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.d.ts +3 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.js +9 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js +16 -16
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample_rays.d.ts +36 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample_rays.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample_rays.js +233 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.js +7 -5
- 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 +5 -3
- 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 +10 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.js +12 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts +1 -2
- 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 +5 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +14 -18
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +25 -35
- package/src/shade/renderer/gpu_primitive/WEBGPU_GUARANTEED_MAX_UNIFORM_BUFFER_BINDING_SIZE.d.ts +13 -0
- package/src/shade/renderer/gpu_primitive/WEBGPU_GUARANTEED_MAX_UNIFORM_BUFFER_BINDING_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/WEBGPU_GUARANTEED_MAX_UNIFORM_BUFFER_BINDING_SIZE.js +12 -0
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts +27 -2
- 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 +62 -6
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.js +10 -19
- package/src/shade/renderer/gpu_primitive/indirect/chunk_folded_dispatch.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/indirect/chunk_folded_dispatch.js +6 -3
- package/src/shade/renderer/hiz/hzb_pick_alignment.d.ts.map +1 -1
- package/src/shade/renderer/hiz/hzb_pick_alignment.js +149 -148
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.js +4 -2
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.js +6 -5
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_project.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_project.js +3 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.js +3 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_solve.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_solve.js +3 -1
- package/src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.d.ts +0 -5
- package/src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.d.ts.map +1 -1
- package/src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.js +0 -7
- package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts +15 -2
- package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts.map +1 -1
- package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.js +51 -16
- package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.d.ts.map +1 -1
- package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.js +3 -2
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts +4 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +5 -8
- package/src/shade/renderer/postprocess/dof/raymarch/chunk_dof_lds_coc_cache.d.ts +17 -0
- package/src/shade/renderer/postprocess/dof/raymarch/chunk_dof_lds_coc_cache.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/dof/raymarch/chunk_dof_lds_coc_cache.js +81 -0
- package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_raymarch_compute.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_raymarch_compute.js +5 -48
- package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_slice_compute.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/raymarch/shader_dof_slice_compute.js +4 -44
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +7 -3
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/GTAO.js +26 -13
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts +14 -0
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +196 -68
- package/src/shade/renderer/postprocess/gtao/chunk_integrate_lighting_sample.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/chunk_integrate_lighting_sample.js +4 -1
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.js +42 -28
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.js +430 -414
- package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.d.ts +16 -0
- package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/gtao/shader_gtao_spatial_denoise.js +156 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/chunk_nss_luma_derivative.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/chunk_nss_luma_derivative.js +5 -7
- package/src/shade/renderer/postprocess/nss/chunk_nss_tonemap.d.ts +17 -0
- package/src/shade/renderer/postprocess/nss/chunk_nss_tonemap.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/nss/chunk_nss_tonemap.js +56 -0
- package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.js +2 -22
- package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.js +2 -13
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +10 -13
- package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.js +39 -38
- package/src/shade/renderer/rasterize/expand/mesh/shader_prefix_sum_to_command.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/mesh/shader_prefix_sum_to_command.js +7 -12
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +2 -2
- package/src/shade/renderer/scene/GPUSceneContext.js +5 -5
- package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.d.ts +8 -6
- package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js +10 -7
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_key.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_key.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_key.js +35 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.d.ts +5 -2
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.js +27 -18
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh2_color_get_irradiance_at.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh2_color_get_irradiance_at.js +5 -15
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_convolve_with_cosine_kernel.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_convolve_with_cosine_kernel.js +5 -19
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh3_windowing.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh3_windowing.js +3 -22
- package/src/shade/renderer/shadow/map/ShadowmapDrawSelector.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/ShadowmapDrawSelector.js +2 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_shadow_group_list.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_shadow_group_list.js +154 -152
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +2 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.d.ts +3 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.js +4 -3
- package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP_STRUCT.d.ts +7 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP_STRUCT.js +54 -47
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_sample.js +371 -370
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
- package/src/shade/renderer/water/GPUWaterRenderer.js +2 -1
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/water/surface/lod/shader_water_lod.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/lod/shader_water_lod.js +12 -14
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/GPUWaterParticles.js +2 -9
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle.js +2 -1
- package/src/shade/renderer/wind/WIND_FIELD.d.ts +3 -1
- package/src/shade/renderer/wind/WIND_FIELD.d.ts.map +1 -1
- package/src/shade/renderer/wind/WIND_FIELD.js +4 -3
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts +8 -2
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.js +11 -4
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts +2 -2
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts.map +1 -1
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.js +13 -4
- package/src/shade/util/texture_mip_extent.d.ts.map +1 -1
- package/src/shade/util/texture_mip_extent.js +88 -87
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +9 -7
- package/src/format/image/avif/av1/util/ceil_log2.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts +0 -47
- package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.js +0 -80
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts +0 -16
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.js +0 -67
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts +0 -17
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.js +0 -145
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts +0 -12
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.js +0 -105
- package/src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.d.ts +0 -1
- package/src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.js +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Words of the payload's header for `job_count` jobs: their counters, then the cut's own counters from its feedback
|
|
3
|
-
* slot (`VGEO_CUT_STAT`), which say whether the cut left a subtree undescended.
|
|
4
|
-
*
|
|
5
|
-
* @param {number} job_count
|
|
6
|
-
* @returns {number}
|
|
7
|
-
*/
|
|
8
|
-
export function vgeo_sdf_header_words(job_count: number): number;
|
|
9
|
-
/**
|
|
10
|
-
* The extraction's settings, an immediate of each of its passes.
|
|
11
|
-
* @type {WebGPUStruct}
|
|
12
|
-
*/
|
|
13
|
-
export const VGEO_SDF_SETTINGS: WebGPUStruct;
|
|
14
|
-
/**
|
|
15
|
-
* A job the frame cuts, as the host writes it: the vgeo geometry row it cuts and the projection constant that puts its
|
|
16
|
-
* error against a τ of 1, `1 / (½ voxel)` in the geometry's own units. A job the frame writes out (`decode` 1) has its
|
|
17
|
-
* room in the payload: `vertex_count` vertices from `vertex_base` and `triangle_count` triangles from `triangle_base`,
|
|
18
|
-
* what its last complete cut held.
|
|
19
|
-
* @type {WebGPUStruct}
|
|
20
|
-
*/
|
|
21
|
-
export const VGEO_SDF_JOB_STRUCT: WebGPUStruct;
|
|
22
|
-
/**
|
|
23
|
-
* A job's counters, atomics the frame's passes add into: the clusters its cut took, the stand-ins among them (a
|
|
24
|
-
* cluster taken for a page not resident or a group held), those dropped past the cluster list, the vertices and
|
|
25
|
-
* triangles of its listed clusters, and of those, what the decode wrote into its room.
|
|
26
|
-
*/
|
|
27
|
-
export const VGEO_SDF_COUNTER: Readonly<{
|
|
28
|
-
TAKEN: 0;
|
|
29
|
-
STAND_INS: 1;
|
|
30
|
-
DROPPED: 2;
|
|
31
|
-
VERTICES: 3;
|
|
32
|
-
TRIANGLES: 4;
|
|
33
|
-
VERTICES_WRITTEN: 5;
|
|
34
|
-
TRIANGLES_WRITTEN: 6;
|
|
35
|
-
}>;
|
|
36
|
-
/**
|
|
37
|
-
* Words of a job's counters.
|
|
38
|
-
* @type {number}
|
|
39
|
-
*/
|
|
40
|
-
export const VGEO_SDF_COUNTER_WORDS: number;
|
|
41
|
-
/**
|
|
42
|
-
* Words of a cluster list entry: its job, then its meshlet row.
|
|
43
|
-
* @type {number}
|
|
44
|
-
*/
|
|
45
|
-
export const VGEO_SDF_CLUSTER_WORDS: number;
|
|
46
|
-
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
47
|
-
//# sourceMappingURL=VGEO_SDF.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VGEO_SDF.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.js"],"names":[],"mappings":"AAsEA;;;;;;GAMG;AACH,iDAHW,MAAM,GACJ,MAAM,CAIlB;AArED;;;GAGG;AACH,gCAFU,YAAY,CAWA;AAEtB;;;;;;GAMG;AACH,kCAFU,YAAY,CAWL;AAEjB;;;;GAIG;AACH;;;;;;;;GAQG;AAEH;;;GAGG;AACH,qCAFU,MAAM,CAEwB;AAExC;;;GAGG;AACH,qCAFU,MAAM,CAEwB;6BAnEX,sCAAsC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { f32, u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
2
|
-
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
3
|
-
import { VGEO_CUT_STAT_COUNT } from "../runtime/layout/VGEO_CUT_STAT_COUNT.js";
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
The layouts of a vgeo geometry's proxy extraction (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): each geometry
|
|
7
|
-
whose cache is asked for is cut whole at half its cache's level-0 voxel, its cut's clusters listed, and, once a cut
|
|
8
|
-
stands nothing in, its vertices and triangles written out and read back for the proxy the mesh bake bakes.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The extraction's settings, an immediate of each of its passes.
|
|
13
|
-
* @type {WebGPUStruct}
|
|
14
|
-
*/
|
|
15
|
-
export const VGEO_SDF_SETTINGS = WebGPUStruct.from({
|
|
16
|
-
/** jobs the frame cuts */
|
|
17
|
-
job_count: u32,
|
|
18
|
-
/** entries the cluster list holds */
|
|
19
|
-
cluster_capacity: u32,
|
|
20
|
-
/** the word of the payload its vertices start at, 3 floats a vertex */
|
|
21
|
-
vertex_offset: u32,
|
|
22
|
-
/** the word of the payload its triangles start at, 3 indices a triangle */
|
|
23
|
-
index_offset: u32,
|
|
24
|
-
}, "VGeoSDFSettings");
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A job the frame cuts, as the host writes it: the vgeo geometry row it cuts and the projection constant that puts its
|
|
28
|
-
* error against a τ of 1, `1 / (½ voxel)` in the geometry's own units. A job the frame writes out (`decode` 1) has its
|
|
29
|
-
* room in the payload: `vertex_count` vertices from `vertex_base` and `triangle_count` triangles from `triangle_base`,
|
|
30
|
-
* what its last complete cut held.
|
|
31
|
-
* @type {WebGPUStruct}
|
|
32
|
-
*/
|
|
33
|
-
export const VGEO_SDF_JOB_STRUCT = WebGPUStruct.from({
|
|
34
|
-
vg_row: u32,
|
|
35
|
-
projection_k: f32,
|
|
36
|
-
decode: u32,
|
|
37
|
-
vertex_base: u32,
|
|
38
|
-
triangle_base: u32,
|
|
39
|
-
vertex_count: u32,
|
|
40
|
-
triangle_count: u32,
|
|
41
|
-
pad: u32,
|
|
42
|
-
}, "VGeoSDFJob");
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* A job's counters, atomics the frame's passes add into: the clusters its cut took, the stand-ins among them (a
|
|
46
|
-
* cluster taken for a page not resident or a group held), those dropped past the cluster list, the vertices and
|
|
47
|
-
* triangles of its listed clusters, and of those, what the decode wrote into its room.
|
|
48
|
-
*/
|
|
49
|
-
export const VGEO_SDF_COUNTER = Object.freeze({
|
|
50
|
-
TAKEN: 0,
|
|
51
|
-
STAND_INS: 1,
|
|
52
|
-
DROPPED: 2,
|
|
53
|
-
VERTICES: 3,
|
|
54
|
-
TRIANGLES: 4,
|
|
55
|
-
VERTICES_WRITTEN: 5,
|
|
56
|
-
TRIANGLES_WRITTEN: 6,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Words of a job's counters.
|
|
61
|
-
* @type {number}
|
|
62
|
-
*/
|
|
63
|
-
export const VGEO_SDF_COUNTER_WORDS = 8;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Words of a cluster list entry: its job, then its meshlet row.
|
|
67
|
-
* @type {number}
|
|
68
|
-
*/
|
|
69
|
-
export const VGEO_SDF_CLUSTER_WORDS = 2;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Words of the payload's header for `job_count` jobs: their counters, then the cut's own counters from its feedback
|
|
73
|
-
* slot (`VGEO_CUT_STAT`), which say whether the cut left a subtree undescended.
|
|
74
|
-
*
|
|
75
|
-
* @param {number} job_count
|
|
76
|
-
* @returns {number}
|
|
77
|
-
*/
|
|
78
|
-
export function vgeo_sdf_header_words(job_count) {
|
|
79
|
-
return job_count * VGEO_SDF_COUNTER_WORDS + VGEO_CUT_STAT_COUNT;
|
|
80
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lanes of the collect, a lane a job.
|
|
3
|
-
* @type {number}
|
|
4
|
-
*/
|
|
5
|
-
export const VGEO_SDF_COLLECT_WORKGROUP_SIZE: number;
|
|
6
|
-
/**
|
|
7
|
-
* The extraction's collect (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): a cut's instance record a job,
|
|
8
|
-
* as every cut's collect writes one (`chunk_vgeo_cut_instance`), its geometry's root page, lookup and claim width from
|
|
9
|
-
* the geometry's row. Cut in the geometry's own space, at a world error under half its cache's voxel: `k` the job's,
|
|
10
|
-
* the distance weight 0.
|
|
11
|
-
*
|
|
12
|
-
* @type {ComputeShader}
|
|
13
|
-
*/
|
|
14
|
-
export const shader_vgeo_sdf_collect: ComputeShader;
|
|
15
|
-
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
16
|
-
//# sourceMappingURL=shader_vgeo_sdf_collect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shader_vgeo_sdf_collect.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.js"],"names":[],"mappings":"AAUA;;;GAGG;AACH,8CAFU,MAAM,CAEkC;AAwClD;;;;;;;GAOG;AACH,sCAFU,aAAa,CAMpB;8BAhE2B,kCAAkC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { COLLECTION_U32_STRUCT_WRITE } from "../../../gpu_primitive/COLLECTION_U32_STRUCT_WRITE.js";
|
|
2
|
-
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
3
|
-
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
4
|
-
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
5
|
-
import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
6
|
-
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
7
|
-
import { chunk_vgeo_cut_instance } from "../runtime/cut/chunk_vgeo_cut_instance.js";
|
|
8
|
-
import { VGEO_INSTANCE_OFFSET } from "../runtime/layout/VGEO_INSTANCE_OFFSET.js";
|
|
9
|
-
import { VGEO_SDF_JOB_STRUCT, VGEO_SDF_SETTINGS } from "./VGEO_SDF.js";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Lanes of the collect, a lane a job.
|
|
13
|
-
* @type {number}
|
|
14
|
-
*/
|
|
15
|
-
export const VGEO_SDF_COLLECT_WORKGROUP_SIZE = 64;
|
|
16
|
-
|
|
17
|
-
const resources = new ShaderResourceSetDescriptor();
|
|
18
|
-
|
|
19
|
-
resources.setImmediate("settings", VGEO_SDF_SETTINGS);
|
|
20
|
-
|
|
21
|
-
resources.createGroup()
|
|
22
|
-
.addStorageBuffer("vgeo_sdf_jobs", WebGPUArray.from(VGEO_SDF_JOB_STRUCT))
|
|
23
|
-
.addStorageBuffer("vg_geometries", WebGPUArray.from(u32))
|
|
24
|
-
// a cut's instance records, and their claim widths for the scan
|
|
25
|
-
.addStorageBuffer("instances", WebGPUArray.from(u32), true)
|
|
26
|
-
.addStorageBuffer("claim_widths", COLLECTION_U32_STRUCT_WRITE, true);
|
|
27
|
-
|
|
28
|
-
const body = CodeChunk.from(
|
|
29
|
-
//language=WGSL
|
|
30
|
-
`
|
|
31
|
-
@compute @workgroup_size(${VGEO_SDF_COLLECT_WORKGROUP_SIZE})
|
|
32
|
-
fn main(@builtin(global_invocation_id) id: vec3<u32>) {
|
|
33
|
-
let job = id.x;
|
|
34
|
-
|
|
35
|
-
if (job >= settings.job_count) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// a job's record names its job where a view's names its mesh row: what its take lists the job's clusters under
|
|
40
|
-
let base = vg_instance_record(job, vgeo_sdf_jobs[job].vg_row, settings.job_count);
|
|
41
|
-
|
|
42
|
-
if (base == VG_INSTANCE_RECORD_NONE) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// no eye: at a distance weight of 0 the projection is the error itself over half the voxel, wherever it is
|
|
47
|
-
vg_store(base, ${VGEO_INSTANCE_OFFSET.EYE}u, 0.0);
|
|
48
|
-
vg_store(base, ${VGEO_INSTANCE_OFFSET.EYE + 1}u, 0.0);
|
|
49
|
-
vg_store(base, ${VGEO_INSTANCE_OFFSET.EYE + 2}u, 0.0);
|
|
50
|
-
vg_store(base, ${VGEO_INSTANCE_OFFSET.PROJECTION_K}u, vgeo_sdf_jobs[job].projection_k);
|
|
51
|
-
vg_store(base, ${VGEO_INSTANCE_OFFSET.DISTANCE_WEIGHT}u, 0.0);
|
|
52
|
-
}
|
|
53
|
-
`, [chunk_vgeo_cut_instance]);
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The extraction's collect (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): a cut's instance record a job,
|
|
57
|
-
* as every cut's collect writes one (`chunk_vgeo_cut_instance`), its geometry's root page, lookup and claim width from
|
|
58
|
-
* the geometry's row. Cut in the geometry's own space, at a world error under half its cache's voxel: `k` the job's,
|
|
59
|
-
* the distance weight 0.
|
|
60
|
-
*
|
|
61
|
-
* @type {ComputeShader}
|
|
62
|
-
*/
|
|
63
|
-
export const shader_vgeo_sdf_collect = ComputeShader.from({
|
|
64
|
-
label: "VGeo SDF Collect",
|
|
65
|
-
resources,
|
|
66
|
-
body,
|
|
67
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lanes of the decode, a workgroup a listed cluster: a lane a vertex, and a lane a triangle.
|
|
3
|
-
* @type {number}
|
|
4
|
-
*/
|
|
5
|
-
export const VGEO_SDF_DECODE_WORKGROUP_SIZE: number;
|
|
6
|
-
/**
|
|
7
|
-
* The extraction's decode (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): a workgroup a cluster the cut
|
|
8
|
-
* listed, dispatched by the list's count. Each adds its cluster's vertices and triangles to its job's counts, which
|
|
9
|
-
* size the job's room in a later frame. A job the host gives room this frame (`decode`) takes each cluster's share of
|
|
10
|
-
* it by atomic: the cluster's positions as they are stored, in the geometry's own space, and its triangles as indices
|
|
11
|
-
* into its job's vertices, which the host reads back as the proxy's mesh.
|
|
12
|
-
*
|
|
13
|
-
* @type {ComputeShader}
|
|
14
|
-
*/
|
|
15
|
-
export const shader_vgeo_sdf_decode: ComputeShader;
|
|
16
|
-
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
17
|
-
//# sourceMappingURL=shader_vgeo_sdf_decode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shader_vgeo_sdf_decode.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,6CAFU,MAAM,CAEuG;AAwGvH;;;;;;;;GAQG;AACH,qCAFU,aAAa,CAMpB;8BAzI2B,kCAAkC"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../../../core/assert.js";
|
|
2
|
-
import { COLLECTION_U32_STRUCT_READ } from "../../../gpu_primitive/COLLECTION_U32_STRUCT_READ.js";
|
|
3
|
-
import { chunk_meshlet_compute_attribute_section_offset } from "../../../shader/chunk/geometry/meshlet/chunk_meshlet_compute_attribute_section_offset.js";
|
|
4
|
-
import { chunk_read_meshlet_attribute_vec3f } from "../../../shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_vec3f.js";
|
|
5
|
-
import { chunk_read_meshlet_resolved_index } from "../../../shader/chunk/geometry/meshlet/chunk_read_meshlet_resolved_index.js";
|
|
6
|
-
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
7
|
-
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
8
|
-
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
9
|
-
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
10
|
-
import { atomic_u32, u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
11
|
-
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
12
|
-
import { GEOMETRY_ATTRIBUTE_DATA_TYPE } from "../../GEOMETRY_ATTRIBUTE_DATA_TYPE.js";
|
|
13
|
-
import { MESHLET_METADATA_STRUCT } from "../../meshlet/encoding/MESHLET_METADATA_STRUCT.js";
|
|
14
|
-
import { VGEO_MAX_CLUSTER_TRIANGLE_COUNT } from "../format/cluster/VGEO_MAX_CLUSTER_TRIANGLE_COUNT.js";
|
|
15
|
-
import { VGEO_MAX_CLUSTER_VERTEX_COUNT } from "../format/cluster/VGEO_MAX_CLUSTER_VERTEX_COUNT.js";
|
|
16
|
-
import {
|
|
17
|
-
VGEO_SDF_CLUSTER_WORDS,
|
|
18
|
-
VGEO_SDF_COUNTER,
|
|
19
|
-
VGEO_SDF_COUNTER_WORDS,
|
|
20
|
-
VGEO_SDF_JOB_STRUCT,
|
|
21
|
-
VGEO_SDF_SETTINGS
|
|
22
|
-
} from "./VGEO_SDF.js";
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Lanes of the decode, a workgroup a listed cluster: a lane a vertex, and a lane a triangle.
|
|
26
|
-
* @type {number}
|
|
27
|
-
*/
|
|
28
|
-
export const VGEO_SDF_DECODE_WORKGROUP_SIZE = Math.max(VGEO_MAX_CLUSTER_VERTEX_COUNT, VGEO_MAX_CLUSTER_TRIANGLE_COUNT);
|
|
29
|
-
|
|
30
|
-
assert.lessThanOrEqual(VGEO_SDF_DECODE_WORKGROUP_SIZE, 256, 'the decode\'s workgroup is within WebGPU\'s default invocation limit');
|
|
31
|
-
|
|
32
|
-
const resources = new ShaderResourceSetDescriptor();
|
|
33
|
-
|
|
34
|
-
resources.setImmediate("settings", VGEO_SDF_SETTINGS);
|
|
35
|
-
|
|
36
|
-
resources.createGroup()
|
|
37
|
-
.addStorageBuffer("vgeo_sdf_jobs", WebGPUArray.from(VGEO_SDF_JOB_STRUCT))
|
|
38
|
-
.addStorageBuffer("vgeo_sdf_counters", WebGPUArray.from(atomic_u32), true)
|
|
39
|
-
.addStorageBuffer("vgeo_sdf_clusters", COLLECTION_U32_STRUCT_READ)
|
|
40
|
-
.addStorageBuffer("meshlet_metadata", WebGPUArray.from(MESHLET_METADATA_STRUCT))
|
|
41
|
-
.addStorageBuffer("meshlet_data", GEOMETRY_ATTRIBUTE_DATA_TYPE)
|
|
42
|
-
// the readback's: its header, then the jobs' vertices, then their triangles
|
|
43
|
-
.addStorageBuffer("vgeo_sdf_payload", WebGPUArray.from(u32), true);
|
|
44
|
-
|
|
45
|
-
const body = CodeChunk.from(
|
|
46
|
-
//language=WGSL
|
|
47
|
-
`
|
|
48
|
-
var<workgroup> listed: u32;
|
|
49
|
-
var<workgroup> writes: u32;
|
|
50
|
-
var<workgroup> first_vertex: u32;
|
|
51
|
-
var<workgroup> first_triangle: u32;
|
|
52
|
-
|
|
53
|
-
@compute @workgroup_size(${VGEO_SDF_DECODE_WORKGROUP_SIZE})
|
|
54
|
-
fn main(
|
|
55
|
-
@builtin(workgroup_id) workgroup_id: vec3<u32>,
|
|
56
|
-
@builtin(local_invocation_index) lane: u32,
|
|
57
|
-
) {
|
|
58
|
-
let index = folded_workgroup_index(workgroup_id);
|
|
59
|
-
|
|
60
|
-
if (lane == 0u) {
|
|
61
|
-
listed = min(vgeo_sdf_clusters.count, settings.cluster_capacity);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// a folded dispatch's tail, and a count that ran past the list, leave whole
|
|
65
|
-
if (index >= workgroupUniformLoad(&listed)) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
let entry = ${VGEO_SDF_CLUSTER_WORDS}u * index;
|
|
70
|
-
let job = vgeo_sdf_clusters.elements[entry];
|
|
71
|
-
let meshlet = vgeo_sdf_clusters.elements[entry + 1u];
|
|
72
|
-
let header = meshlet_metadata[meshlet];
|
|
73
|
-
let counters = job * ${VGEO_SDF_COUNTER_WORDS}u;
|
|
74
|
-
|
|
75
|
-
// every job's size, what the host makes room by; a job written out this frame takes its cluster's room in it
|
|
76
|
-
if (lane == 0u) {
|
|
77
|
-
atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.VERTICES}u], header.vertex_count);
|
|
78
|
-
atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.TRIANGLES}u], header.primitive_count);
|
|
79
|
-
|
|
80
|
-
var write = 0u;
|
|
81
|
-
|
|
82
|
-
if (vgeo_sdf_jobs[job].decode != 0u) {
|
|
83
|
-
let vertex = atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.VERTICES_WRITTEN}u], header.vertex_count);
|
|
84
|
-
let triangle = atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.TRIANGLES_WRITTEN}u], header.primitive_count);
|
|
85
|
-
|
|
86
|
-
// a cut grown since the room was made writes nothing past it; the host sees the sizes disagree
|
|
87
|
-
if (vertex + header.vertex_count <= vgeo_sdf_jobs[job].vertex_count
|
|
88
|
-
&& triangle + header.primitive_count <= vgeo_sdf_jobs[job].triangle_count) {
|
|
89
|
-
first_vertex = vertex;
|
|
90
|
-
first_triangle = triangle;
|
|
91
|
-
write = 1u;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
writes = write;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (workgroupUniformLoad(&writes) == 0u) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
let vertex_base = first_vertex;
|
|
103
|
-
|
|
104
|
-
if (lane < header.vertex_count) {
|
|
105
|
-
let position = read_meshlet_attribute_vec3f(meshlet_compute_attribute_section_offset(header) + 3u * lane);
|
|
106
|
-
let word = settings.vertex_offset + 3u * (vgeo_sdf_jobs[job].vertex_base + vertex_base + lane);
|
|
107
|
-
|
|
108
|
-
vgeo_sdf_payload[word] = bitcast<u32>(position.x);
|
|
109
|
-
vgeo_sdf_payload[word + 1u] = bitcast<u32>(position.y);
|
|
110
|
-
vgeo_sdf_payload[word + 2u] = bitcast<u32>(position.z);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// the cluster's corners as indices into its job's vertices, clamped to its own as every reader of it clamps
|
|
114
|
-
if (lane < header.primitive_count) {
|
|
115
|
-
let word = settings.index_offset + 3u * (vgeo_sdf_jobs[job].triangle_base + first_triangle + lane);
|
|
116
|
-
|
|
117
|
-
for (var corner = 0u; corner < 3u; corner++) {
|
|
118
|
-
let local = min(read_meshlet_resolved_index(header, 3u * lane + corner), header.vertex_count - 1u);
|
|
119
|
-
|
|
120
|
-
vgeo_sdf_payload[word + corner] = vertex_base + local;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
`, [
|
|
125
|
-
MESHLET_METADATA_STRUCT.declaration_chunk,
|
|
126
|
-
chunk_folded_workgroup_index,
|
|
127
|
-
chunk_meshlet_compute_attribute_section_offset,
|
|
128
|
-
chunk_read_meshlet_attribute_vec3f,
|
|
129
|
-
chunk_read_meshlet_resolved_index,
|
|
130
|
-
]);
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The extraction's decode (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): a workgroup a cluster the cut
|
|
134
|
-
* listed, dispatched by the list's count. Each adds its cluster's vertices and triangles to its job's counts, which
|
|
135
|
-
* size the job's room in a later frame. A job the host gives room this frame (`decode`) takes each cluster's share of
|
|
136
|
-
* it by atomic: the cluster's positions as they are stored, in the geometry's own space, and its triangles as indices
|
|
137
|
-
* into its job's vertices, which the host reads back as the proxy's mesh.
|
|
138
|
-
*
|
|
139
|
-
* @type {ComputeShader}
|
|
140
|
-
*/
|
|
141
|
-
export const shader_vgeo_sdf_decode = ComputeShader.from({
|
|
142
|
-
label: "VGeo SDF Decode",
|
|
143
|
-
resources,
|
|
144
|
-
body,
|
|
145
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The extraction's cut (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): the camera cut's descent
|
|
3
|
-
* (`chunk_vgeo_cut_descent`) over the jobs' records, each geometry whole, at the error its record's projection constant
|
|
4
|
-
* sets against a τ of 1. Every cluster in the cut, a stand-in too, goes onto the cluster list under its job; a clamp
|
|
5
|
-
* wants its page through the extraction's own feedback slot, as the camera's do, so a job cut again each frame keeps
|
|
6
|
-
* its pages wanted until they arrive.
|
|
7
|
-
*
|
|
8
|
-
* @type {ComputeShader}
|
|
9
|
-
*/
|
|
10
|
-
export const shader_vgeo_sdf_traverse: ComputeShader;
|
|
11
|
-
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
12
|
-
//# sourceMappingURL=shader_vgeo_sdf_traverse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shader_vgeo_sdf_traverse.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.js"],"names":[],"mappings":"AA2FA;;;;;;;;GAQG;AACH,uCAFU,aAAa,CAMpB;8BApG2B,kCAAkC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { WebGPUExtensionType } from "../../../../descriptor/WebGPUExtensionType.js";
|
|
2
|
-
import { COLLECTION_U32_STRUCT_READ } from "../../../gpu_primitive/COLLECTION_U32_STRUCT_READ.js";
|
|
3
|
-
import { COLLECTION_U32_STRUCT_WRITE } from "../../../gpu_primitive/COLLECTION_U32_STRUCT_WRITE.js";
|
|
4
|
-
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
5
|
-
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
6
|
-
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
7
|
-
import { atomic_u32, u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
8
|
-
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
9
|
-
import { chunk_vgeo_cut_access } from "../runtime/cut/chunk_vgeo_cut_access.js";
|
|
10
|
-
import { chunk_vgeo_cut_descent } from "../runtime/cut/chunk_vgeo_cut_descent.js";
|
|
11
|
-
import { VGEO_CUT_PARAMS_STRUCT } from "../runtime/cut/VGEO_CUT_PARAMS_STRUCT.js";
|
|
12
|
-
import { VGEO_CUT_STAT } from "../runtime/layout/VGEO_CUT_STAT.js";
|
|
13
|
-
import { VGEO_INSTANCE_OFFSET } from "../runtime/layout/VGEO_INSTANCE_OFFSET.js";
|
|
14
|
-
import { VGEO_PAGE_ROW_OFFSET } from "../runtime/layout/VGEO_PAGE_ROW_OFFSET.js";
|
|
15
|
-
import { VGEO_SDF_CLUSTER_WORDS, VGEO_SDF_COUNTER, VGEO_SDF_COUNTER_WORDS, VGEO_SDF_SETTINGS } from "./VGEO_SDF.js";
|
|
16
|
-
|
|
17
|
-
const resources = new ShaderResourceSetDescriptor();
|
|
18
|
-
|
|
19
|
-
resources.setImmediate("settings", VGEO_SDF_SETTINGS);
|
|
20
|
-
|
|
21
|
-
resources.createGroup()
|
|
22
|
-
.addUniform("params", VGEO_CUT_PARAMS_STRUCT)
|
|
23
|
-
.addStorageBuffer("vg_lookup", WebGPUArray.from(u32), false)
|
|
24
|
-
.addStorageBuffer("vg_arena", WebGPUArray.from(u32), false)
|
|
25
|
-
;
|
|
26
|
-
|
|
27
|
-
resources.createGroup()
|
|
28
|
-
.addStorageBuffer("instances", WebGPUArray.from(u32), false)
|
|
29
|
-
.addStorageBuffer("queue_in", COLLECTION_U32_STRUCT_READ, false)
|
|
30
|
-
.addStorageBuffer("queue_out", COLLECTION_U32_STRUCT_WRITE, true)
|
|
31
|
-
;
|
|
32
|
-
|
|
33
|
-
resources.createGroup()
|
|
34
|
-
.addStorageBuffer("claim", WebGPUArray.from(atomic_u32), true)
|
|
35
|
-
.addStorageBuffer("feedback", WebGPUArray.from(atomic_u32), true)
|
|
36
|
-
.addStorageBuffer("vg_want_stamps", WebGPUArray.from(atomic_u32), true)
|
|
37
|
-
// a job's counters, `VGEO_SDF_COUNTER_WORDS` each
|
|
38
|
-
.addStorageBuffer("vgeo_sdf_counters", WebGPUArray.from(atomic_u32), true)
|
|
39
|
-
// the cut's clusters, a job and a meshlet row each; the count runs past what the list holds
|
|
40
|
-
.addStorageBuffer("vgeo_sdf_clusters", COLLECTION_U32_STRUCT_WRITE, true)
|
|
41
|
-
;
|
|
42
|
-
|
|
43
|
-
const body = CodeChunk.from(
|
|
44
|
-
//language=WGSL
|
|
45
|
-
`
|
|
46
|
-
/** A geometry is cut whole: nothing is outside. */
|
|
47
|
-
fn vg_cut_sphere_outside(instance_base: u32, sphere: vec4<f32>) -> bool {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
fn vg_cut_box_outside(instance_base: u32, lower: vec3<f32>, upper: vec3<f32>) -> bool {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* A cluster in the cut, a stand-in's too, onto the list as its job and its meshlet row. A stand-in, for a page not
|
|
57
|
-
* resident or a group not selectable, is counted against its job, whose cut is then not the one it asked for; past
|
|
58
|
-
* the list a cluster is dropped and counted, and its job's cut is incomplete too.
|
|
59
|
-
*/
|
|
60
|
-
fn vg_cut_take(instance_base: u32, page_row: u32, verdict: VGVerdict) {
|
|
61
|
-
let job = instances[instance_base + ${VGEO_INSTANCE_OFFSET.MESH_INDEX}u];
|
|
62
|
-
let counters = job * ${VGEO_SDF_COUNTER_WORDS}u;
|
|
63
|
-
|
|
64
|
-
atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.TAKEN}u], 1u);
|
|
65
|
-
|
|
66
|
-
if (verdict.kind != VG_VERDICT_TAKE) {
|
|
67
|
-
atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.STAND_INS}u], 1u);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
let slot = atomicAdd(&vgeo_sdf_clusters.count, 1u);
|
|
71
|
-
|
|
72
|
-
if (slot >= settings.cluster_capacity) {
|
|
73
|
-
atomicAdd(&vgeo_sdf_counters[counters + ${VGEO_SDF_COUNTER.DROPPED}u], 1u);
|
|
74
|
-
vg_stat(${VGEO_CUT_STAT.MESHLETS_DROPPED}u, 1u);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
let entry = ${VGEO_SDF_CLUSTER_WORDS}u * slot;
|
|
79
|
-
|
|
80
|
-
vgeo_sdf_clusters.elements[entry] = job;
|
|
81
|
-
vgeo_sdf_clusters.elements[entry + 1u] = vg_page_field(page_row, ${VGEO_PAGE_ROW_OFFSET.MESHLET_BASE}u) + verdict.cluster;
|
|
82
|
-
|
|
83
|
-
vg_stat(${VGEO_CUT_STAT.DRAWN}u, 1u);
|
|
84
|
-
}
|
|
85
|
-
`, [
|
|
86
|
-
chunk_vgeo_cut_descent,
|
|
87
|
-
chunk_vgeo_cut_access,
|
|
88
|
-
]);
|
|
89
|
-
|
|
90
|
-
body.addExtension(WebGPUExtensionType.Subgroups);
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* The extraction's cut (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.8, as S8 built it): the camera cut's descent
|
|
94
|
-
* (`chunk_vgeo_cut_descent`) over the jobs' records, each geometry whole, at the error its record's projection constant
|
|
95
|
-
* sets against a τ of 1. Every cluster in the cut, a stand-in too, goes onto the cluster list under its job; a clamp
|
|
96
|
-
* wants its page through the extraction's own feedback slot, as the camera's do, so a job cut again each frame keeps
|
|
97
|
-
* its pages wanted until they arrive.
|
|
98
|
-
*
|
|
99
|
-
* @type {ComputeShader}
|
|
100
|
-
*/
|
|
101
|
-
export const shader_vgeo_sdf_traverse = ComputeShader.from({
|
|
102
|
-
label: "VGeo SDF Cut",
|
|
103
|
-
resources,
|
|
104
|
-
body,
|
|
105
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk_hash_squirrel3.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_hash_squirrel3.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/shader/chunk/color/chunk_hash_squirrel3.js"],"names":[],"mappings":""}
|
|
File without changes
|