@woosh/meep-engine 3.60.6 → 3.60.8
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/generation/markers/GridActionRuleSet.d.ts.map +1 -1
- package/src/generation/markers/GridActionRuleSet.js +12 -3
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A probe's record (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.2), 48 bytes a slot: where it is, when it
|
|
3
|
-
* was wanted and traced, its last update's back faces,
|
|
3
|
+
* was wanted and traced, its last update's back faces, and its irradiance. Where
|
|
4
4
|
* relocation moved it is the state's second word, which readers weighing it load with the state.
|
|
5
5
|
*
|
|
6
6
|
* @type {WebGPUStruct}
|
|
@@ -155,7 +155,7 @@ export const PROBE_RAYS_WRITE_RESOURCE: ShaderResourceDescriptor;
|
|
|
155
155
|
export const PROBE_RAYS_READ_RESOURCE: ShaderResourceDescriptor;
|
|
156
156
|
/**
|
|
157
157
|
* Each listed probe's rays this update that the budget does not scale, `{count, elements}` by its place in
|
|
158
|
-
* the trace list: a uniform update's R and a DEAD probe's
|
|
158
|
+
* the trace list: a uniform update's R and a DEAD probe's `PROBE_DEAD_RAYS`, zero for a guided update. The trace
|
|
159
159
|
* command writes the count, the ray counts pass the elements.
|
|
160
160
|
* @type {ShaderResourceDescriptor}
|
|
161
161
|
*/
|
|
@@ -241,6 +241,38 @@ export const PROBE_RESAMPLES_WRITE_RESOURCE: ShaderResourceDescriptor;
|
|
|
241
241
|
* @type {ShaderResourceDescriptor}
|
|
242
242
|
*/
|
|
243
243
|
export const PROBE_RESAMPLES_READ_RESOURCE: ShaderResourceDescriptor;
|
|
244
|
+
/**
|
|
245
|
+
* The listed probes' re-samples, as the ray re-sample pass adds to them: each texel's four floats as the bits of
|
|
246
|
+
* four words, `atomic_add_f32_storage`, since the rays of a neighbour land in any of a probe's texels.
|
|
247
|
+
* @type {ShaderResourceDescriptor}
|
|
248
|
+
*/
|
|
249
|
+
export const PROBE_RESAMPLES_ADD_RESOURCE: ShaderResourceDescriptor;
|
|
250
|
+
/**
|
|
251
|
+
* A word a slot: its place in the frame's trace list, as relocation writes it for each listed probe. Only the
|
|
252
|
+
* list confirms an entry (`probe_clipmap_listed`), so a slot not listed this frame keeps a stale one.
|
|
253
|
+
* @type {ShaderResourceDescriptor}
|
|
254
|
+
*/
|
|
255
|
+
export const PROBE_LISTED_WRITE_RESOURCE: ShaderResourceDescriptor;
|
|
256
|
+
/**
|
|
257
|
+
* A word a slot: its place in the frame's trace list, as the candidate pass reads it.
|
|
258
|
+
* @type {ShaderResourceDescriptor}
|
|
259
|
+
*/
|
|
260
|
+
export const PROBE_LISTED_READ_RESOURCE: ShaderResourceDescriptor;
|
|
261
|
+
/**
|
|
262
|
+
* A listed probe's candidate: the neighbour whose rays it re-samples this frame, and what they weigh.
|
|
263
|
+
* @type {WebGPUStruct}
|
|
264
|
+
*/
|
|
265
|
+
export const PROBE_CANDIDATE_STRUCT: WebGPUStruct;
|
|
266
|
+
/**
|
|
267
|
+
* A candidate a listed probe, in list order, as the candidate pass writes it.
|
|
268
|
+
* @type {ShaderResourceDescriptor}
|
|
269
|
+
*/
|
|
270
|
+
export const PROBE_CANDIDATES_WRITE_RESOURCE: ShaderResourceDescriptor;
|
|
271
|
+
/**
|
|
272
|
+
* A candidate a listed probe, as the ray re-sample pass reads it.
|
|
273
|
+
* @type {ShaderResourceDescriptor}
|
|
274
|
+
*/
|
|
275
|
+
export const PROBE_CANDIDATES_READ_RESOURCE: ShaderResourceDescriptor;
|
|
244
276
|
/**
|
|
245
277
|
* A row of a listed probe's radiance map, projected: its irradiance SH, and its rays this update.
|
|
246
278
|
* @type {WebGPUStruct}
|
|
@@ -292,7 +324,7 @@ export const PROBE_DEPTH_STORE_RESOURCE: ShaderResourceDescriptor;
|
|
|
292
324
|
* fn probe_state_updates(state: u32) -> u32
|
|
293
325
|
* fn probe_state(kind: u32, updates: u32) -> u32
|
|
294
326
|
* fn probe_clipmap_age_bucket(age: u32) -> u32 // the bucket of frames unwanted that eviction orders by
|
|
295
|
-
* fn probe_record_flags(back_face: f32,
|
|
327
|
+
* fn probe_record_flags(back_face: f32, cascade: u32) -> u32
|
|
296
328
|
* fn probe_record_cascade(flags: u32) -> u32
|
|
297
329
|
* fn probe_record_sh_encode(sh: MetroL1) -> vec3<u32> // held to the half float's largest, ±65,504
|
|
298
330
|
* fn probe_record_sh_decode(sh: vec3<u32>) -> MetroL1
|
|
@@ -409,12 +441,34 @@ export const PROBE_GUIDE_READ_RESOURCE: ShaderResourceDescriptor;
|
|
|
409
441
|
* fn probe_clipmap_guide_weight(luminance: f32, total: f32, rays: u32, texels: u32) -> u32
|
|
410
442
|
* fn probe_clipmap_guide_phase(slot: u32, updates: u32) -> f32
|
|
411
443
|
* fn probe_clipmap_guide_start(before: u32, total: u32, rays: u32, phase: f32) -> u32 // before: the weight walked before
|
|
412
|
-
* fn probe_clipmap_guide_rate(expected: f32, rays: u32, texels: u32, period: u32) -> f32 // the share of updates a texel takes rays in
|
|
413
444
|
* ```
|
|
414
445
|
*
|
|
415
446
|
* @type {CodeChunk}
|
|
416
447
|
*/
|
|
417
448
|
export const chunk_probe_clipmap_guide: CodeChunk;
|
|
449
|
+
/**
|
|
450
|
+
* The rays a guided update gives a radiance texel, `R·(w + e)/W`, from the probe's guide (§8.6), whose words start
|
|
451
|
+
* at `base`; nothing for a guide the guide passes never wrote.
|
|
452
|
+
*
|
|
453
|
+
* ```wgsl
|
|
454
|
+
* fn probe_clipmap_guide_expected(base: u32, texel: u32, rays: u32, n: u32) -> f32 // rays: the update's, R
|
|
455
|
+
* ```
|
|
456
|
+
*
|
|
457
|
+
* @type {CodeChunk}
|
|
458
|
+
*/
|
|
459
|
+
export const chunk_probe_clipmap_guide_expected: CodeChunk;
|
|
460
|
+
/**
|
|
461
|
+
* Where a slot is in the frame's trace list (§8.5), from `probe_listed`, which relocation writes for each listed
|
|
462
|
+
* probe: its place, or `PROBE_CLIPMAP_NONE` where the list does not hold the slot there, as for a slot not listed
|
|
463
|
+
* this frame, whose entry is a past frame's.
|
|
464
|
+
*
|
|
465
|
+
* ```wgsl
|
|
466
|
+
* fn probe_clipmap_listed(slot: u32, capacity: u32) -> u32 // capacity: the trace list's bound, U
|
|
467
|
+
* ```
|
|
468
|
+
*
|
|
469
|
+
* @type {CodeChunk}
|
|
470
|
+
*/
|
|
471
|
+
export const chunk_probe_clipmap_listed: CodeChunk;
|
|
418
472
|
/**
|
|
419
473
|
* The jitter of a guided update's ray in its texel. The first ray takes the texel's STBN jitter
|
|
420
474
|
* (`probe_clipmap_ray_jitter` at round 0). The rest rotate it by the R2 sequence, so a texel's rays
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_probe_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_probe_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js"],"names":[],"mappings":"AAsEA;;;;;;GAMG;AACH,kCAFU,YAAY,CAmBG;AAEzB;;;;;GAKG;AACH,+BAFU,YAAY,CAuBA;AAEtB;;;;;;GAMG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;;GAIG;AACH,+CAFU,wBAAwB,CAE0G;AAE5I;;;;GAIG;AACH,0CAFU,wBAAwB,CAE+F;AAEjI;;;GAGG;AACH,yCAFU,wBAAwB,CAEwF;AAE1H;;;GAGG;AACH,2CAFU,wBAAwB,CAE+G;AAEjJ;;;GAGG;AACH,0CAFU,wBAAwB,CAEwG;AAE1I;;;GAGG;AACH,sCAFU,wBAAwB,CAEkG;AAEpI;;;;GAIG;AACH,2CAFU,wBAAwB,CAEoF;AAEtH;;;GAGG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;;GAKG;AACH,oCAFU,YAAY,CAKK;AAE3B;;;GAGG;AACH,2CAFU,wBAAwB,CAE0F;AAE5H;;;GAGG;AACH,4CAFU,wBAAwB,CAEiG;AAEnI;;;GAGG;AACH,yCAFU,wBAAwB,CAEgG;AAElI;;;GAGG;AACH,0CAFU,wBAAwB,CAEyG;AAE3I;;;GAGG;AACH,4CAFU,wBAAwB,CAEoG;AAEtI;;;GAGG;AACH,yCAFU,wBAAwB,CAEwG;AAE1I;;;GAGG;AACH,yCAFU,wBAAwB,CAEiG;AAEnI;;;GAGG;AACH,wCAFU,wBAAwB,CAEyF;AAE3H;;;;GAIG;AACH,yCAFU,wBAAwB,CAEgG;AAElI;;;GAGG;AACH,0CAFU,wBAAwB,CAEmG;AAErI;;;GAGG;AACH,yCAFU,wBAAwB,CAE2F;AAE7H;;;GAGG;AACH,sCAFU,wBAAwB,CAEqF;AAEvH;;;;GAIG;AACH,2CAFU,wBAAwB,CAEiG;AAEnI;;;GAGG;AACH,0CAFU,wBAAwB,CAE0F;AAE5H;;;GAGG;AACH,wCAFU,wBAAwB,CAEsG;AAExI;;;GAGG;AACH,uCAFU,wBAAwB,CAE+F;AAEjI;;;;;GAKG;AACH,8CAFU,wBAAwB,CAE0G;AAE5I;;;;GAIG;AACH,gDAFU,wBAAwB,CAE8G;AAEhJ;;;GAGG;AACH,iDAFU,wBAAwB,CAE2G;AAE7I;;;GAGG;AACH,mDAFU,wBAAwB,CAE+G;AAEjJ;;;;;GAKG;AACH,4CAFU,wBAAwB,CAEsG;AAExI;;;GAGG;AACH,2CAFU,wBAAwB,CAE+F;AAEjI;;;;;GAKG;AACH,mCAFU,YAAY,CAWI;AAE1B;;;GAGG;AACH,4CAFU,wBAAwB,CAEkH;AAEpJ;;;GAGG;AACH,2CAFU,wBAAwB,CAE2G;AAE7I;;;;GAIG;AACH,wCAFU,wBAAwB,CAEmF;AAErH;;;GAGG;AACH,uCAFU,wBAAwB,CAE4E;AAE9G;;;;;;GAMG;AACH,wCAFU,wBAAwB,CAEiG;AAEnI;;;GAGG;AACH,6CAFU,wBAAwB,CAEgG;AAElI;;;;;GAKG;AACH,6CAFU,wBAAwB,CAEqG;AAEvI;;;GAGG;AACH,4CAFU,wBAAwB,CAE8F;AAEhI;;;;GAIG;AACH,2CAFU,wBAAwB,CAEwG;AAE1I;;;;GAIG;AACH,0CAFU,wBAAwB,CAEuF;AAEzH;;;GAGG;AACH,yCAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,qCAFU,YAAY,CAOD;AAErB;;;GAGG;AACH,8CAFU,wBAAwB,CAEwH;AAE1J;;;GAGG;AACH,6CAFU,wBAAwB,CAEiH;AAEnJ;;;GAGG;AACH,0CAFU,YAAY,CAYU;AAEhC;;;GAGG;AACH,8CAFU,wBAAwB,CAE6H;AAE/J;;;GAGG;AACH,6CAFU,wBAAwB,CAEsH;AAExJ;;;;GAIG;AACH,8CAFU,wBAAwB,CAE+E;AAEjH;;;;GAIG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,4CAFU,wBAAwB,CAEwG;AAE1I;;;GAGG;AACH,yCAFU,wBAAwB,CAEgG;AAElI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,kCAFU,SAAS,CA8HhB;AAEH;;;;;;;;;;GAUG;AACH,6CAFU,SAAS,CA8BhB;AAIH;;;;;;;;;;;;;;;;;GAiBG;AACH,4CAFU,SAAS,CA+BhB;AAEH;;;;;;;;;;GAUG;AACH,6CAFU,SAAS,CAkBhB;AAIH;;;;;;;;;;;;GAYG;AACH,6CAFU,SAAS,CAehB;AAEH;;;GAGG;AACH,yCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,wCAFU,wBAAwB,CAE8E;AAEhH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wCAFU,SAAS,CAwDhB;AAEH;;;;;;;;;GASG;AACH,iDAFU,SAAS,CAahB;AAIH;;;;;;;;;;GAUG;AACH,yCAFU,SAAS,CAgBhB;AAKH;;;;;;;;;;GAUG;AACH,oDAFU,SAAS,CAWhB;6BAj8B0B,sCAAsC;yCAZ1B,sDAAsD;0BADrE,uCAAuC"}
|
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
import { COLLECTION_U32_STRUCT_READ } from "../../../gpu_primitive/COLLECTION_U32_STRUCT_READ.js";
|
|
2
2
|
import { COLLECTION_U32_STRUCT_WRITE } from "../../../gpu_primitive/COLLECTION_U32_STRUCT_WRITE.js";
|
|
3
|
+
import { chunk_clipmap_key } from "../../../shader/chunk/clipmap/chunk_clipmap_key.js";
|
|
3
4
|
import { CLIPMAP_LEVEL_ARRAY } from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
5
|
+
import { chunk_rgb_to_luminance } from "../../../shader/chunk/color/chunk_rgb_to_luminance.js";
|
|
4
6
|
import { chunk_sphere_sample_volume } from "../../../shader/chunk/geometry/sphere/chunk_sphere_sample_volume.js";
|
|
5
7
|
import { chunk_mod_v3i } from "../../../shader/chunk/geometry/vec3/chunk_mod_v3i.js";
|
|
6
|
-
import { chunk_rgb_to_luminance } from "../../../shader/chunk/color/chunk_rgb_to_luminance.js";
|
|
7
8
|
import { chunk_lower_bound_branchless } from "../../../shader/chunk/math/chunk_lower_bound_branchless.js";
|
|
8
9
|
import { chunk_stbn_sample_vec2 } from "../../../shader/chunk/noise/chunk_stbn_sample_vec2.js";
|
|
9
10
|
import { chunk_r2_canonical } from "../../../shader/chunk/noise/r/chunk_r2_canonical.js";
|
|
10
11
|
import { chunk_hash_lowbias32 } from "../../../shader/chunk/random/chunk_hash_lowbias32.js";
|
|
11
12
|
import { chunk_hash_to_float01 } from "../../../shader/chunk/random/chunk_hash_to_float01.js";
|
|
12
13
|
import { chunk_pcg3d } from "../../../shader/chunk/random/pcg/chunk_pcg3d.js";
|
|
13
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
METRO_L1_IRRADIANCE_STRUCT
|
|
16
|
+
} from "../../../shader/chunk/spherical_harmonics/l1i/chunk_convert_to_irradiance_sh.js";
|
|
14
17
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
15
18
|
import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
|
|
16
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
atomic_u32,
|
|
21
|
+
f32,
|
|
22
|
+
u32,
|
|
23
|
+
vec2u,
|
|
24
|
+
vec3i,
|
|
25
|
+
vec3u,
|
|
26
|
+
vec4f,
|
|
27
|
+
vec4u
|
|
28
|
+
} from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
17
29
|
import { WebGPUArray } from "../../../shader/type/WebGPUArray.js";
|
|
18
30
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
19
31
|
import { STBN_VEC2_RESOURCE } from "../../../STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js";
|
|
20
32
|
import {
|
|
33
|
+
PROBE_AGE_BUCKETS,
|
|
21
34
|
PROBE_BLEND_SKIRT,
|
|
22
35
|
PROBE_CLIPMAP_NONE,
|
|
23
|
-
PROBE_AGE_BUCKETS,
|
|
24
36
|
PROBE_COUNTER_AGES,
|
|
25
37
|
PROBE_COUNTER_EVICTED,
|
|
26
38
|
PROBE_COUNTER_FREE,
|
|
@@ -45,7 +57,6 @@ import {
|
|
|
45
57
|
PROBE_RAY_ORIGIN_JITTER,
|
|
46
58
|
PROBE_RAY_PROBE_SHIFT,
|
|
47
59
|
PROBE_RECORD_CASCADE_SHIFT,
|
|
48
|
-
PROBE_RECORD_SCREEN,
|
|
49
60
|
PROBE_RELOCATION_LIMIT,
|
|
50
61
|
PROBE_STATE_ALIVE,
|
|
51
62
|
PROBE_STATE_DEAD,
|
|
@@ -54,13 +65,12 @@ import {
|
|
|
54
65
|
PROBE_STATE_NEW,
|
|
55
66
|
PROBE_STATE_UPDATES_SHIFT,
|
|
56
67
|
PROBE_TEXEL_RAYS,
|
|
57
|
-
PROBE_THREAD_WORKGROUP_SIZE
|
|
58
|
-
PROBE_WANTED_SCREEN
|
|
68
|
+
PROBE_THREAD_WORKGROUP_SIZE
|
|
59
69
|
} from "./PROBE_CLIPMAP.js";
|
|
60
70
|
|
|
61
71
|
/**
|
|
62
72
|
* A probe's record (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.2), 48 bytes a slot: where it is, when it
|
|
63
|
-
* was wanted and traced, its last update's back faces,
|
|
73
|
+
* was wanted and traced, its last update's back faces, and its irradiance. Where
|
|
64
74
|
* relocation moved it is the state's second word, which readers weighing it load with the state.
|
|
65
75
|
*
|
|
66
76
|
* @type {WebGPUStruct}
|
|
@@ -69,9 +79,8 @@ export const PROBE_RECORD_STRUCT = WebGPUStruct.from({
|
|
|
69
79
|
/** the lattice point, in its cascade's spacing: the probe stands at `cell · spacing` before relocation */
|
|
70
80
|
cell: vec3i,
|
|
71
81
|
/**
|
|
72
|
-
* The share of its last update's resolved rays that hit back faces (§8.4), unorm16 in the low half
|
|
73
|
-
*
|
|
74
|
-
* (`PROBE_CLIPMAP.js`).
|
|
82
|
+
* The share of its last update's resolved rays that hit back faces (§8.4), unorm16 in the low half,
|
|
83
|
+
* and its cascade, `probe_record_cascade` (`PROBE_CLIPMAP.js`).
|
|
75
84
|
*/
|
|
76
85
|
flags: u32,
|
|
77
86
|
/** the frame a pixel or a hit last wanted it, of the frames the clipmap has recorded */
|
|
@@ -285,7 +294,7 @@ export const PROBE_RAYS_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("
|
|
|
285
294
|
|
|
286
295
|
/**
|
|
287
296
|
* Each listed probe's rays this update that the budget does not scale, `{count, elements}` by its place in
|
|
288
|
-
* the trace list: a uniform update's R and a DEAD probe's
|
|
297
|
+
* the trace list: a uniform update's R and a DEAD probe's `PROBE_DEAD_RAYS`, zero for a guided update. The trace
|
|
289
298
|
* command writes the count, the ray counts pass the elements.
|
|
290
299
|
* @type {ShaderResourceDescriptor}
|
|
291
300
|
*/
|
|
@@ -395,6 +404,49 @@ export const PROBE_RESAMPLES_WRITE_RESOURCE = ShaderResourceDescriptor.storageBu
|
|
|
395
404
|
*/
|
|
396
405
|
export const PROBE_RESAMPLES_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("probe_resamples", WebGPUArray.from(vec4f));
|
|
397
406
|
|
|
407
|
+
/**
|
|
408
|
+
* The listed probes' re-samples, as the ray re-sample pass adds to them: each texel's four floats as the bits of
|
|
409
|
+
* four words, `atomic_add_f32_storage`, since the rays of a neighbour land in any of a probe's texels.
|
|
410
|
+
* @type {ShaderResourceDescriptor}
|
|
411
|
+
*/
|
|
412
|
+
export const PROBE_RESAMPLES_ADD_RESOURCE = ShaderResourceDescriptor.storageBuffer("probe_resamples", WebGPUArray.from(atomic_u32), true);
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* A word a slot: its place in the frame's trace list, as relocation writes it for each listed probe. Only the
|
|
416
|
+
* list confirms an entry (`probe_clipmap_listed`), so a slot not listed this frame keeps a stale one.
|
|
417
|
+
* @type {ShaderResourceDescriptor}
|
|
418
|
+
*/
|
|
419
|
+
export const PROBE_LISTED_WRITE_RESOURCE = ShaderResourceDescriptor.storageBuffer("probe_listed", WebGPUArray.u32, true);
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* A word a slot: its place in the frame's trace list, as the candidate pass reads it.
|
|
423
|
+
* @type {ShaderResourceDescriptor}
|
|
424
|
+
*/
|
|
425
|
+
export const PROBE_LISTED_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("probe_listed", WebGPUArray.u32);
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* A listed probe's candidate: the neighbour whose rays it re-samples this frame, and what they weigh.
|
|
429
|
+
* @type {WebGPUStruct}
|
|
430
|
+
*/
|
|
431
|
+
export const PROBE_CANDIDATE_STRUCT = WebGPUStruct.from({
|
|
432
|
+
/** the neighbour's place in the trace list, or `PROBE_CLIPMAP_NONE` */
|
|
433
|
+
listed: u32,
|
|
434
|
+
/** the draw's density divided out: `(1 / M) / p`, M the neighbours it drew from, p the drawn one's chance */
|
|
435
|
+
weight: f32,
|
|
436
|
+
}, "ProbeCandidate");
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* A candidate a listed probe, in list order, as the candidate pass writes it.
|
|
440
|
+
* @type {ShaderResourceDescriptor}
|
|
441
|
+
*/
|
|
442
|
+
export const PROBE_CANDIDATES_WRITE_RESOURCE = ShaderResourceDescriptor.storageBuffer("probe_candidates", WebGPUArray.from(PROBE_CANDIDATE_STRUCT), true);
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* A candidate a listed probe, as the ray re-sample pass reads it.
|
|
446
|
+
* @type {ShaderResourceDescriptor}
|
|
447
|
+
*/
|
|
448
|
+
export const PROBE_CANDIDATES_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer("probe_candidates", WebGPUArray.from(PROBE_CANDIDATE_STRUCT));
|
|
449
|
+
|
|
398
450
|
/**
|
|
399
451
|
* A row of a listed probe's radiance map, projected: its irradiance SH, and its rays this update.
|
|
400
452
|
* @type {WebGPUStruct}
|
|
@@ -463,7 +515,7 @@ export const PROBE_DEPTH_STORE_RESOURCE = ShaderResourceDescriptor.storageTextur
|
|
|
463
515
|
* fn probe_state_updates(state: u32) -> u32
|
|
464
516
|
* fn probe_state(kind: u32, updates: u32) -> u32
|
|
465
517
|
* fn probe_clipmap_age_bucket(age: u32) -> u32 // the bucket of frames unwanted that eviction orders by
|
|
466
|
-
* fn probe_record_flags(back_face: f32,
|
|
518
|
+
* fn probe_record_flags(back_face: f32, cascade: u32) -> u32
|
|
467
519
|
* fn probe_record_cascade(flags: u32) -> u32
|
|
468
520
|
* fn probe_record_sh_encode(sh: MetroL1) -> vec3<u32> // held to the half float's largest, ±65,504
|
|
469
521
|
* fn probe_record_sh_decode(sh: vec3<u32>) -> MetroL1
|
|
@@ -515,28 +567,25 @@ const PROBE_RAY_CASCADE_SHIFT = ${PROBE_RAY_CASCADE_SHIFT}u;
|
|
|
515
567
|
const PROBE_RAY_CASCADE_MASK = ${PROBE_RAY_CASCADE_MASK}u;
|
|
516
568
|
const PROBE_RAY_PROBE_SHIFT = ${PROBE_RAY_PROBE_SHIFT}u;
|
|
517
569
|
|
|
518
|
-
const PROBE_WANTED_SCREEN = ${PROBE_WANTED_SCREEN}u;
|
|
519
|
-
|
|
520
|
-
const PROBE_RECORD_SCREEN = ${PROBE_RECORD_SCREEN}u;
|
|
521
570
|
const PROBE_RECORD_CASCADE_SHIFT = ${PROBE_RECORD_CASCADE_SHIFT}u;
|
|
522
571
|
|
|
523
572
|
const PROBE_THREAD_WORKGROUP_SIZE = ${PROBE_THREAD_WORKGROUP_SIZE}u;
|
|
524
573
|
const PROBE_BLEND_SKIRT = ${PROBE_BLEND_SKIRT}.0;
|
|
525
574
|
|
|
526
575
|
fn probe_clipmap_key(cascade: u32, storage: vec3<u32>, resolution: u32) -> u32 {
|
|
527
|
-
return (cascade
|
|
576
|
+
return clipmap_key(cascade, storage, resolution);
|
|
528
577
|
}
|
|
529
578
|
|
|
530
579
|
fn probe_clipmap_key_cascade(key: u32, resolution: u32) -> u32 {
|
|
531
|
-
return key
|
|
580
|
+
return clipmap_key_cascade(key, resolution);
|
|
532
581
|
}
|
|
533
582
|
|
|
534
583
|
fn probe_clipmap_key_storage(key: u32, resolution: u32) -> vec3<u32> {
|
|
535
|
-
return
|
|
584
|
+
return clipmap_key_storage(key, resolution);
|
|
536
585
|
}
|
|
537
586
|
|
|
538
587
|
fn probe_clipmap_indirection_texel(cascade: u32, storage: vec3<u32>, resolution: u32) -> vec3<u32> {
|
|
539
|
-
return
|
|
588
|
+
return clipmap_stacked_texel(cascade, storage, resolution);
|
|
540
589
|
}
|
|
541
590
|
|
|
542
591
|
fn probe_clipmap_window_point(storage: vec3<u32>, corner: vec3<i32>, resolution: u32) -> vec3<i32> {
|
|
@@ -561,8 +610,8 @@ fn probe_clipmap_age_bucket(age: u32) -> u32 {
|
|
|
561
610
|
return min(32u - countLeadingZeros(age), PROBE_AGE_BUCKETS - 1u);
|
|
562
611
|
}
|
|
563
612
|
|
|
564
|
-
fn probe_record_flags(back_face: f32,
|
|
565
|
-
return (pack2x16unorm(vec2<f32>(back_face, 0.0)) & 0xFFFFu) |
|
|
613
|
+
fn probe_record_flags(back_face: f32, cascade: u32) -> u32 {
|
|
614
|
+
return (pack2x16unorm(vec2<f32>(back_face, 0.0)) & 0xFFFFu) | (cascade << PROBE_RECORD_CASCADE_SHIFT);
|
|
566
615
|
}
|
|
567
616
|
|
|
568
617
|
fn probe_record_cascade(flags: u32) -> u32 {
|
|
@@ -605,6 +654,7 @@ fn probe_clipmap_offset_decode(word: u32, spacing: f32) -> vec3<f32> {
|
|
|
605
654
|
`, [
|
|
606
655
|
PROBE_RECORD_STRUCT.declaration_chunk,
|
|
607
656
|
METRO_L1_IRRADIANCE_STRUCT.declaration_chunk,
|
|
657
|
+
chunk_clipmap_key,
|
|
608
658
|
chunk_mod_v3i,
|
|
609
659
|
]);
|
|
610
660
|
|
|
@@ -803,7 +853,6 @@ export const PROBE_GUIDE_READ_RESOURCE = ShaderResourceDescriptor.storageBuffer(
|
|
|
803
853
|
* fn probe_clipmap_guide_weight(luminance: f32, total: f32, rays: u32, texels: u32) -> u32
|
|
804
854
|
* fn probe_clipmap_guide_phase(slot: u32, updates: u32) -> f32
|
|
805
855
|
* fn probe_clipmap_guide_start(before: u32, total: u32, rays: u32, phase: f32) -> u32 // before: the weight walked before
|
|
806
|
-
* fn probe_clipmap_guide_rate(expected: f32, rays: u32, texels: u32, period: u32) -> f32 // the share of updates a texel takes rays in
|
|
807
856
|
* ```
|
|
808
857
|
*
|
|
809
858
|
* @type {CodeChunk}
|
|
@@ -857,13 +906,6 @@ fn probe_clipmap_guide_start(before: u32, total: u32, rays: u32, phase: f32) ->
|
|
|
857
906
|
|
|
858
907
|
return u32(clamp(at, 0.0, f32(rays)));
|
|
859
908
|
}
|
|
860
|
-
|
|
861
|
-
fn probe_clipmap_guide_rate(expected: f32, rays: u32, texels: u32, period: u32) -> f32 {
|
|
862
|
-
let uniform = min(f32(rays) / f32(texels), 1.0);
|
|
863
|
-
let guided = min(expected, 1.0);
|
|
864
|
-
|
|
865
|
-
return (uniform + f32(period - 1u) * guided) / f32(period);
|
|
866
|
-
}
|
|
867
909
|
`, [
|
|
868
910
|
chunk_probe_clipmap,
|
|
869
911
|
chunk_rgb_to_luminance,
|
|
@@ -871,6 +913,61 @@ fn probe_clipmap_guide_rate(expected: f32, rays: u32, texels: u32, period: u32)
|
|
|
871
913
|
chunk_pcg3d,
|
|
872
914
|
]);
|
|
873
915
|
|
|
916
|
+
/**
|
|
917
|
+
* The rays a guided update gives a radiance texel, `R·(w + e)/W`, from the probe's guide (§8.6), whose words start
|
|
918
|
+
* at `base`; nothing for a guide the guide passes never wrote.
|
|
919
|
+
*
|
|
920
|
+
* ```wgsl
|
|
921
|
+
* fn probe_clipmap_guide_expected(base: u32, texel: u32, rays: u32, n: u32) -> f32 // rays: the update's, R
|
|
922
|
+
* ```
|
|
923
|
+
*
|
|
924
|
+
* @type {CodeChunk}
|
|
925
|
+
*/
|
|
926
|
+
export const chunk_probe_clipmap_guide_expected = CodeChunk.from(
|
|
927
|
+
//language=WGSL
|
|
928
|
+
`
|
|
929
|
+
fn probe_clipmap_guide_expected(base: u32, texel: u32, rays: u32, n: u32) -> f32 {
|
|
930
|
+
let texels = n * n;
|
|
931
|
+
let total = probe_guide[base + 2u * texels + 2u * n];
|
|
932
|
+
let share = probe_guide[base + 2u * texels + 2u * n + 1u];
|
|
933
|
+
|
|
934
|
+
// the guide passes always leave a total; a guide they never wrote gives nothing
|
|
935
|
+
return select(0.0, f32(rays) * f32(probe_guide[base + texels + texel] + share) / f32(total), total > 0u);
|
|
936
|
+
}
|
|
937
|
+
`);
|
|
938
|
+
|
|
939
|
+
chunk_probe_clipmap_guide_expected.requireResource(PROBE_GUIDE_READ_RESOURCE);
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Where a slot is in the frame's trace list (§8.5), from `probe_listed`, which relocation writes for each listed
|
|
943
|
+
* probe: its place, or `PROBE_CLIPMAP_NONE` where the list does not hold the slot there, as for a slot not listed
|
|
944
|
+
* this frame, whose entry is a past frame's.
|
|
945
|
+
*
|
|
946
|
+
* ```wgsl
|
|
947
|
+
* fn probe_clipmap_listed(slot: u32, capacity: u32) -> u32 // capacity: the trace list's bound, U
|
|
948
|
+
* ```
|
|
949
|
+
*
|
|
950
|
+
* @type {CodeChunk}
|
|
951
|
+
*/
|
|
952
|
+
export const chunk_probe_clipmap_listed = CodeChunk.from(
|
|
953
|
+
//language=WGSL
|
|
954
|
+
`
|
|
955
|
+
fn probe_clipmap_listed(slot: u32, capacity: u32) -> u32 {
|
|
956
|
+
let k = probe_listed[slot];
|
|
957
|
+
|
|
958
|
+
if (k >= min(probe_trace.count, capacity)) {
|
|
959
|
+
return PROBE_CLIPMAP_NONE;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
return select(PROBE_CLIPMAP_NONE, k, probe_trace.elements[k] == slot);
|
|
963
|
+
}
|
|
964
|
+
`, [
|
|
965
|
+
chunk_probe_clipmap,
|
|
966
|
+
]);
|
|
967
|
+
|
|
968
|
+
chunk_probe_clipmap_listed.requireResource(PROBE_LISTED_READ_RESOURCE);
|
|
969
|
+
chunk_probe_clipmap_listed.requireResource(PROBE_TRACE_READ_RESOURCE);
|
|
970
|
+
|
|
874
971
|
/**
|
|
875
972
|
* The jitter of a guided update's ray in its texel. The first ray takes the texel's STBN jitter
|
|
876
973
|
* (`probe_clipmap_ray_jitter` at round 0). The rest rotate it by the R2 sequence, so a texel's rays
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The cage of a cascade around a receiving point (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3, §9.1)
|
|
3
|
-
* lattice cell holding the point moved along `bias_direction` by
|
|
4
|
-
* cascade's spacing, whose eight corners are the probes the point reads.
|
|
2
|
+
* The cage of a cascade around a receiving point (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3, §9.1), in the
|
|
3
|
+
* clipmap whose levels `levels` points at: the lattice cell holding the point moved along `bias_direction` by
|
|
4
|
+
* {@link PROBE_RECEIVER_BIAS} of the cascade's spacing, whose eight corners are the probes the point reads.
|
|
5
5
|
*
|
|
6
6
|
* ```wgsl
|
|
7
|
-
* fn
|
|
8
|
-
* fn
|
|
7
|
+
* fn probe_clipmap_cage_in(levels: ptr<uniform, ClipmapLevelArray>, cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>, cage: ptr<function, vec3<i32>>) -> bool
|
|
8
|
+
* fn probe_clipmap_biased_in(levels: ptr<uniform, ClipmapLevelArray>, cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>) -> vec3<f32>
|
|
9
9
|
* ```
|
|
10
10
|
*
|
|
11
|
-
* `
|
|
11
|
+
* `probe_clipmap_cage_in` writes the cell's least corner and says whether the cascade's cage window holds
|
|
12
12
|
* it. Want takes it to choose the probes a pixel wants, and the pick to read them, so that a pixel reads
|
|
13
|
-
* the probes it wanted.
|
|
13
|
+
* the probes it wanted. It binds nothing: a shader that reads two clipmaps passes each one's levels.
|
|
14
|
+
*
|
|
15
|
+
* @type {CodeChunk}
|
|
16
|
+
*/
|
|
17
|
+
export const chunk_probe_clipmap_cage_in: CodeChunk;
|
|
18
|
+
/**
|
|
19
|
+
* {@link chunk_probe_clipmap_cage_in} over the clipmap a shader binds as `probe_levels`:
|
|
20
|
+
*
|
|
21
|
+
* ```wgsl
|
|
22
|
+
* fn probe_clipmap_cage(cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>, cage: ptr<function, vec3<i32>>) -> bool
|
|
23
|
+
* fn probe_clipmap_biased(cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>) -> vec3<f32>
|
|
24
|
+
* ```
|
|
14
25
|
*
|
|
15
26
|
* @type {CodeChunk}
|
|
16
27
|
*/
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_probe_clipmap_cage.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_probe_clipmap_cage.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;GAeG;AACH,0CAFU,SAAS,CAmBhB;AAEH;;;;;;;;;GASG;AACH,uCAFU,SAAS,CAchB;0BA7DuB,uCAAuC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js
CHANGED
|
@@ -1,40 +1,66 @@
|
|
|
1
1
|
import { chunk_clipmap_contains } from "../../../shader/chunk/clipmap/chunk_clipmap_contains.js";
|
|
2
|
+
import { CLIPMAP_LEVEL_ARRAY, CLIPMAP_LEVEL_STRUCT } from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
2
3
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
3
4
|
import { PROBE_LEVELS_RESOURCE } from "./chunk_probe_clipmap.js";
|
|
4
5
|
import { PROBE_RECEIVER_BIAS } from "./PROBE_CLIPMAP.js";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
|
-
* The cage of a cascade around a receiving point (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3, §9.1)
|
|
8
|
-
* lattice cell holding the point moved along `bias_direction` by
|
|
9
|
-
* cascade's spacing, whose eight corners are the probes the point reads.
|
|
8
|
+
* The cage of a cascade around a receiving point (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3, §9.1), in the
|
|
9
|
+
* clipmap whose levels `levels` points at: the lattice cell holding the point moved along `bias_direction` by
|
|
10
|
+
* {@link PROBE_RECEIVER_BIAS} of the cascade's spacing, whose eight corners are the probes the point reads.
|
|
10
11
|
*
|
|
11
12
|
* ```wgsl
|
|
12
|
-
* fn
|
|
13
|
-
* fn
|
|
13
|
+
* fn probe_clipmap_cage_in(levels: ptr<uniform, ClipmapLevelArray>, cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>, cage: ptr<function, vec3<i32>>) -> bool
|
|
14
|
+
* fn probe_clipmap_biased_in(levels: ptr<uniform, ClipmapLevelArray>, cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>) -> vec3<f32>
|
|
14
15
|
* ```
|
|
15
16
|
*
|
|
16
|
-
* `
|
|
17
|
+
* `probe_clipmap_cage_in` writes the cell's least corner and says whether the cascade's cage window holds
|
|
17
18
|
* it. Want takes it to choose the probes a pixel wants, and the pick to read them, so that a pixel reads
|
|
18
|
-
* the probes it wanted.
|
|
19
|
+
* the probes it wanted. It binds nothing: a shader that reads two clipmaps passes each one's levels.
|
|
19
20
|
*
|
|
20
21
|
* @type {CodeChunk}
|
|
21
22
|
*/
|
|
22
|
-
export const
|
|
23
|
+
export const chunk_probe_clipmap_cage_in = CodeChunk.from(
|
|
23
24
|
//language=WGSL
|
|
24
25
|
`
|
|
25
|
-
fn
|
|
26
|
-
return position + bias_direction * (${PROBE_RECEIVER_BIAS} *
|
|
26
|
+
fn probe_clipmap_biased_in(levels: ptr<uniform, ${CLIPMAP_LEVEL_ARRAY.wgsl_ref}>, cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>) -> vec3<f32> {
|
|
27
|
+
return position + bias_direction * (${PROBE_RECEIVER_BIAS} * (*levels)[cascade].cell_size);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
fn
|
|
30
|
-
let level =
|
|
30
|
+
fn probe_clipmap_cage_in(levels: ptr<uniform, ${CLIPMAP_LEVEL_ARRAY.wgsl_ref}>, cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>, cage: ptr<function, vec3<i32>>) -> bool {
|
|
31
|
+
let level = (*levels)[cascade];
|
|
31
32
|
|
|
32
|
-
*cage = vec3<i32>(floor(
|
|
33
|
+
*cage = vec3<i32>(floor(probe_clipmap_biased_in(levels, cascade, position, bias_direction) / level.cell_size));
|
|
33
34
|
|
|
34
35
|
return clipmap_contains(*cage, level.corner, level.size);
|
|
35
36
|
}
|
|
36
37
|
`, [
|
|
38
|
+
CLIPMAP_LEVEL_STRUCT.declaration_chunk,
|
|
37
39
|
chunk_clipmap_contains,
|
|
38
40
|
]);
|
|
39
41
|
|
|
42
|
+
/**
|
|
43
|
+
* {@link chunk_probe_clipmap_cage_in} over the clipmap a shader binds as `probe_levels`:
|
|
44
|
+
*
|
|
45
|
+
* ```wgsl
|
|
46
|
+
* fn probe_clipmap_cage(cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>, cage: ptr<function, vec3<i32>>) -> bool
|
|
47
|
+
* fn probe_clipmap_biased(cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>) -> vec3<f32>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @type {CodeChunk}
|
|
51
|
+
*/
|
|
52
|
+
export const chunk_probe_clipmap_cage = CodeChunk.from(
|
|
53
|
+
//language=WGSL
|
|
54
|
+
`
|
|
55
|
+
fn probe_clipmap_biased(cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>) -> vec3<f32> {
|
|
56
|
+
return probe_clipmap_biased_in(&probe_levels, cascade, position, bias_direction);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
fn probe_clipmap_cage(cascade: u32, position: vec3<f32>, bias_direction: vec3<f32>, cage: ptr<function, vec3<i32>>) -> bool {
|
|
60
|
+
return probe_clipmap_cage_in(&probe_levels, cascade, position, bias_direction, cage);
|
|
61
|
+
}
|
|
62
|
+
`, [
|
|
63
|
+
chunk_probe_clipmap_cage_in,
|
|
64
|
+
]);
|
|
65
|
+
|
|
40
66
|
chunk_probe_clipmap_cage.requireResource(PROBE_LEVELS_RESOURCE);
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts
CHANGED
|
@@ -25,15 +25,19 @@ export const PROBE_DEPTH_SAMPLER_DESCRIPTOR: SamplerDescriptor;
|
|
|
25
25
|
*/
|
|
26
26
|
export const PROBE_DEPTH_SAMPLER_RESOURCE: ShaderResourceDescriptor;
|
|
27
27
|
/**
|
|
28
|
-
* A point's picked probes (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.1), and their SH (§9.2)
|
|
28
|
+
* A point's picked probes in one clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §9.1), and their SH (§9.2),
|
|
29
|
+
* the clipmap passed whole: its levels, shape, indirection, states and depth atlas to the pick, its records to
|
|
30
|
+
* the SH. It binds nothing but the depth's sampler, so a shader can pick from two clipmaps, as the bounce pass
|
|
31
|
+
* does (`shader_probe_clipmap_bounce`).
|
|
29
32
|
*
|
|
30
33
|
* ```wgsl
|
|
31
|
-
* fn
|
|
32
|
-
* fn
|
|
33
|
-
* fn
|
|
34
|
+
* fn probe_clipmap_pick_in(levels: ptr<uniform, ClipmapLevelArray>, sampling: ptr<uniform, ProbeSampling>, indirection: texture_3d<u32>, states: ptr<storage, array<vec2<u32>>, read>, depth: texture_2d<f32>, position: vec3<f32>, normal: vec3<f32>, view_direction: vec3<f32>, noise: vec2<f32>) -> ProbeClipmapPick
|
|
35
|
+
* fn probe_clipmap_sh_in(records: ptr<storage, array<ProbeRecord>, read>, pick: ProbeClipmapPick) -> ProbeClipmapSH
|
|
36
|
+
* fn probe_clipmap_corner_slot_in(sampling, indirection, cascade: u32, point: vec3<i32>) -> u32
|
|
37
|
+
* fn probe_clipmap_depth_moments_in(sampling, depth, slot: u32, direction: vec3<f32>) -> vec2<f32>
|
|
34
38
|
* ```
|
|
35
39
|
*
|
|
36
|
-
* - **The cage**: `
|
|
40
|
+
* - **The cage**: `probe_clipmap_cage_in` along mix(n, v, 0.2), as want takes it, so a pixel reads the
|
|
37
41
|
* probes it wanted.
|
|
38
42
|
* - **The weights**, visibility only, of the cage's eight corners: a corner without an ALIVE probe weighs
|
|
39
43
|
* nothing; one with weighs its trilinear weight × `probe_visibility_weight`: the wrap back-face term
|
|
@@ -44,9 +48,8 @@ export const PROBE_DEPTH_SAMPLER_RESOURCE: ShaderResourceDescriptor;
|
|
|
44
48
|
* whose corners weigh nothing gives way to the next coarser, without a skirt. With none left the
|
|
45
49
|
* weights are zero, and the fallback is the caller's (§9.1, step 6).
|
|
46
50
|
* - **The SH**: the picked records' Metro L1 structs mixed by their weights; resolved with
|
|
47
|
-
* `resolve_irradiance_sh_to_diffuse` at the caller's normal, it gives E/π. `
|
|
48
|
-
*
|
|
49
|
-
* and takes it.
|
|
51
|
+
* `resolve_irradiance_sh_to_diffuse` at the caller's normal, it gives E/π. `found` says whether any probe
|
|
52
|
+
* weighed anything.
|
|
50
53
|
*
|
|
51
54
|
* Per cascade read: 8 indirection loads, 8 state words and 8 depth taps, then 2 indirection loads for
|
|
52
55
|
* the pair; then two records a cascade read for the SH. A depth tile's place takes no integer division
|
|
@@ -54,6 +57,24 @@ export const PROBE_DEPTH_SAMPLER_RESOURCE: ShaderResourceDescriptor;
|
|
|
54
57
|
*
|
|
55
58
|
* @type {CodeChunk}
|
|
56
59
|
*/
|
|
60
|
+
export const chunk_probe_clipmap_pick_in: CodeChunk;
|
|
61
|
+
/**
|
|
62
|
+
* {@link chunk_probe_clipmap_pick_in} over the clipmap a shader binds under the probes' names, as every reader
|
|
63
|
+
* of the screen's probes does (§9.5):
|
|
64
|
+
*
|
|
65
|
+
* ```wgsl
|
|
66
|
+
* fn probe_clipmap_pick(position: vec3<f32>, normal: vec3<f32>, view_direction: vec3<f32>, noise: vec2<f32>) -> ProbeClipmapPick
|
|
67
|
+
* fn probe_clipmap_sh_of(pick: ProbeClipmapPick) -> ProbeClipmapSH
|
|
68
|
+
* fn probe_clipmap_sample_sh(position: vec3<f32>, normal: vec3<f32>, view_direction: vec3<f32>, noise: vec2<f32>) -> ProbeClipmapSH
|
|
69
|
+
* fn probe_clipmap_corner_slot(cascade: u32, point: vec3<i32>) -> u32
|
|
70
|
+
* fn probe_clipmap_depth_moments(slot: u32, direction: vec3<f32>) -> vec2<f32>
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* `probe_clipmap_sh_of` takes a pick already made, so a pass that samples the specular too picks once;
|
|
74
|
+
* `probe_clipmap_sample_sh` picks and takes it.
|
|
75
|
+
*
|
|
76
|
+
* @type {CodeChunk}
|
|
77
|
+
*/
|
|
57
78
|
export const chunk_probe_clipmap_pick: CodeChunk;
|
|
58
79
|
/**
|
|
59
80
|
* What {@link chunk_probe_clipmap_pick} reads, as a group a reader of the probes adds to its shader (§9.5).
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_probe_clipmap_pick.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_probe_clipmap_pick.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js"],"names":[],"mappings":"AAgCA;;;;GAIG;AACH,oCAFU,YAAY,CAuBF;AAEpB;;;GAGG;AACH,sCAFU,wBAAwB,CAE+E;AAEjH;;;GAGG;AACH,8CAFU,wBAAwB,CAEiF;AAEnH;;;GAGG;AACH,6CAFU,iBAAiB,CAQvB;AAEJ;;;GAGG;AACH,2CAFU,wBAAwB,CAE+G;AAOjJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,0CAFU,SAAS,CAyMhB;AAIH;;;;;;;;;;;;;;;;GAgBG;AACH,uCAFU,SAAS,CA0BhB;AASH;;;;;;;GAOG;AACH,2CAFU,6BAA6B,CAWG;6BA3Xb,sCAAsC;yCAH1B,sDAAsD;kCAhB7D,qDAAqD;0BAe7D,uCAAuC;8CAEnB,2DAA2D"}
|