@woosh/meep-engine 3.60.6 → 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/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/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.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +6 -6
- 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/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/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/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_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/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/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_with_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao_with_irradiance.js +8 -7
- 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/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/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
|
@@ -5,10 +5,10 @@ import { invokeObjectHash } from "../../../../core/model/object/invokeObjectHash
|
|
|
5
5
|
import { BufferBindingLayout } from "../../../descriptor/binding/BufferBindingLayout.js";
|
|
6
6
|
import { ComputePipelineDescriptor } from "../../../descriptor/pipeline/compute/ComputePipelineDescriptor.js";
|
|
7
7
|
import { BufferResourceDescriptor } from "../../../device/graph/BufferResourceDescriptor.js";
|
|
8
|
+
import { chunk_divide_round_up_u32 } from "../../shader/chunk/math/chunk_divide_round_up_u32.js";
|
|
9
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
10
|
+
import { chunk_folded_dispatch } from "./chunk_folded_dispatch.js";
|
|
8
11
|
import { STRUCT_DISPATCH_COMPUTE_COMMAND } from "./STRUCT_DISPATCH_COMPUTE_COMMAND.js";
|
|
9
|
-
import {
|
|
10
|
-
WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION
|
|
11
|
-
} from "./WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* How a workgroup count that does not fit one dimension is spread over three.
|
|
@@ -78,39 +78,30 @@ function create_pipeline(key) {
|
|
|
78
78
|
|
|
79
79
|
//language=WGSL
|
|
80
80
|
const folded_dispatch = `
|
|
81
|
-
|
|
82
|
-
const LIMIT = ${WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION}u;
|
|
83
|
-
|
|
84
|
-
// x to the limit, what is left of it in rows of x, what is left of those in slices of x*y
|
|
85
|
-
let rows = divide_round_up(desired_groups, LIMIT);
|
|
86
|
-
let slices = divide_round_up(rows, LIMIT);
|
|
81
|
+
let folded = folded_dispatch(desired_groups);
|
|
87
82
|
|
|
88
83
|
// field by field, as shader_prefix_sum_to_command writes it: the WGSL emulator drops a whole-struct
|
|
89
84
|
// store into a storage variable, and this is the text folded_dispatch_width.spec.js runs
|
|
90
|
-
command.workgroupCountX =
|
|
91
|
-
command.workgroupCountY =
|
|
92
|
-
command.workgroupCountZ =
|
|
85
|
+
command.workgroupCountX = folded.x;
|
|
86
|
+
command.workgroupCountY = folded.y;
|
|
87
|
+
command.workgroupCountZ = folded.z;`;
|
|
93
88
|
|
|
94
89
|
//language=WGSL
|
|
95
|
-
const shader_code = `
|
|
90
|
+
const shader_code = CodeChunk.from(`
|
|
96
91
|
${STRUCT_DISPATCH_COMPUTE_COMMAND.wgsl_declaration}
|
|
97
92
|
|
|
98
93
|
@group(0) @binding(0) var<storage, read> input : u32;
|
|
99
94
|
@group(0) @binding(1) var<storage, read_write> command : ${STRUCT_DISPATCH_COMPUTE_COMMAND.wgsl_ref};
|
|
100
95
|
|
|
101
|
-
fn divide_round_up(value: u32, divisor: u32) -> u32 {
|
|
102
|
-
return (value + divisor - 1u) / divisor;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
96
|
@compute @workgroup_size(1, 1, 1)
|
|
106
97
|
fn main(){
|
|
107
98
|
|
|
108
99
|
let elements_per_group = ${key.elements_per_workgroup}u;
|
|
109
|
-
let desired_groups =
|
|
100
|
+
let desired_groups = divide_round_up_u32(input, elements_per_group);
|
|
110
101
|
${key.fold ? folded_dispatch : clamped_dispatch}
|
|
111
102
|
|
|
112
103
|
}
|
|
113
|
-
|
|
104
|
+
`, key.fold ? [chunk_divide_round_up_u32, chunk_folded_dispatch] : [chunk_divide_round_up_u32]).compile().text;
|
|
114
105
|
|
|
115
106
|
return ComputePipelineDescriptor.simplified({
|
|
116
107
|
label: key.fold ? "IndirectComputeCommandBuildPass/folded" : "IndirectComputeCommandBuildPass",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_folded_dispatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/indirect/chunk_folded_dispatch.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_folded_dispatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/indirect/chunk_folded_dispatch.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,oCAFU,SAAS,CAehB;0BAhCuB,oCAAoC"}
|
|
@@ -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 { WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION } from "./WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.js";
|
|
3
4
|
|
|
@@ -23,9 +24,11 @@ export const chunk_folded_dispatch = CodeChunk.from(
|
|
|
23
24
|
fn folded_dispatch(groups: u32) -> vec3<u32> {
|
|
24
25
|
const LIMIT = ${WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION}u;
|
|
25
26
|
|
|
26
|
-
let rows = (groups
|
|
27
|
-
let slices = (rows
|
|
27
|
+
let rows = divide_round_up_u32(groups, LIMIT);
|
|
28
|
+
let slices = divide_round_up_u32(rows, LIMIT);
|
|
28
29
|
|
|
29
30
|
return vec3<u32>(min(groups, LIMIT), min(max(rows, 1u), LIMIT), max(slices, 1u));
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
`, [
|
|
33
|
+
chunk_divide_round_up_u32,
|
|
34
|
+
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hzb_pick_alignment.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hiz/hzb_pick_alignment.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hzb_pick_alignment.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/hiz/hzb_pick_alignment.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,6CALW,MAAM,YACN,MAAM,cACN,MAAM,GACJ,CAAC,MAAM,EAAE,MAAM,CAAC,CAoI5B"}
|
|
@@ -1,148 +1,149 @@
|
|
|
1
|
-
import { assert } from "../../../core/assert.js";
|
|
2
|
-
import { msb_32 } from "../../../core/binary/msb_32.js";
|
|
3
|
-
import { bitCount } from "../../../core/binary/operations/bitCount.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* transitions
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @param {number}
|
|
15
|
-
* @param {number}
|
|
16
|
-
* @
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
assert.
|
|
21
|
-
assert.isNonNegativeInteger(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
let
|
|
55
|
-
let
|
|
56
|
-
let
|
|
57
|
-
let
|
|
58
|
-
let
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
let
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
let
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1
|
+
import { assert } from "../../../core/assert.js";
|
|
2
|
+
import { msb_32 } from "../../../core/binary/msb_32.js";
|
|
3
|
+
import { bitCount } from "../../../core/binary/operations/bitCount.js";
|
|
4
|
+
import { isPowerOfTwo } from "../../../core/math/isPowerOfTwo.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Picks power-of-two alignments `[align_w, align_h]` for HZB mip 0 within the allowed area bloat.
|
|
8
|
+
*
|
|
9
|
+
* Starting from the largest shared power-of-two alignment that fits within `max_bloat`, chases
|
|
10
|
+
* lowest set bits (`d += d & -d`) along each axis to minimize reduction dispatches, maximize
|
|
11
|
+
* SPD-covered mips and exact 2:1 (`2x2`) transitions, and push any remaining odd polyphase
|
|
12
|
+
* transitions to coarser mip levels.
|
|
13
|
+
*
|
|
14
|
+
* @param {number} source_w - Source width in pixels.
|
|
15
|
+
* @param {number} source_h - Source height in pixels.
|
|
16
|
+
* @param {number} [max_bloat=1.05] - Maximum area multiplier relative to unaligned half-res.
|
|
17
|
+
* @returns {[number, number]} Power-of-two alignment factors `[align_w, align_h]`.
|
|
18
|
+
*/
|
|
19
|
+
export function hzb_pick_alignment(source_w, source_h, max_bloat = 1.05) {
|
|
20
|
+
assert.greaterThan(max_bloat, 1, 'max_bloat must be greater than 1');
|
|
21
|
+
assert.isNonNegativeInteger(source_w, 'source_w');
|
|
22
|
+
assert.isNonNegativeInteger(source_h, 'source_h');
|
|
23
|
+
|
|
24
|
+
const half_w = source_w >>> 1;
|
|
25
|
+
const half_h = source_h >>> 1;
|
|
26
|
+
|
|
27
|
+
if (half_w === 0 || half_h === 0) {
|
|
28
|
+
return [1, 1];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const max_area = half_w * half_h * max_bloat;
|
|
32
|
+
|
|
33
|
+
let base_align = 1;
|
|
34
|
+
|
|
35
|
+
while (base_align < half_w && base_align < half_h) {
|
|
36
|
+
const next_align = base_align << 1;
|
|
37
|
+
const mask = next_align - 1;
|
|
38
|
+
|
|
39
|
+
const w = (half_w + mask) & ~mask;
|
|
40
|
+
const h = (half_h + mask) & ~mask;
|
|
41
|
+
|
|
42
|
+
if (w * h > max_area) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
base_align = next_align;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const base_mask = base_align - 1;
|
|
50
|
+
const w0 = (half_w + base_mask) & ~base_mask;
|
|
51
|
+
const h0 = (half_h + base_mask) & ~base_mask;
|
|
52
|
+
|
|
53
|
+
let best_w = w0;
|
|
54
|
+
let best_h = h0;
|
|
55
|
+
let best_steps = Infinity;
|
|
56
|
+
let best_spd_mips = -1;
|
|
57
|
+
let best_2x2 = -1;
|
|
58
|
+
let best_odd_axes = Infinity;
|
|
59
|
+
let best_odd_work = Infinity;
|
|
60
|
+
let best_area = Infinity;
|
|
61
|
+
|
|
62
|
+
for (let w = w0; w * h0 <= max_area; w += (w & -w)) {
|
|
63
|
+
const msb_w = msb_32(w);
|
|
64
|
+
const odd_w = w ^ (1 << msb_w);
|
|
65
|
+
|
|
66
|
+
for (let h = h0; ; h += (h & -h)) {
|
|
67
|
+
const area = w * h;
|
|
68
|
+
if (area > max_area) {
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const msb_h = msb_32(h);
|
|
73
|
+
const odd_h = h ^ (1 << msb_h);
|
|
74
|
+
const total_transitions = msb_w > msb_h ? msb_w : msb_h;
|
|
75
|
+
const odd_any = odd_w | odd_h;
|
|
76
|
+
|
|
77
|
+
let steps = 0;
|
|
78
|
+
let spd_mips = 0;
|
|
79
|
+
let mip = 0;
|
|
80
|
+
|
|
81
|
+
while (mip < total_transitions) {
|
|
82
|
+
let count = 0;
|
|
83
|
+
while (count < 4 && (mip + count) < total_transitions && ((odd_any >>> (mip + count)) & 1) === 0) {
|
|
84
|
+
count++;
|
|
85
|
+
}
|
|
86
|
+
steps++;
|
|
87
|
+
if (count >= 2) {
|
|
88
|
+
spd_mips += count;
|
|
89
|
+
mip += count;
|
|
90
|
+
} else {
|
|
91
|
+
mip += 1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const count_2x2 = total_transitions - bitCount(odd_any);
|
|
96
|
+
const count_odd_axes = bitCount(odd_w) + bitCount(odd_h);
|
|
97
|
+
|
|
98
|
+
let odd_work = 0;
|
|
99
|
+
let rem = odd_any;
|
|
100
|
+
while (rem !== 0) {
|
|
101
|
+
const lsb = rem & -rem;
|
|
102
|
+
const m = msb_32(lsb);
|
|
103
|
+
const taps_x = ((odd_w >>> m) & 1) + 2;
|
|
104
|
+
const taps_y = ((odd_h >>> m) & 1) + 2;
|
|
105
|
+
const out_w = (w >>> (m + 1)) || 1;
|
|
106
|
+
const out_h = (h >>> (m + 1)) || 1;
|
|
107
|
+
odd_work += out_w * out_h * (taps_x * taps_y - 4);
|
|
108
|
+
rem ^= lsb;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const is_better =
|
|
112
|
+
steps < best_steps ||
|
|
113
|
+
(steps === best_steps && (
|
|
114
|
+
spd_mips > best_spd_mips ||
|
|
115
|
+
(spd_mips === best_spd_mips && (
|
|
116
|
+
count_2x2 > best_2x2 ||
|
|
117
|
+
(count_2x2 === best_2x2 && (
|
|
118
|
+
count_odd_axes < best_odd_axes ||
|
|
119
|
+
(count_odd_axes === best_odd_axes && (
|
|
120
|
+
odd_work < best_odd_work ||
|
|
121
|
+
(odd_work === best_odd_work && area < best_area)
|
|
122
|
+
))
|
|
123
|
+
))
|
|
124
|
+
))
|
|
125
|
+
));
|
|
126
|
+
|
|
127
|
+
if (is_better) {
|
|
128
|
+
best_w = w;
|
|
129
|
+
best_h = h;
|
|
130
|
+
best_steps = steps;
|
|
131
|
+
best_spd_mips = spd_mips;
|
|
132
|
+
best_2x2 = count_2x2;
|
|
133
|
+
best_odd_axes = count_odd_axes;
|
|
134
|
+
best_odd_work = odd_work;
|
|
135
|
+
best_area = area;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (isPowerOfTwo(h)) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (isPowerOfTwo(w)) {
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return [best_w & -best_w, best_h & -best_h];
|
|
149
|
+
}
|
package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_sh_exp_environment_cells.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_sh_exp_environment_cells.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.js"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,8CAFU,MAAM,CAEkC;AA4GlD;;;;;;;;;;;;;;;GAeG;AACH,8CAFU,aAAa,CAMpB;8BAjJ2B,kCAAkC"}
|
package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_environment_cells.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chunk_octahedral_solid_angle } from "../../../shader/chunk/geometry/octahedron/chunk_octahedral_solid_angle.js";
|
|
2
2
|
import { chunk_uv_octahedral_unit_decode } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.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";
|
|
@@ -75,12 +76,12 @@ fn main(
|
|
|
75
76
|
hi = select(hi, under_centre + 1u, empty);
|
|
76
77
|
|
|
77
78
|
let span = hi - lo;
|
|
78
|
-
let stride = (max(span.x, span.y)
|
|
79
|
+
let stride = divide_round_up_u32(max(span.x, span.y), MAX_TEXELS_PER_SIDE);
|
|
79
80
|
let blocks = (span + stride - 1u) / stride;
|
|
80
81
|
let block_count = blocks.x * blocks.y;
|
|
81
82
|
|
|
82
83
|
// A cell's bounds come from the workgroup id, so this trip count is uniform; at most 16.
|
|
83
|
-
let iterations = (block_count
|
|
84
|
+
let iterations = divide_round_up_u32(block_count, WORKGROUP_SIZE);
|
|
84
85
|
|
|
85
86
|
// radiance times solid angle, and solid angle
|
|
86
87
|
var accumulated = vec4<f32>(0.0);
|
|
@@ -120,6 +121,7 @@ fn main(
|
|
|
120
121
|
cells[2u * cell + 1u] = vec4<f32>(radiance * cell_solid_angle, cell_solid_angle);
|
|
121
122
|
}
|
|
122
123
|
`, [
|
|
124
|
+
chunk_divide_round_up_u32,
|
|
123
125
|
chunk_octahedral_solid_angle,
|
|
124
126
|
chunk_uv_octahedral_unit_decode,
|
|
125
127
|
chunk_sh_exp_workgroup_sum,
|
package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_sh_exp_log_floor.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_sh_exp_log_floor.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_log_floor.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,uCAFU,MAAM,CAE8B;AA6C9C;;;;;;;;;;;;;GAaG;AACH,sCAFU,aAAa,CAMpB;8BA5E2B,kCAAkC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { chunk_rgb_to_luminance } from "../../../shader/chunk/color/chunk_rgb_to_luminance.js";
|
|
2
|
+
import { chunk_divide_round_up_u32 } from "../../../shader/chunk/math/chunk_divide_round_up_u32.js";
|
|
1
3
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
2
4
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
3
5
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
@@ -26,15 +28,12 @@ const body = CodeChunk.from(
|
|
|
26
28
|
`
|
|
27
29
|
const WORKGROUP_SIZE : u32 = ${SH_EXP_WORKGROUP_SIZE}u;
|
|
28
30
|
|
|
29
|
-
// Rec. 709 luminance, the weighting the floor is relative to
|
|
30
|
-
const LUMINANCE = vec3<f32>(0.2126, 0.7152, 0.0722);
|
|
31
|
-
|
|
32
31
|
@compute @workgroup_size(${SH_EXP_WORKGROUP_SIZE})
|
|
33
32
|
fn main(@builtin(local_invocation_index) local_index: u32) {
|
|
34
33
|
let sample_count = parameters.sample_count;
|
|
35
34
|
|
|
36
35
|
// sixteen steps at the default 4096 samples
|
|
37
|
-
let iterations = (sample_count
|
|
36
|
+
let iterations = divide_round_up_u32(sample_count, WORKGROUP_SIZE);
|
|
38
37
|
|
|
39
38
|
var luminance = 0.0;
|
|
40
39
|
|
|
@@ -42,7 +41,7 @@ fn main(@builtin(local_invocation_index) local_index: u32) {
|
|
|
42
41
|
let sample_index = k * WORKGROUP_SIZE + local_index;
|
|
43
42
|
|
|
44
43
|
if (sample_index < sample_count) {
|
|
45
|
-
luminance +=
|
|
44
|
+
luminance += rgb_to_luminance(reflectance[sample_index].xyz);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -55,6 +54,8 @@ fn main(@builtin(local_invocation_index) local_index: u32) {
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
`, [
|
|
57
|
+
chunk_divide_round_up_u32,
|
|
58
|
+
chunk_rgb_to_luminance,
|
|
58
59
|
chunk_sh_exp_workgroup_sum,
|
|
59
60
|
]);
|
|
60
61
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_sh_exp_project.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_project.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_sh_exp_project.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_project.js"],"names":[],"mappings":"AAkFA;;;;;;;;;;;;;GAaG;AACH,oCAFU,aAAa,CAMpB;8BA/F2B,kCAAkC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { chunk_sh_band_of_index } from "../../../shader/chunk/spherical_harmonics/chunk_sh_band_of_index.js";
|
|
2
2
|
import { chunk_sh_basis_function } from "../../../shader/chunk/spherical_harmonics/chunk_sh_basis_function.js";
|
|
3
3
|
import { chunk_sh_vmf_window } from "../../../shader/chunk/spherical_harmonics/chunk_sh_vmf_window.js";
|
|
4
|
+
import { chunk_divide_round_up_u32 } from "../../../shader/chunk/math/chunk_divide_round_up_u32.js";
|
|
4
5
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
5
6
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
6
7
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
@@ -43,7 +44,7 @@ fn main(
|
|
|
43
44
|
let sample_count = parameters.sample_count;
|
|
44
45
|
|
|
45
46
|
// sixteen steps at the default 4096 samples
|
|
46
|
-
let iterations = (sample_count
|
|
47
|
+
let iterations = divide_round_up_u32(sample_count, WORKGROUP_SIZE);
|
|
47
48
|
|
|
48
49
|
var accumulated = vec3<f32>(0.0);
|
|
49
50
|
|
|
@@ -75,6 +76,7 @@ fn main(
|
|
|
75
76
|
chunk_sh_band_of_index,
|
|
76
77
|
chunk_sh_basis_function,
|
|
77
78
|
chunk_sh_vmf_window,
|
|
79
|
+
chunk_divide_round_up_u32,
|
|
78
80
|
chunk_sh_exp_workgroup_sum,
|
|
79
81
|
]);
|
|
80
82
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_sh_exp_reference_reflectance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_sh_exp_reference_reflectance.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.js"],"names":[],"mappings":"AAgFA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,kDAFU,aAAa,CAMpB;8BArG2B,kCAAkC"}
|
package/src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_reference_reflectance.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { chunk_D_GGX } from "../../../shader/chunk/brdf/chunk_D_GGX.js";
|
|
2
2
|
import { chunk_V_GGX_SmithCorrelated } from "../../../shader/chunk/brdf/chunk_V_GGX_SmithCorrelated.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";
|
|
@@ -41,7 +42,7 @@ fn main(
|
|
|
41
42
|
let cell_count = parameters.cell_resolution * parameters.cell_resolution;
|
|
42
43
|
|
|
43
44
|
// sixteen steps at the 64-cell grid
|
|
44
|
-
let iterations = (cell_count
|
|
45
|
+
let iterations = divide_round_up_u32(cell_count, WORKGROUP_SIZE);
|
|
45
46
|
|
|
46
47
|
var reflected = vec3<f32>(0.0);
|
|
47
48
|
|
|
@@ -73,6 +74,7 @@ fn main(
|
|
|
73
74
|
`, [
|
|
74
75
|
chunk_D_GGX,
|
|
75
76
|
chunk_V_GGX_SmithCorrelated,
|
|
77
|
+
chunk_divide_round_up_u32,
|
|
76
78
|
chunk_sh_exp_workgroup_sum,
|
|
77
79
|
]);
|
|
78
80
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_sh_exp_solve.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_solve.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_sh_exp_solve.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/light/environment/sh_exponential/shader_sh_exp_solve.js"],"names":[],"mappings":"AAiFA;;;;;;;;GAQG;AACH,kCAFU,aAAa,CAMpB;8BA5F2B,kCAAkC"}
|
|
@@ -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 { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
3
4
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
@@ -35,7 +36,7 @@ fn main(
|
|
|
35
36
|
let coefficient = workgroup_id.x;
|
|
36
37
|
let coefficient_count = parameters.coefficient_count;
|
|
37
38
|
|
|
38
|
-
let iterations = (coefficient_count
|
|
39
|
+
let iterations = divide_round_up_u32(coefficient_count, WORKGROUP_SIZE);
|
|
39
40
|
|
|
40
41
|
var accumulated = vec3<f32>(0.0);
|
|
41
42
|
|
|
@@ -74,6 +75,7 @@ fn main(
|
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
`, [
|
|
78
|
+
chunk_divide_round_up_u32,
|
|
77
79
|
chunk_sh_exp_workgroup_sum,
|
|
78
80
|
]);
|
|
79
81
|
|
|
@@ -8,11 +8,6 @@ export const WORLD_LIGHT_CLUSTER_GRID_SIZE: number;
|
|
|
8
8
|
* @type {number}
|
|
9
9
|
*/
|
|
10
10
|
export const WORLD_LIGHT_CLUSTER_CELLS_PER_CASCADE: number;
|
|
11
|
-
/**
|
|
12
|
-
* Maximum number of cascades supported by the world-space light cluster clipmap.
|
|
13
|
-
* @type {number}
|
|
14
|
-
*/
|
|
15
|
-
export const WORLD_LIGHT_CLUSTER_MAX_CASCADES: number;
|
|
16
11
|
/**
|
|
17
12
|
* Maximum number of lights (point + spot) assigned to a single world-space cluster cell.
|
|
18
13
|
* @type {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WORLD_LIGHT_CLUSTER.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WORLD_LIGHT_CLUSTER.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/light/world_cluster/WORLD_LIGHT_CLUSTER.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH,4CAFU,MAAM,CAE+B;AAE/C;;;GAGG;AACH,oDAFU,MAAM,CAEwE;AAExF;;;GAGG;AACH,sDAFU,MAAM,CAE2C;AAE3D;;;GAGG;AACH,iDAFU,MAAM,CAEuC;AAEvD;;;;GAIG;AACH,gDAFU,YAAY,CAOc;AAEpC;;;GAGG;AACH,uCAFU,SAAS,CAsCjB;6BA/E2B,mCAAmC;0BAFtC,oCAAoC"}
|
|
@@ -2,7 +2,6 @@ import { chunk_cone_intersects_sphere } from "../../shader/chunk/geometry/cone/c
|
|
|
2
2
|
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
3
3
|
import { u32, vec3f } from "../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
4
4
|
import { WebGPUStruct } from "../../shader/type/WebGPUStruct.js";
|
|
5
|
-
import { IRRADIANCE_CLIPMAP_CASCADE_LIMIT } from "../../volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.js";
|
|
6
5
|
import { CLUSTER_LIGHT_PROXY } from "../cluster/CLUSTER_LIGHT_PROXY.js";
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -17,12 +16,6 @@ export const WORLD_LIGHT_CLUSTER_GRID_SIZE = 8;
|
|
|
17
16
|
*/
|
|
18
17
|
export const WORLD_LIGHT_CLUSTER_CELLS_PER_CASCADE = WORLD_LIGHT_CLUSTER_GRID_SIZE ** 3;
|
|
19
18
|
|
|
20
|
-
/**
|
|
21
|
-
* Maximum number of cascades supported by the world-space light cluster clipmap.
|
|
22
|
-
* @type {number}
|
|
23
|
-
*/
|
|
24
|
-
export const WORLD_LIGHT_CLUSTER_MAX_CASCADES = IRRADIANCE_CLIPMAP_CASCADE_LIMIT;
|
|
25
|
-
|
|
26
19
|
/**
|
|
27
20
|
* Maximum number of lights (point + spot) assigned to a single world-space cluster cell.
|
|
28
21
|
* @type {number}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bytes of the cluster lookup over a clipmap of so many cascades.
|
|
3
|
+
* @param {number} cascade_count
|
|
4
|
+
* @returns {number}
|
|
5
|
+
*/
|
|
6
|
+
export function world_light_clusters_lookup_size(cascade_count: number): number;
|
|
7
|
+
/**
|
|
8
|
+
* Bytes of the cluster data over a clipmap of so many cascades: the larger of the two, which a host
|
|
9
|
+
* checks against the device's `maxStorageBufferBindingSize` for the cascades it builds.
|
|
10
|
+
* @param {number} cascade_count
|
|
11
|
+
* @returns {number}
|
|
12
|
+
*/
|
|
13
|
+
export function world_light_clusters_data_size(cascade_count: number): number;
|
|
1
14
|
/**
|
|
2
15
|
* Offer the pipelines {@link graph_build_world_light_clusters} dispatches — see {@link PipelineEnquiry}.
|
|
3
16
|
*
|
|
@@ -11,8 +24,8 @@ export function enquire_build_world_light_clusters_pipelines(enquiry: PipelineEn
|
|
|
11
24
|
* @param {object} options
|
|
12
25
|
* @param {import("../../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph} options.graph
|
|
13
26
|
* @param {import("../GPULightCollection.js").GPULightCollection} options.lights
|
|
14
|
-
* @param {number} options.levels graph handle of a
|
|
15
|
-
*
|
|
27
|
+
* @param {number} options.levels graph handle of a buffer that starts with the clipmap's cascade windows,
|
|
28
|
+
* `cascade_count` `CLIPMAP_LEVEL_STRUCT`s, finest first, read as storage
|
|
16
29
|
* @param {number} options.cascade_count active cascade count
|
|
17
30
|
* @param {number} options.border cells of its own past each face of a cascade's window that its cluster
|
|
18
31
|
* cells cover too
|