@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
|
@@ -6,19 +6,26 @@ import { BufferDescriptor } from "../../../../descriptor/buffer/BufferDescriptor
|
|
|
6
6
|
import { graph_read_buffer } from "../../../buffer/graph_read_buffer.js";
|
|
7
7
|
import { MESH_SDF_BRICK_TEXELS, MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
8
8
|
import { MESH_SDF_SAMPLER } from "../../../geometry/sdf/MESH_SDF_RESOURCES.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import {
|
|
10
|
+
WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION
|
|
11
|
+
} from "../../../gpu_primitive/indirect/WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.js";
|
|
12
|
+
import {
|
|
13
|
+
shader_slot_stack_fill,
|
|
14
|
+
SLOT_STACK_FILL_WORKGROUP_SIZE
|
|
15
|
+
} from "../../../gpu_primitive/slot_stack/shader_slot_stack_fill.js";
|
|
11
16
|
import {
|
|
12
17
|
shader_slot_stack_push_range,
|
|
13
18
|
SLOT_STACK_PUSH_RANGE_WORKGROUP_SIZE
|
|
14
19
|
} from "../../../gpu_primitive/slot_stack/shader_slot_stack_push_range.js";
|
|
15
|
-
import { CLIPMAP_LEVEL_ARRAY, CLIPMAP_LEVEL_STRUCT } from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
16
|
-
import { graph_import_buffer } from "../../../shader/graph/graph_import_buffer.js";
|
|
17
20
|
import { SCENE_MOVER_CAPACITY } from "../../../scene/movers/SCENE_MOVER_LAYOUT.js";
|
|
21
|
+
import {
|
|
22
|
+
CLIPMAP_LEVEL_ARRAY,
|
|
23
|
+
CLIPMAP_LEVEL_LIMIT,
|
|
24
|
+
CLIPMAP_LEVEL_STRUCT
|
|
25
|
+
} from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
26
|
+
import { graph_import_buffer } from "../../../shader/graph/graph_import_buffer.js";
|
|
18
27
|
import { GPUTileAtlas3D } from "../../../texture/atlas/GPUTileAtlas3D.js";
|
|
19
|
-
import { PROBE_CLIPMAP_CASCADE_COUNT_MAX, PROBE_CLIPMAP_CASCADE_RESOLUTIONS } from "../ProbeClipmapSettings.js";
|
|
20
28
|
import {
|
|
21
|
-
BRICK_CLIPMAP_UNKNOWN,
|
|
22
29
|
BRICK_OBJECT_CELLS,
|
|
23
30
|
BRICK_OCCUPANCY_BLOCK,
|
|
24
31
|
BRICK_STAGING_WORDS,
|
|
@@ -292,14 +299,18 @@ export class GPUBrickClipmap {
|
|
|
292
299
|
/**
|
|
293
300
|
* @param {GPUDevice} device
|
|
294
301
|
* @param {object} options
|
|
295
|
-
* @param {number} options.cascade_count
|
|
296
|
-
* @param {number} options.resolution
|
|
302
|
+
* @param {number} options.cascade_count at most the levels table holds, {@link CLIPMAP_LEVEL_LIMIT}
|
|
303
|
+
* @param {number} options.resolution a power of two, at least an occupancy block,
|
|
304
|
+
* {@link BRICK_OCCUPANCY_BLOCK}; the brick map's height, resolution · cascade_count, at most the
|
|
305
|
+
* device's `maxTextureDimension3D`
|
|
297
306
|
* @param {number} options.voxel_size metres
|
|
298
307
|
*/
|
|
299
308
|
constructor(device, { cascade_count, resolution, voxel_size }) {
|
|
300
309
|
assert.isPositiveInteger(cascade_count, 'cascade_count');
|
|
301
|
-
assert.lessThanOrEqual(cascade_count,
|
|
302
|
-
assert.
|
|
310
|
+
assert.lessThanOrEqual(cascade_count, CLIPMAP_LEVEL_LIMIT, "cascade_count, the levels table's length");
|
|
311
|
+
assert.isPositiveInteger(resolution, 'resolution');
|
|
312
|
+
assert.greaterThanOrEqual(resolution, BRICK_OCCUPANCY_BLOCK, 'resolution, an occupancy block');
|
|
313
|
+
assert.lessThanOrEqual(resolution * cascade_count, device.limits.maxTextureDimension3D, "resolution · cascade_count, the brick map's height, past maxTextureDimension3D");
|
|
303
314
|
assert.isFinite(voxel_size, 'voxel_size');
|
|
304
315
|
assert.greaterThan(voxel_size, 0, 'voxel_size');
|
|
305
316
|
|
|
@@ -386,7 +397,8 @@ export class GPUBrickClipmap {
|
|
|
386
397
|
this.#levels = device.createBuffer(BufferDescriptor.fromJSON({
|
|
387
398
|
label: 'Probe clipmap / brick levels',
|
|
388
399
|
size: CLIPMAP_LEVEL_ARRAY.size,
|
|
389
|
-
|
|
400
|
+
// the world light clusters read the windows from its front as storage
|
|
401
|
+
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST,
|
|
390
402
|
}));
|
|
391
403
|
}
|
|
392
404
|
|
|
@@ -545,7 +557,7 @@ export class GPUBrickClipmap {
|
|
|
545
557
|
device.queue.writeBuffer(this.#runs, 0, this.#runs_data, 0, 8 * this.#run_count);
|
|
546
558
|
}
|
|
547
559
|
|
|
548
|
-
device.queue.writeBuffer(this.#levels, 0, this.#levels_data);
|
|
560
|
+
device.queue.writeBuffer(this.#levels, 0, this.#levels_data, 0, this.cascade_count * CLIPMAP_LEVEL_STRUCT.aligned_size);
|
|
549
561
|
|
|
550
562
|
// the rows the movers read this frame; what comes after is the next frame's
|
|
551
563
|
const rows = this.#invalidated_count;
|
|
@@ -943,6 +955,9 @@ export class GPUBrickClipmap {
|
|
|
943
955
|
* @returns {GPUBuffer}
|
|
944
956
|
*/
|
|
945
957
|
#create_buffer(name, size, usage) {
|
|
958
|
+
// bound whole, as storage
|
|
959
|
+
assert.lessThanOrEqual(size, this.#device.limits.maxStorageBufferBindingSize, `${name} past maxStorageBufferBindingSize`);
|
|
960
|
+
|
|
946
961
|
return this.#device.createBuffer(BufferDescriptor.fromJSON({
|
|
947
962
|
label: `Probe clipmap / ${name}`,
|
|
948
963
|
size,
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_brick_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_brick_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js"],"names":[],"mappings":"AA4BA;;;GAGG;AACH,mCAFU,wBAAwB,CAE4F;AAE9H;;;;;GAKG;AACH,kCAFU,wBAAwB,CAEuE;AAEzG;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;GAIG;AACH,qCAFU,wBAAwB,CAEgG;AAElI;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;GAIG;AACH,qCAFU,wBAAwB,CAEmF;AAErH;;;;;;;;;;;;;;;;GAgBG;AACH,kCAFU,SAAS,CAwDhB;AAEH;;;;;;;;;;GAUG;AACH,0CAFU,SAAS,CAmBhB;AAMH;;;;;;;;;;GAUG;AACH,kDAFU,SAAS,CAYhB;yCAnMsC,sDAAsD;0BADrE,uCAAuC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { MESH_SDF_BAND_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
2
|
+
import { chunk_clipmap_key } from "../../../shader/chunk/clipmap/chunk_clipmap_key.js";
|
|
1
3
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
2
4
|
import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
|
|
3
5
|
import { atomic_u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
4
6
|
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
5
|
-
import { MESH_SDF_BAND_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
6
7
|
import {
|
|
7
8
|
BRICK_CELL_WORKGROUP_SIZE,
|
|
8
9
|
BRICK_CLIPMAP_EMPTY,
|
|
@@ -112,19 +113,19 @@ const BRICK_TAKE_FIRST = ${BRICK_TAKE_FIRST}u;
|
|
|
112
113
|
const BRICK_TAKE_COUNT = ${BRICK_TAKE_COUNT}u;
|
|
113
114
|
|
|
114
115
|
fn brick_clipmap_key(cascade: u32, storage: vec3<u32>, resolution: u32) -> u32 {
|
|
115
|
-
return (cascade
|
|
116
|
+
return clipmap_key(cascade, storage, resolution);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
fn brick_clipmap_key_cascade(key: u32, resolution: u32) -> u32 {
|
|
119
|
-
return key
|
|
120
|
+
return clipmap_key_cascade(key, resolution);
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
fn brick_clipmap_key_storage(key: u32, resolution: u32) -> vec3<u32> {
|
|
123
|
-
return
|
|
124
|
+
return clipmap_key_storage(key, resolution);
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
fn brick_clipmap_map_texel(cascade: u32, storage: vec3<u32>, resolution: u32) -> vec3<u32> {
|
|
127
|
-
return
|
|
128
|
+
return clipmap_stacked_texel(cascade, storage, resolution);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
fn brick_clipmap_entry_holds_slot(entry: u32) -> bool {
|
|
@@ -132,9 +133,13 @@ fn brick_clipmap_entry_holds_slot(entry: u32) -> bool {
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
fn brick_clipmap_byte_voxels(byte: u32) -> f32 {
|
|
135
|
-
|
|
136
|
+
const scale = 2.0 * BRICK_CLIPMAP_BAND_VOXELS / 255.0;
|
|
137
|
+
|
|
138
|
+
return fma(f32(byte), scale, -BRICK_CLIPMAP_BAND_VOXELS);
|
|
136
139
|
}
|
|
137
|
-
|
|
140
|
+
`, [
|
|
141
|
+
chunk_clipmap_key,
|
|
142
|
+
]);
|
|
138
143
|
|
|
139
144
|
/**
|
|
140
145
|
* Queue a key unless it is already pending: set its bit, and append it to the ring when the bit was
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,gCAFU,MAAM,CAEwB;AAExC;;;GAGG;AACH,yCAFU,wBAAwB,CAEoE;AAEtG;;;GAGG;AACH,+CAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAE6E;AAE/G;;;;;;;;;;;;;GAaG;AACH,yCAFU,SAAS,CAsCZ;AAKP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAyBZ;AAIP;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wCAFU,SAAS,CAgFZ;AAKP;;;;;;;;;;;;;;;;;;GAkBG;AACH,wCAFU,SAAS,CAoGZ;AAEP;;;;;;;;;;;;GAYG;AACH,2CAFU,SAAS,CAsCZ;AAIP;;;;;;;;;;;;;;GAcG;AACH,2CAFU,SAAS,CA0BZ;AAEP;;;;;;;;;;;;;;GAcG;AACH,yCAFU,SAAS,CAqBZ;yCA9fkC,sDAAsD;0BADrE,uCAAuC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { MESH_SDF_BRICK_TEXELS, MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
2
2
|
import { MESH_SDF_SAMPLER } from "../../../geometry/sdf/MESH_SDF_RESOURCES.js";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
CLIPMAP_LEVEL_ARRAY,
|
|
5
|
+
CLIPMAP_LEVEL_LIMIT,
|
|
6
|
+
CLIPMAP_LEVEL_STRUCT
|
|
7
|
+
} from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
4
8
|
import { chunk_aabb3_distance_to_ray_v2 } from "../../../shader/chunk/geometry/aabb3/chunk_aabb3_distance_to_ray_v2.js";
|
|
5
9
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
6
10
|
import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
|
|
@@ -92,7 +96,9 @@ fn brick_clipmap_tap(slot: u32, local: vec3<f32>) -> f32 {
|
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
fn brick_clipmap_sample(slot: u32, local: vec3<f32>, voxel: f32) -> f32 {
|
|
95
|
-
|
|
99
|
+
let band = BRICK_CLIPMAP_BAND_VOXELS * voxel;
|
|
100
|
+
|
|
101
|
+
return fma(brick_clipmap_tap(slot, local), 2.0 * band, -band);
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
fn brick_clipmap_normal(slot: u32, local: vec3<f32>) -> vec3<f32> {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* `mesh_brick_accept` is the gather's leaf filter, with `bounds` the row's world box and `voxel` the
|
|
11
11
|
* cascade's: the row is in the SDF world, its geometry's field is resident (a skinned clone's through
|
|
12
12
|
* its source's, the hook), and its box resolves in the cascade (`brick_provider_resolves`). A virtual
|
|
13
|
-
* geometry's
|
|
14
|
-
*
|
|
13
|
+
* geometry's header is an alias of its proxy's (§7.8), so its rows are taken as a mesh's are, once the
|
|
14
|
+
* proxy's field is resident.
|
|
15
15
|
*
|
|
16
16
|
* `mesh_brick_instance` makes the instance the texels sample: the inverse of its transform, its box,
|
|
17
17
|
* its smallest axis scale, and the coarsest level of its field no coarser than the cascade,
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js
CHANGED
|
@@ -19,8 +19,8 @@ import { MESH_BRICK_INSTANCE_STRUCT } from "./MESH_BRICK_INSTANCE_STRUCT.js";
|
|
|
19
19
|
* `mesh_brick_accept` is the gather's leaf filter, with `bounds` the row's world box and `voxel` the
|
|
20
20
|
* cascade's: the row is in the SDF world, its geometry's field is resident (a skinned clone's through
|
|
21
21
|
* its source's, the hook), and its box resolves in the cascade (`brick_provider_resolves`). A virtual
|
|
22
|
-
* geometry's
|
|
23
|
-
*
|
|
22
|
+
* geometry's header is an alias of its proxy's (§7.8), so its rows are taken as a mesh's are, once the
|
|
23
|
+
* proxy's field is resident.
|
|
24
24
|
*
|
|
25
25
|
* `mesh_brick_instance` makes the instance the texels sample: the inverse of its transform, its box,
|
|
26
26
|
* its smallest axis scale, and the coarsest level of its field no coarser than the cascade,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_mesh_brick_walk.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_mesh_brick_walk.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,oCAFU,SAAS,CAoChB;0BAnEuB,0CAA0C"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { chunk_divide_round_up_u32 } from "../../../../shader/chunk/math/chunk_divide_round_up_u32.js";
|
|
1
2
|
import { CodeChunk } from "../../../../shader/compiler/CodeChunk.js";
|
|
2
3
|
import {
|
|
3
4
|
MESH_BRICK_ACCUMULATOR_FLAGS,
|
|
@@ -53,7 +54,7 @@ fn mesh_brick_walk_spill_index(slot: u32, start: u32) -> u32 {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
fn mesh_brick_records(entries: u32) -> u32 {
|
|
56
|
-
return (entries
|
|
57
|
+
return divide_round_up_u32(entries, MESH_BRICK_BATCH);
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
fn mesh_brick_record(index: u32) -> u32 {
|
|
@@ -63,4 +64,6 @@ fn mesh_brick_record(index: u32) -> u32 {
|
|
|
63
64
|
fn mesh_brick_accumulator(build: u32) -> u32 {
|
|
64
65
|
return build * MESH_BRICK_ACCUMULATOR_WORDS;
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
+
`, [
|
|
68
|
+
chunk_divide_round_up_u32,
|
|
69
|
+
]);
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js
CHANGED
|
@@ -14,9 +14,9 @@ import { atomic_u32, u32 } from "../../../../shader/type/WEBGPU_WGSL_PRIMITIVE_T
|
|
|
14
14
|
import { WebGPUArray } from "../../../../shader/type/WebGPUArray.js";
|
|
15
15
|
import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
|
|
16
16
|
import { BRICK_CELL_WORKGROUP_SIZE, BRICK_OBJECT_CELLS_PER_AXIS } from "../BRICK_CLIPMAP.js";
|
|
17
|
+
import { BRICK_RING_RESOURCE, BRICK_TAKE_RESOURCE, chunk_brick_clipmap } from "../chunk_brick_clipmap.js";
|
|
17
18
|
import { chunk_brick_object } from "../chunk_brick_object.js";
|
|
18
19
|
import { chunk_brick_provider } from "../chunk_brick_provider.js";
|
|
19
|
-
import { BRICK_RING_RESOURCE, BRICK_TAKE_RESOURCE, chunk_brick_clipmap } from "../chunk_brick_clipmap.js";
|
|
20
20
|
import { chunk_mesh_brick_instance } from "./chunk_mesh_brick_instance.js";
|
|
21
21
|
import { chunk_mesh_brick_texel } from "./chunk_mesh_brick_texel.js";
|
|
22
22
|
import { chunk_mesh_brick_walk } from "./chunk_mesh_brick_walk.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_mesh_brick_gather.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_mesh_brick_gather.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js"],"names":[],"mappings":"AAyCA;;GAEG;AACH,yCAFU,YAAY,CAeQ;AA0V9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,uCAFU,aAAa,CAMpB;6BApa0B,yCAAyC;8BAJxC,qCAAqC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js
CHANGED
|
@@ -10,7 +10,9 @@ import {
|
|
|
10
10
|
} from "../../../../shader/chunk/bvh/chunk_bvh_query_aabb_frontier.js";
|
|
11
11
|
import { CLIPMAP_LEVEL_ARRAY } from "../../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
12
12
|
import { chunk_folded_workgroup_index } from "../../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
chunk_subgroup_reserve_workgroup
|
|
15
|
+
} from "../../../../shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.js";
|
|
14
16
|
import { CodeChunk } from "../../../../shader/compiler/CodeChunk.js";
|
|
15
17
|
import { ComputeShader } from "../../../../shader/ComputeShader.js";
|
|
16
18
|
import { ShaderResourceSetDescriptor } from "../../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
@@ -18,8 +20,8 @@ import { atomic_u32, u32 } from "../../../../shader/type/WEBGPU_WGSL_PRIMITIVE_T
|
|
|
18
20
|
import { WebGPUArray } from "../../../../shader/type/WebGPUArray.js";
|
|
19
21
|
import { WebGPUStruct } from "../../../../shader/type/WebGPUStruct.js";
|
|
20
22
|
import { BRICK_CELL_WORKGROUP_SIZE } from "../BRICK_CLIPMAP.js";
|
|
21
|
-
import { chunk_brick_provider } from "../chunk_brick_provider.js";
|
|
22
23
|
import { BRICK_RING_RESOURCE, BRICK_TAKE_RESOURCE, chunk_brick_clipmap } from "../chunk_brick_clipmap.js";
|
|
24
|
+
import { chunk_brick_provider } from "../chunk_brick_provider.js";
|
|
23
25
|
import { chunk_mesh_brick_instance } from "./chunk_mesh_brick_instance.js";
|
|
24
26
|
import { chunk_mesh_brick_walk } from "./chunk_mesh_brick_walk.js";
|
|
25
27
|
import {
|
|
@@ -275,7 +277,7 @@ fn main(
|
|
|
275
277
|
for (var level = 0u; level < ${BVH_QUERY_AABB_LEVEL_BUDGET}u && expand_count != 0u; level++) {
|
|
276
278
|
let list = level & 1u;
|
|
277
279
|
let next = list ^ 1u;
|
|
278
|
-
let iterations = (expand_count
|
|
280
|
+
let iterations = mesh_brick_records(expand_count);
|
|
279
281
|
|
|
280
282
|
// where this iteration's children start on the next list
|
|
281
283
|
var start = 0u;
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js
CHANGED
|
@@ -5,8 +5,8 @@ import { ShaderResourceSetDescriptor } from "../../../../shader/resource/ShaderR
|
|
|
5
5
|
import { atomic_u32 } from "../../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
6
6
|
import { WebGPUArray } from "../../../../shader/type/WebGPUArray.js";
|
|
7
7
|
import { BRICK_CELL_WORKGROUP_SIZE, BRICK_OBJECT_CELLS_PER_AXIS } from "../BRICK_CLIPMAP.js";
|
|
8
|
-
import { chunk_brick_object } from "../chunk_brick_object.js";
|
|
9
8
|
import { BRICK_STAGING_RESOURCE, chunk_brick_clipmap } from "../chunk_brick_clipmap.js";
|
|
9
|
+
import { chunk_brick_object } from "../chunk_brick_object.js";
|
|
10
10
|
import { chunk_mesh_brick_walk } from "./chunk_mesh_brick_walk.js";
|
|
11
11
|
import { MESH_BRICK_COUNTER_RESOLVE_GROUPS, MESH_BRICK_STATISTIC_CELLS_RETRIED } from "./MESH_BRICK.js";
|
|
12
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_brick_clipmap_free.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.js"],"names":[],"mappings":"AAoBA;;GAEG;AACH,kCAFU,YAAY,CAOE;AAexB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wCAFU,aAAa,CAgFpB;
|
|
1
|
+
{"version":3,"file":"shader_brick_clipmap_free.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.js"],"names":[],"mappings":"AAoBA;;GAEG;AACH,kCAFU,YAAY,CAOE;AAexB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wCAFU,aAAa,CAgFpB;6BAtI0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MESH_SDF_BRICK_TEXEL_COUNT } from "../../../geometry/sdf/MESH_SDF.js";
|
|
1
2
|
import { chunk_slot_stack } from "../../../gpu_primitive/slot_stack/chunk_slot_stack.js";
|
|
2
3
|
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
3
4
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
@@ -5,7 +6,6 @@ import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
|
5
6
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
6
7
|
import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
7
8
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
8
|
-
import { MESH_SDF_BRICK_TEXEL_COUNT } from "../../../geometry/sdf/MESH_SDF.js";
|
|
9
9
|
import { BRICK_CELL_WORKGROUP_SIZE } from "./BRICK_CLIPMAP.js";
|
|
10
10
|
import {
|
|
11
11
|
BRICK_FREE_RESOURCE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_brick_clipmap_movers_command.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_movers_command.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_brick_clipmap_movers_command.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_movers_command.js"],"names":[],"mappings":"AAkBA;;GAEG;AACH,4CAFU,YAAY,CAWW;AAUjC;;;;;;;;;GASG;AACH,kDAFU,aAAa,CAqCpB;6BA7E0B,sCAAsC;8BAJrC,kCAAkC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chunk_folded_dispatch } from "../../../gpu_primitive/indirect/chunk_folded_dispatch.js";
|
|
2
2
|
import { SCENE_MOVERS_READ_STRUCT } from "../../../scene/movers/SCENE_MOVER_LAYOUT.js";
|
|
3
|
+
import { chunk_divide_round_up_u32 } from "../../../shader/chunk/math/chunk_divide_round_up_u32.js";
|
|
3
4
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
4
5
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
5
6
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
@@ -72,13 +73,14 @@ fn main() {
|
|
|
72
73
|
let pairs = select(boxes * settings.block_count, 0u, everything);
|
|
73
74
|
let keys = select(0u, settings.key_count, everything);
|
|
74
75
|
|
|
75
|
-
write_folded_dispatch(${BRICK_MOVERS_PAIR_DISPATCH}u, (pairs
|
|
76
|
-
write_folded_dispatch(${BRICK_MOVERS_REQUEUE_DISPATCH}u, (keys
|
|
76
|
+
write_folded_dispatch(${BRICK_MOVERS_PAIR_DISPATCH}u, divide_round_up_u32(pairs, ${BRICK_MOVERS_WORKGROUP_SIZE}u));
|
|
77
|
+
write_folded_dispatch(${BRICK_MOVERS_REQUEUE_DISPATCH}u, divide_round_up_u32(keys, ${BRICK_MOVERS_WORKGROUP_SIZE}u));
|
|
77
78
|
|
|
78
79
|
brick_movers[${BRICK_MOVERS_BOX_COUNT}u] = select(boxes, 0u, everything);
|
|
79
80
|
brick_movers[${BRICK_MOVERS_SCENE_COUNT}u] = movers;
|
|
80
81
|
}
|
|
81
82
|
`, [
|
|
83
|
+
chunk_divide_round_up_u32,
|
|
82
84
|
chunk_folded_dispatch,
|
|
83
85
|
]),
|
|
84
86
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_brick_clipmap_scroll.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.js"],"names":[],"mappings":"AAkBA;;GAEG;AACH,oCAFU,YAAY,CAeI;AAe1B;;;;;;;;;;;GAWG;AACH,0CAFU,aAAa,CAoEpB;
|
|
1
|
+
{"version":3,"file":"shader_brick_clipmap_scroll.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.js"],"names":[],"mappings":"AAkBA;;GAEG;AACH,oCAFU,YAAY,CAeI;AAe1B;;;;;;;;;;;GAWG;AACH,0CAFU,aAAa,CAoEpB;6BAxH0B,sCAAsC;8BAJrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_scroll.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { chunk_slot_stack } from "../../../gpu_primitive/slot_stack/chunk_slot_stack.js";
|
|
1
2
|
import { chunk_clipmap_storage_coord } from "../../../shader/chunk/clipmap/chunk_clipmap_storage_coord.js";
|
|
2
3
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
3
4
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
@@ -5,7 +6,6 @@ import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderReso
|
|
|
5
6
|
import { u32, vec4i } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
6
7
|
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
7
8
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
8
|
-
import { chunk_slot_stack } from "../../../gpu_primitive/slot_stack/chunk_slot_stack.js";
|
|
9
9
|
import { BRICK_OCCUPANCY_BLOCK, BRICK_THREAD_WORKGROUP_SIZE } from "./BRICK_CLIPMAP.js";
|
|
10
10
|
import {
|
|
11
11
|
BRICK_FREE_RESOURCE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_brick_clipmap_store.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js"],"names":[],"mappings":"AAoBA;;GAEG;AACH,mCAFU,YAAY,CASG;AAgBzB;;;;;;;;;;;GAWG;AACH,yCAFU,aAAa,CAsEpB;
|
|
1
|
+
{"version":3,"file":"shader_brick_clipmap_store.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js"],"names":[],"mappings":"AAoBA;;GAEG;AACH,mCAFU,YAAY,CASG;AAgBzB;;;;;;;;;;;GAWG;AACH,yCAFU,aAAa,CAsEpB;6BAtH0B,sCAAsC;8BAJrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MESH_SDF_BRICK_TEXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
1
2
|
import { chunk_slot_stack } from "../../../gpu_primitive/slot_stack/chunk_slot_stack.js";
|
|
2
3
|
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
3
4
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
@@ -7,7 +8,6 @@ import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
|
7
8
|
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
8
9
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
9
10
|
import { chunk_tile_atlas_slot_origin } from "../../../texture/atlas/chunk_tile_atlas_slot_origin.js";
|
|
10
|
-
import { MESH_SDF_BRICK_TEXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
11
11
|
import { BRICK_CELL_WORKGROUP_SIZE } from "./BRICK_CLIPMAP.js";
|
|
12
12
|
import {
|
|
13
13
|
BRICK_FREE_RESOURCE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_brick_clipmap_take.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_brick_clipmap_take.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js"],"names":[],"mappings":"AAUA;;GAEG;AACH,kCAFU,YAAY,CAKE;AAUxB;;;;;;;;;;;GAWG;AACH,wCAFU,aAAa,CA4CpB;6BAzE0B,sCAAsC;8BAJrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { chunk_folded_dispatch } from "../../../gpu_primitive/indirect/chunk_folded_dispatch.js";
|
|
2
|
+
import { chunk_divide_round_up_u32 } from "../../../shader/chunk/math/chunk_divide_round_up_u32.js";
|
|
2
3
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
3
4
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
4
5
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
@@ -70,10 +71,11 @@ fn main() {
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
write_folded_dispatch(BRICK_TAKE_CELL_DISPATCH, taken);
|
|
73
|
-
write_folded_dispatch(BRICK_TAKE_WORD_DISPATCH, (taken * BRICK_STAGING_WORDS
|
|
74
|
+
write_folded_dispatch(BRICK_TAKE_WORD_DISPATCH, divide_round_up_u32(taken * BRICK_STAGING_WORDS, BRICK_THREAD_WORKGROUP_SIZE));
|
|
74
75
|
}
|
|
75
76
|
`, [
|
|
76
77
|
chunk_brick_clipmap,
|
|
78
|
+
chunk_divide_round_up_u32,
|
|
77
79
|
chunk_folded_dispatch,
|
|
78
80
|
]),
|
|
79
81
|
});
|
|
@@ -3,14 +3,14 @@ import { TextureResourceDescriptor } from "../../../../device/graph/TextureResou
|
|
|
3
3
|
import { GPU_DATABASE_NULL } from "../../../buffer/table/GPU_DATABASE_NULL.js";
|
|
4
4
|
import { CAMERA_UNIFORM_STRUCT } from "../../../camera/CAMERA_UNIFORM_STRUCT.js";
|
|
5
5
|
import { chunk_mesh_card_surface } from "../../../geometry/sdf/cards/chunk_mesh_card_surface.js";
|
|
6
|
-
import { chunk_mesh_sdf_normal } from "../../../geometry/sdf/chunk_mesh_sdf_normal.js";
|
|
7
|
-
import { chunk_mesh_sdf_header } from "../../../geometry/sdf/chunk_mesh_sdf_sample.js";
|
|
8
6
|
import {
|
|
9
7
|
MESH_CARD_ALBEDO_RESOURCE,
|
|
10
8
|
MESH_CARD_EMISSIVE_RESOURCE,
|
|
11
9
|
MESH_CARD_ROWS_RESOURCE,
|
|
12
10
|
MESH_CARD_SETS_RESOURCE
|
|
13
11
|
} from "../../../geometry/sdf/cards/MESH_CARD_RESOURCES.js";
|
|
12
|
+
import { chunk_mesh_sdf_normal } from "../../../geometry/sdf/chunk_mesh_sdf_normal.js";
|
|
13
|
+
import { chunk_mesh_sdf_header } from "../../../geometry/sdf/chunk_mesh_sdf_sample.js";
|
|
14
14
|
import {
|
|
15
15
|
MESH_SDF_ATLAS_RESOURCE,
|
|
16
16
|
MESH_SDF_HEADERS_RESOURCE,
|