@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
|
@@ -211,16 +211,24 @@ export const PROBE_DEPTH_LIMIT: number;
|
|
|
211
211
|
*/
|
|
212
212
|
export const PROBE_BACK_FACE_DEPTH: number;
|
|
213
213
|
/**
|
|
214
|
-
* The
|
|
215
|
-
*
|
|
214
|
+
* The short mean's blend a sample, the multi-scale mean estimator's own (Barré-Brisebois et al. 2019), and the
|
|
215
|
+
* depth's: a texel's samples, however far apart in time they come. A change in the light is the estimator's to
|
|
216
|
+
* find, not the time since the last sample's to assume (§8.8).
|
|
216
217
|
* @type {number}
|
|
217
218
|
*/
|
|
218
|
-
export const
|
|
219
|
+
export const PROBE_SHORT_BLEND: number;
|
|
219
220
|
/**
|
|
220
|
-
* The
|
|
221
|
+
* The variance's blend a sample, half the short mean's, so that its window outlasts the short mean's; and the
|
|
222
|
+
* blend of a probe's change statistics, which follow the estimator's variance (§8.8).
|
|
221
223
|
* @type {number}
|
|
222
224
|
*/
|
|
223
|
-
export const
|
|
225
|
+
export const PROBE_VARIANCE_BLEND: number;
|
|
226
|
+
/**
|
|
227
|
+
* The most a radiance texel counts of the updates that reached it: its long mean is its running mean until
|
|
228
|
+
* then, its blend's floor 1/(this + 1), far below `PROBE_SHORT_BLEND`.
|
|
229
|
+
* @type {number}
|
|
230
|
+
*/
|
|
231
|
+
export const PROBE_RADIANCE_SAMPLES_LIMIT: number;
|
|
224
232
|
/**
|
|
225
233
|
* Rays a depth texel gathers at most, which bounds the settings: R ≤ this · n_d².
|
|
226
234
|
* @type {number}
|
|
@@ -236,12 +244,19 @@ export const PROBE_DEPTH_TEXEL_RAYS: number;
|
|
|
236
244
|
*/
|
|
237
245
|
export const PROBE_UNIFORM_PERIOD: number;
|
|
238
246
|
/**
|
|
239
|
-
* The fewest rays
|
|
240
|
-
*
|
|
241
|
-
*
|
|
247
|
+
* The fewest rays a guided update casts, of the radiance texels: a quarter, or R where R is fewer, so
|
|
248
|
+
* that no update casts more than the budget counts a probe for. A guided update of a probe that sees no
|
|
249
|
+
* change asks for no more (§8.6).
|
|
242
250
|
* @type {number}
|
|
243
251
|
*/
|
|
244
252
|
export const PROBE_RAYS_PER_TEXEL_MIN: number;
|
|
253
|
+
/**
|
|
254
|
+
* Rays a DEAD probe's update casts, or R where R is fewer, uniform over the sphere (§8.4, §8.6). A DEAD
|
|
255
|
+
* probe is one whose every resolved ray hit a back face; the update asks only whether one ray now gets
|
|
256
|
+
* out.
|
|
257
|
+
* @type {number}
|
|
258
|
+
*/
|
|
259
|
+
export const PROBE_DEAD_RAYS: number;
|
|
245
260
|
/**
|
|
246
261
|
* The most rays an update casts, of the radiance texels: four. A guided update of a probe whose light
|
|
247
262
|
* moved asks for them, and a new probe's first guided ones (§8.6). The guide holds any one texel under
|
|
@@ -266,6 +281,12 @@ export const PROBE_CHANGE_SIGNIFICANCE: number;
|
|
|
266
281
|
* @type {number}
|
|
267
282
|
*/
|
|
268
283
|
export const PROBE_TEXEL_RAYS: number;
|
|
284
|
+
/**
|
|
285
|
+
* The share of the frame's ray budget the frustum's probes trace; the world cache's is the rest
|
|
286
|
+
* (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md). Alex's, 2026-11-01.
|
|
287
|
+
* @type {number}
|
|
288
|
+
*/
|
|
289
|
+
export const FRUSTUM_RAY_BUDGET_FRACTION: number;
|
|
269
290
|
/**
|
|
270
291
|
* The guide's fixed point. A texel's weight is its share of the probe's luminance in units of 1/this,
|
|
271
292
|
* so the walk's sums are exact and every pass that reads them agrees on each texel's rays. A share
|
|
@@ -300,25 +321,20 @@ export const PROBE_RAY_BACK_FACE: number;
|
|
|
300
321
|
* @type {number}
|
|
301
322
|
*/
|
|
302
323
|
export const PROBE_RAY_CASCADE_SHIFT: number;
|
|
303
|
-
/**
|
|
304
|
-
* The hit's cascade's bits once shifted down: the brick clipmap has at most
|
|
305
|
-
* `PROBE_CLIPMAP_CASCADE_COUNT_MAX` (8) cascades.
|
|
306
|
-
* @type {number}
|
|
307
|
-
*/
|
|
308
|
-
export const PROBE_RAY_CASCADE_MASK: number;
|
|
309
324
|
/**
|
|
310
325
|
* The shift of the ray's probe, its place in the trace list: 24 bits, past any trace list.
|
|
311
326
|
* @type {number}
|
|
312
327
|
*/
|
|
313
328
|
export const PROBE_RAY_PROBE_SHIFT: number;
|
|
314
329
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
330
|
+
* The hit's cascade's bits once shifted down: every bit between the cascade's shift and the probe's,
|
|
331
|
+
* so the brick clipmap's cascades fit in it up to 32.
|
|
317
332
|
* @type {number}
|
|
318
333
|
*/
|
|
319
|
-
export const
|
|
334
|
+
export const PROBE_RAY_CASCADE_MASK: number;
|
|
320
335
|
/**
|
|
321
|
-
* The shift of the probe's cascade, the flags' top bits: six,
|
|
336
|
+
* The shift of the probe's cascade, the flags' top bits: six, so the probe clipmap's cascades fit in it up
|
|
337
|
+
* to 64.
|
|
322
338
|
* @type {number}
|
|
323
339
|
*/
|
|
324
340
|
export const PROBE_RECORD_CASCADE_SHIFT: number;
|
|
@@ -332,13 +348,6 @@ export const PROBE_WANT_TILE: number;
|
|
|
332
348
|
* @type {number}
|
|
333
349
|
*/
|
|
334
350
|
export const PROBE_WANT_WORKGROUP_TILES: number;
|
|
335
|
-
/**
|
|
336
|
-
* A wanted list entry's top bit: a pixel wanted the point, not only hits (§8.3). Admit marks the point's
|
|
337
|
-
* probe as the screen's on it, and only the screen's probes' hits want in turn. The key is the other
|
|
338
|
-
* bits.
|
|
339
|
-
* @type {number}
|
|
340
|
-
*/
|
|
341
|
-
export const PROBE_WANTED_SCREEN: number;
|
|
342
351
|
/**
|
|
343
352
|
* Lanes of the fill, a texel of the indirection each.
|
|
344
353
|
* @type {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"AAoRA;;;;;;;;;;GAUG;AACH,8DAJW,MAAM,oBACN,MAAM,GACJ,MAAM,CAIlB;AAsED;;;;;;;;;;;GAWG;AACH,+DAHW,MAAM,GACJ,MAAM,CAIlB;AA1WD;;;GAGG;AACH,iCAFU,MAAM,CAE6B;AAS7C;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,8BAFU,MAAM,CAEiB;AAEjC;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;;GAIG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,wCAFU,MAAM,CAE2B;AAM3C;;;GAGG;AACH,iCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;;GAIG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;;;GAKG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,iCAFU,MAAM,CAEoB;AAEpC;;;GAGG;AACH,kCAFU,MAAM,CAE0D;AAE1E;;;;GAIG;AACH,+BAFU,MAAM,CAEqB;AAQrC;;;;GAIG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;GAGG;AACH,oCAFU,MAAM,CAEwB;AAExC;;;GAGG;AACH,kCAFU,MAAM,CAEsB;AAEtC;;;GAGG;AACH,qCAFU,MAAM,CAEyB;AAEzC;;;;GAIG;AACH,8BAFU,MAAM,CAEoB;AAEpC;;;GAGG;AACH,mCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,mCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,0CAFU,MAAM,CAE8B;AAE9C;;;;GAIG;AACH,yCAFU,MAAM,CAE+B;AAE/C;;;;GAIG;AACH,qCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,qCAFU,MAAM,CAEwB;AAExC;;;;;;;;GAQG;AACH,sCAFU,MAAM,CAE8B;AAE9C;;;;;;;GAOG;AACH,gCAFU,MAAM,CAE6D;AAE7E;;;;GAIG;AACH,oCAFU,MAAM,CAEyB;AAEzC;;;;;GAKG;AACH,gCAFU,MAAM,CAEsB;AAEtC;;;;GAIG;AACH,mCAFU,MAAM,CAE0C;AAE1D;;;;GAIG;AACH,2CAFU,MAAM,CAEgC;AAEhD;;;GAGG;AACH,qCAFU,MAAM,CAEyB;AAiBzC;;;;;;;GAOG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;;;GAKG;AACH,uCAFU,MAAM,CAE8B;AAE9C;;;;;GAKG;AACH,8BAFU,MAAM,CAEkB;AAElC;;;;;GAKG;AACH,uCAFU,MAAM,CAE0B;AAE1C;;;;;;;;GAQG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;;GAKG;AACH,+BAFU,MAAM,CAEuC;AAEvD;;;;GAIG;AACH,0CAFU,MAAM,CAEgC;AAEhD;;;;;GAKG;AACH,gCAFU,MAAM,CAEuB;AAkBvC;;;;GAIG;AACH,kCAFU,MAAM,CAEqB;AAQrC;;;GAGG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;;GAIG;AACH,6BAFU,MAAM,CAEgB;AAEhC;;;GAGG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;GAGG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,qCAFU,MAAM,CAEmF;AAOnG;;;;GAIG;AACH,yCAFU,MAAM,CAE6B;AAE7C;;;GAGG;AACH,8BAFU,MAAM,CAEiB;AAEjC;;;GAGG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,wCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;GAGG;AACH,kCAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,uCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,wCAFU,MAAM,CAE2B"}
|
|
@@ -247,17 +247,26 @@ export const PROBE_DEPTH_LIMIT = (1 + PROBE_RELOCATION_LIMIT) * Math.sqrt(3);
|
|
|
247
247
|
export const PROBE_BACK_FACE_DEPTH = 0.2;
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
|
-
* The
|
|
251
|
-
*
|
|
250
|
+
* The short mean's blend a sample, the multi-scale mean estimator's own (Barré-Brisebois et al. 2019), and the
|
|
251
|
+
* depth's: a texel's samples, however far apart in time they come. A change in the light is the estimator's to
|
|
252
|
+
* find, not the time since the last sample's to assume (§8.8).
|
|
252
253
|
* @type {number}
|
|
253
254
|
*/
|
|
254
|
-
export const
|
|
255
|
+
export const PROBE_SHORT_BLEND = 0.08;
|
|
255
256
|
|
|
256
257
|
/**
|
|
257
|
-
* The
|
|
258
|
+
* The variance's blend a sample, half the short mean's, so that its window outlasts the short mean's; and the
|
|
259
|
+
* blend of a probe's change statistics, which follow the estimator's variance (§8.8).
|
|
258
260
|
* @type {number}
|
|
259
261
|
*/
|
|
260
|
-
export const
|
|
262
|
+
export const PROBE_VARIANCE_BLEND = PROBE_SHORT_BLEND / 2;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* The most a radiance texel counts of the updates that reached it: its long mean is its running mean until
|
|
266
|
+
* then, its blend's floor 1/(this + 1), far below `PROBE_SHORT_BLEND`.
|
|
267
|
+
* @type {number}
|
|
268
|
+
*/
|
|
269
|
+
export const PROBE_RADIANCE_SAMPLES_LIMIT = 255;
|
|
261
270
|
|
|
262
271
|
/**
|
|
263
272
|
* Rays a depth texel gathers at most, which bounds the settings: R ≤ this · n_d².
|
|
@@ -291,13 +300,21 @@ export function probe_clipmap_maps_words(radiance_resolution, depth_resolution)
|
|
|
291
300
|
export const PROBE_UNIFORM_PERIOD = 5;
|
|
292
301
|
|
|
293
302
|
/**
|
|
294
|
-
* The fewest rays
|
|
295
|
-
*
|
|
296
|
-
*
|
|
303
|
+
* The fewest rays a guided update casts, of the radiance texels: a quarter, or R where R is fewer, so
|
|
304
|
+
* that no update casts more than the budget counts a probe for. A guided update of a probe that sees no
|
|
305
|
+
* change asks for no more (§8.6).
|
|
297
306
|
* @type {number}
|
|
298
307
|
*/
|
|
299
308
|
export const PROBE_RAYS_PER_TEXEL_MIN = 1 / 4;
|
|
300
309
|
|
|
310
|
+
/**
|
|
311
|
+
* Rays a DEAD probe's update casts, or R where R is fewer, uniform over the sphere (§8.4, §8.6). A DEAD
|
|
312
|
+
* probe is one whose every resolved ray hit a back face; the update asks only whether one ray now gets
|
|
313
|
+
* out.
|
|
314
|
+
* @type {number}
|
|
315
|
+
*/
|
|
316
|
+
export const PROBE_DEAD_RAYS = 16;
|
|
317
|
+
|
|
301
318
|
/**
|
|
302
319
|
* The most rays an update casts, of the radiance texels: four. A guided update of a probe whose light
|
|
303
320
|
* moved asks for them, and a new probe's first guided ones (§8.6). The guide holds any one texel under
|
|
@@ -325,6 +342,13 @@ export const PROBE_CHANGE_SIGNIFICANCE = 3;
|
|
|
325
342
|
*/
|
|
326
343
|
export const PROBE_TEXEL_RAYS = PROBE_DEPTH_TEXEL_RAYS;
|
|
327
344
|
|
|
345
|
+
/**
|
|
346
|
+
* The share of the frame's ray budget the frustum's probes trace; the world cache's is the rest
|
|
347
|
+
* (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md). Alex's, 2026-11-01.
|
|
348
|
+
* @type {number}
|
|
349
|
+
*/
|
|
350
|
+
export const FRUSTUM_RAY_BUDGET_FRACTION = 0.75;
|
|
351
|
+
|
|
328
352
|
/**
|
|
329
353
|
* The guide's fixed point. A texel's weight is its share of the probe's luminance in units of 1/this,
|
|
330
354
|
* so the walk's sums are exact and every pass that reads them agrees on each texel's rays. A share
|
|
@@ -359,7 +383,7 @@ export const PROBE_SHADOWED_SUNS = 2;
|
|
|
359
383
|
/*
|
|
360
384
|
A ray's flags, `PROBE_RAY_STRUCT.flags`: its kind in the low two bits, as the brick clipmap's tracer
|
|
361
385
|
names it (miss 0, hit 1, unresolved 2) or none (3), whether the hit is a back face, the hit's cascade
|
|
362
|
-
in
|
|
386
|
+
in the five bits above, and the probe it belongs to, its place in the trace list, from bit 8.
|
|
363
387
|
*/
|
|
364
388
|
|
|
365
389
|
/**
|
|
@@ -388,32 +412,26 @@ export const PROBE_RAY_BACK_FACE = 4;
|
|
|
388
412
|
export const PROBE_RAY_CASCADE_SHIFT = 3;
|
|
389
413
|
|
|
390
414
|
/**
|
|
391
|
-
* The
|
|
392
|
-
* `PROBE_CLIPMAP_CASCADE_COUNT_MAX` (8) cascades.
|
|
415
|
+
* The shift of the ray's probe, its place in the trace list: 24 bits, past any trace list.
|
|
393
416
|
* @type {number}
|
|
394
417
|
*/
|
|
395
|
-
export const
|
|
418
|
+
export const PROBE_RAY_PROBE_SHIFT = 8;
|
|
396
419
|
|
|
397
420
|
/**
|
|
398
|
-
* The
|
|
421
|
+
* The hit's cascade's bits once shifted down: every bit between the cascade's shift and the probe's,
|
|
422
|
+
* so the brick clipmap's cascades fit in it up to 32.
|
|
399
423
|
* @type {number}
|
|
400
424
|
*/
|
|
401
|
-
export const
|
|
425
|
+
export const PROBE_RAY_CASCADE_MASK = (1 << (PROBE_RAY_PROBE_SHIFT - PROBE_RAY_CASCADE_SHIFT)) - 1;
|
|
402
426
|
|
|
403
427
|
/*
|
|
404
428
|
A probe record's flags, `PROBE_RECORD_STRUCT.flags`: the share of its last update's resolved rays that
|
|
405
|
-
hit back faces, unorm16, in the low half; ten bits
|
|
429
|
+
hit back faces, unorm16, in the low half; ten bits clear above it; its cascade in the top six bits.
|
|
406
430
|
*/
|
|
407
431
|
|
|
408
432
|
/**
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
* @type {number}
|
|
412
|
-
*/
|
|
413
|
-
export const PROBE_RECORD_SCREEN = 0x10000;
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* The shift of the probe's cascade, the flags' top bits: six, past `PROBE_CLIPMAP_CASCADE_COUNT_MAX`.
|
|
433
|
+
* The shift of the probe's cascade, the flags' top bits: six, so the probe clipmap's cascades fit in it up
|
|
434
|
+
* to 64.
|
|
417
435
|
* @type {number}
|
|
418
436
|
*/
|
|
419
437
|
export const PROBE_RECORD_CASCADE_SHIFT = 26;
|
|
@@ -430,14 +448,6 @@ export const PROBE_WANT_TILE = 8;
|
|
|
430
448
|
*/
|
|
431
449
|
export const PROBE_WANT_WORKGROUP_TILES = 8;
|
|
432
450
|
|
|
433
|
-
/**
|
|
434
|
-
* A wanted list entry's top bit: a pixel wanted the point, not only hits (§8.3). Admit marks the point's
|
|
435
|
-
* probe as the screen's on it, and only the screen's probes' hits want in turn. The key is the other
|
|
436
|
-
* bits.
|
|
437
|
-
* @type {number}
|
|
438
|
-
*/
|
|
439
|
-
export const PROBE_WANTED_SCREEN = 0x80000000;
|
|
440
|
-
|
|
441
451
|
/**
|
|
442
452
|
* Lanes of the fill, a texel of the indirection each.
|
|
443
453
|
* @type {number}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Whether the frame's updates re-sample their neighbours (`shader_probe_clipmap_resample`)
|
|
3
|
-
* then adds each radiance texel's re-samples to its
|
|
4
|
-
* `chunk_probe_clipmap_resampled`, whose `false` alternative, the
|
|
5
|
-
* and binds nothing more, so a pass that never sets it accumulates exactly as
|
|
2
|
+
* Whether the frame's updates re-sample their neighbours, their histories (`shader_probe_clipmap_resample`) or
|
|
3
|
+
* their rays (`shader_probe_clipmap_resample_rays`): accumulate then adds each radiance texel's re-samples to its
|
|
4
|
+
* rays (`chunk_probe_clipmap_resampled`). Decided by `chunk_probe_clipmap_resampled`, whose `false` alternative, the
|
|
5
|
+
* default, is the texel's own rays alone and binds nothing more, so a pass that never sets it accumulates exactly as
|
|
6
|
+
* it always did.
|
|
6
7
|
*
|
|
7
|
-
* `GPUProbeClipmap` sets it from `ProbeClipmapSettings.
|
|
8
|
+
* `GPUProbeClipmap` sets it from `ProbeClipmapSettings.history_resampling` or `ray_resampling` the frame it records
|
|
9
|
+
* the update.
|
|
8
10
|
*
|
|
9
11
|
* @type {ShaderSwitch}
|
|
10
12
|
*/
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PROBE_CLIPMAP_RESAMPLING.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"PROBE_CLIPMAP_RESAMPLING.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,uCAFU,YAAY,CAEgE;6BAdzD,0CAA0C"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ShaderSwitch } from "../../../shader/compiler/ShaderSwitch.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Whether the frame's updates re-sample their neighbours (`shader_probe_clipmap_resample`)
|
|
5
|
-
* then adds each radiance texel's re-samples to its
|
|
6
|
-
* `chunk_probe_clipmap_resampled`, whose `false` alternative, the
|
|
7
|
-
* and binds nothing more, so a pass that never sets it accumulates exactly as
|
|
4
|
+
* Whether the frame's updates re-sample their neighbours, their histories (`shader_probe_clipmap_resample`) or
|
|
5
|
+
* their rays (`shader_probe_clipmap_resample_rays`): accumulate then adds each radiance texel's re-samples to its
|
|
6
|
+
* rays (`chunk_probe_clipmap_resampled`). Decided by `chunk_probe_clipmap_resampled`, whose `false` alternative, the
|
|
7
|
+
* default, is the texel's own rays alone and binds nothing more, so a pass that never sets it accumulates exactly as
|
|
8
|
+
* it always did.
|
|
8
9
|
*
|
|
9
|
-
* `GPUProbeClipmap` sets it from `ProbeClipmapSettings.
|
|
10
|
+
* `GPUProbeClipmap` sets it from `ProbeClipmapSettings.history_resampling` or `ray_resampling` the frame it records
|
|
11
|
+
* the update.
|
|
10
12
|
*
|
|
11
13
|
* @type {ShaderSwitch}
|
|
12
14
|
*/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A clipmap's probes wanted by another clipmap's hits (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.3): each
|
|
3
|
+
* front-face hit of that clipmap's last frame that its own probes did not serve wants the cages its pick reads
|
|
4
|
+
* here (`shader_probe_clipmap_want_hits`). The world cache's wants, from the frustum's rays; a
|
|
5
|
+
* {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
|
|
6
|
+
*
|
|
7
|
+
* It reads the rays as their clipmap left them, so the wanting clipmap's lifetime is recorded before theirs,
|
|
8
|
+
* which writes them over. Give it that clipmap's ray budget with {@link set} before the wanting clipmap's
|
|
9
|
+
* `graph_update`.
|
|
10
|
+
*/
|
|
11
|
+
export class ProbeClipmapHitWants {
|
|
12
|
+
/**
|
|
13
|
+
* @param {import("./GPUProbeClipmap.js").GPUProbeClipmap} rays_of the clipmap whose last frame's hits want
|
|
14
|
+
*/
|
|
15
|
+
constructor(rays_of: import("./GPUProbeClipmap.js").GPUProbeClipmap);
|
|
16
|
+
/**
|
|
17
|
+
* The other clipmap's frame.
|
|
18
|
+
*
|
|
19
|
+
* @param {Object} options
|
|
20
|
+
* @param {number} options.ray_budget the rays it casts a frame at most
|
|
21
|
+
*/
|
|
22
|
+
set({ ray_budget }: {
|
|
23
|
+
ray_budget: number;
|
|
24
|
+
}): void;
|
|
25
|
+
/**
|
|
26
|
+
* @returns {number} the most points a frame's wants list: each of the other clipmap's rays, the eight points of
|
|
27
|
+
* a cage in each of two cascades
|
|
28
|
+
*/
|
|
29
|
+
wanted_bound(): number;
|
|
30
|
+
/**
|
|
31
|
+
* Nothing of the frame graph's: the rays are the other clipmap's own buffers, read before its lifetime.
|
|
32
|
+
*
|
|
33
|
+
* @param {*} pass
|
|
34
|
+
* @param {Object} data
|
|
35
|
+
*/
|
|
36
|
+
graph_declare(pass: any, data: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* @param {GPUCommandEncoder} encoder
|
|
39
|
+
* @param {Object} data the lifetime pass's data
|
|
40
|
+
* @param {*} resources the frame graph's resources
|
|
41
|
+
* @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
|
|
42
|
+
* `probe_wanted_bits` and its want settings as `settings`
|
|
43
|
+
*/
|
|
44
|
+
encode(encoder: GPUCommandEncoder, data: any, resources: any, clipmap: any): void;
|
|
45
|
+
#private;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ProbeClipmapHitWants.d.ts.map
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProbeClipmapHitWants.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH;IAQI;;OAEG;IACH,qBAFW,OAAO,sBAAsB,EAAE,eAAe,EAMxD;IAED;;;;;OAKG;IACH;QAF2B,UAAU,EAA1B,MAAM;aAMhB;IAED;;;OAGG;IACH,gBAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,0CACC;IAED;;;;;;OAMG;IACH,kFAeC;;CACJ"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { PROBE_DISPATCH_RAYS } from "./PROBE_CLIPMAP.js";
|
|
3
|
+
import { shader_probe_clipmap_want_hits } from "./shader_probe_clipmap_want_hits.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A clipmap's probes wanted by another clipmap's hits (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.3): each
|
|
7
|
+
* front-face hit of that clipmap's last frame that its own probes did not serve wants the cages its pick reads
|
|
8
|
+
* here (`shader_probe_clipmap_want_hits`). The world cache's wants, from the frustum's rays; a
|
|
9
|
+
* {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
|
|
10
|
+
*
|
|
11
|
+
* It reads the rays as their clipmap left them, so the wanting clipmap's lifetime is recorded before theirs,
|
|
12
|
+
* which writes them over. Give it that clipmap's ray budget with {@link set} before the wanting clipmap's
|
|
13
|
+
* `graph_update`.
|
|
14
|
+
*/
|
|
15
|
+
export class ProbeClipmapHitWants {
|
|
16
|
+
/** @type {import("./GPUProbeClipmap.js").GPUProbeClipmap} */
|
|
17
|
+
#rays_of;
|
|
18
|
+
|
|
19
|
+
#bindings = {};
|
|
20
|
+
|
|
21
|
+
#ray_budget = 0;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {import("./GPUProbeClipmap.js").GPUProbeClipmap} rays_of the clipmap whose last frame's hits want
|
|
25
|
+
*/
|
|
26
|
+
constructor(rays_of) {
|
|
27
|
+
assert.defined(rays_of, 'rays_of');
|
|
28
|
+
|
|
29
|
+
this.#rays_of = rays_of;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The other clipmap's frame.
|
|
34
|
+
*
|
|
35
|
+
* @param {Object} options
|
|
36
|
+
* @param {number} options.ray_budget the rays it casts a frame at most
|
|
37
|
+
*/
|
|
38
|
+
set({ ray_budget }) {
|
|
39
|
+
assert.isPositiveInteger(ray_budget, 'ray_budget');
|
|
40
|
+
|
|
41
|
+
this.#ray_budget = ray_budget;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @returns {number} the most points a frame's wants list: each of the other clipmap's rays, the eight points of
|
|
46
|
+
* a cage in each of two cascades
|
|
47
|
+
*/
|
|
48
|
+
wanted_bound() {
|
|
49
|
+
return 16 * this.#ray_budget;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Nothing of the frame graph's: the rays are the other clipmap's own buffers, read before its lifetime.
|
|
54
|
+
*
|
|
55
|
+
* @param {*} pass
|
|
56
|
+
* @param {Object} data
|
|
57
|
+
*/
|
|
58
|
+
graph_declare(pass, data) {
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @param {GPUCommandEncoder} encoder
|
|
63
|
+
* @param {Object} data the lifetime pass's data
|
|
64
|
+
* @param {*} resources the frame graph's resources
|
|
65
|
+
* @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
|
|
66
|
+
* `probe_wanted_bits` and its want settings as `settings`
|
|
67
|
+
*/
|
|
68
|
+
encode(encoder, data, resources, clipmap) {
|
|
69
|
+
const rays_of = this.#rays_of;
|
|
70
|
+
const b = Object.assign(this.#bindings, clipmap);
|
|
71
|
+
|
|
72
|
+
// as the other clipmap holds them now, which a growth may have replaced since the frame was recorded
|
|
73
|
+
b.probe_trace = rays_of.trace;
|
|
74
|
+
b.probe_origins = rays_of.origins;
|
|
75
|
+
b.probe_rays = rays_of.rays;
|
|
76
|
+
|
|
77
|
+
shader_probe_clipmap_want_hits.dispatchIndirect({
|
|
78
|
+
encoder,
|
|
79
|
+
bindings: b,
|
|
80
|
+
command: rays_of.dispatch,
|
|
81
|
+
command_offset: 4 * PROBE_DISPATCH_RAYS,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A clipmap's probes wanted by the frame's pixels (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3): one pixel of
|
|
3
|
+
* each screen tile wants the cages its pick reads (`shader_probe_clipmap_want`). The wants of the frustum's
|
|
4
|
+
* probes; a {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
|
|
5
|
+
*
|
|
6
|
+
* Give it the frame's G-buffer with {@link set} before the clipmap's `graph_update`.
|
|
7
|
+
*/
|
|
8
|
+
export class ProbeClipmapScreenWants {
|
|
9
|
+
/**
|
|
10
|
+
* The frame's G-buffer and view.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} options
|
|
13
|
+
* @param {number} options.depth graph handle of the frame's depth
|
|
14
|
+
* @param {number} options.normal graph handle of the G-buffer's normals
|
|
15
|
+
* @param {GPUBuffer} options.camera the view's camera uniform
|
|
16
|
+
* @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
|
|
17
|
+
* @param {ArrayLike<number>} options.resolution the frame's pixels, x and y
|
|
18
|
+
*/
|
|
19
|
+
set({ depth, normal, camera, stbn, resolution }: {
|
|
20
|
+
depth: number;
|
|
21
|
+
normal: number;
|
|
22
|
+
camera: GPUBuffer;
|
|
23
|
+
stbn: any;
|
|
24
|
+
resolution: ArrayLike<number>;
|
|
25
|
+
}): void;
|
|
26
|
+
/**
|
|
27
|
+
* @returns {number} the most points a frame's wants list: a pixel of each tile, the eight points of a cage in
|
|
28
|
+
* each of two cascades
|
|
29
|
+
*/
|
|
30
|
+
wanted_bound(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Declare what the wants read on the lifetime's pass.
|
|
33
|
+
*
|
|
34
|
+
* @param {import("../../../../../engine/graphics/render/frame_graph/FramePassBuilder.js").FramePassBuilder} pass
|
|
35
|
+
* @param {Object} data the pass's data, which {@link encode} is given back
|
|
36
|
+
*/
|
|
37
|
+
graph_declare(pass: import("../../../../../engine/graphics/render/frame_graph/FramePassBuilder.js").FramePassBuilder, data: any): void;
|
|
38
|
+
/**
|
|
39
|
+
* @param {GPUCommandEncoder} encoder
|
|
40
|
+
* @param {Object} data the lifetime pass's data
|
|
41
|
+
* @param {*} resources the frame graph's resources
|
|
42
|
+
* @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
|
|
43
|
+
* `probe_wanted_bits` and its want settings as `settings`
|
|
44
|
+
*/
|
|
45
|
+
encode(encoder: GPUCommandEncoder, data: any, resources: any, clipmap: any): void;
|
|
46
|
+
#private;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=ProbeClipmapScreenWants.d.ts.map
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProbeClipmapScreenWants.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH;IAeI;;;;;;;;;OASG;IACH;QAN2B,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACa,MAAM;QACd,IAAI;QACY,UAAU,EAArC,UAAU,MAAM,CAAC;aAqB3B;IAED;;;OAGG;IACH,gBAHa,MAAM,CAKlB;IAED;;;;;OAKG;IACH,oBAHW,OAAO,uEAAuE,EAAE,gBAAgB,mBAQ1G;IAED;;;;;;OAMG;IACH,kFAcC;;CACJ"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { assert } from "../../../../../core/assert.js";
|
|
2
|
+
import { PROBE_WANT_TILE, PROBE_WANT_WORKGROUP_TILES } from "./PROBE_CLIPMAP.js";
|
|
3
|
+
import { shader_probe_clipmap_want } from "./shader_probe_clipmap_want.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A clipmap's probes wanted by the frame's pixels (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.3): one pixel of
|
|
7
|
+
* each screen tile wants the cages its pick reads (`shader_probe_clipmap_want`). The wants of the frustum's
|
|
8
|
+
* probes; a {@link GPUProbeClipmap} records them in its lifetime, between retire and admit.
|
|
9
|
+
*
|
|
10
|
+
* Give it the frame's G-buffer with {@link set} before the clipmap's `graph_update`.
|
|
11
|
+
*/
|
|
12
|
+
export class ProbeClipmapScreenWants {
|
|
13
|
+
#depth = -1;
|
|
14
|
+
#normal = -1;
|
|
15
|
+
|
|
16
|
+
/** @type {GPUBuffer|null} */
|
|
17
|
+
#camera = null;
|
|
18
|
+
|
|
19
|
+
#stbn = null;
|
|
20
|
+
|
|
21
|
+
#groups = [0, 0];
|
|
22
|
+
|
|
23
|
+
#tiles = 0;
|
|
24
|
+
|
|
25
|
+
#bindings = {};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The frame's G-buffer and view.
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} options
|
|
31
|
+
* @param {number} options.depth graph handle of the frame's depth
|
|
32
|
+
* @param {number} options.normal graph handle of the G-buffer's normals
|
|
33
|
+
* @param {GPUBuffer} options.camera the view's camera uniform
|
|
34
|
+
* @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
|
|
35
|
+
* @param {ArrayLike<number>} options.resolution the frame's pixels, x and y
|
|
36
|
+
*/
|
|
37
|
+
set({ depth, normal, camera, stbn, resolution }) {
|
|
38
|
+
assert.isNonNegativeInteger(depth, 'depth');
|
|
39
|
+
assert.isNonNegativeInteger(normal, 'normal');
|
|
40
|
+
assert.defined(camera, 'camera');
|
|
41
|
+
assert.defined(stbn, 'stbn');
|
|
42
|
+
assert.isPositiveInteger(resolution[0], 'resolution[0]');
|
|
43
|
+
assert.isPositiveInteger(resolution[1], 'resolution[1]');
|
|
44
|
+
|
|
45
|
+
this.#depth = depth;
|
|
46
|
+
this.#normal = normal;
|
|
47
|
+
this.#camera = camera;
|
|
48
|
+
this.#stbn = stbn;
|
|
49
|
+
|
|
50
|
+
const tiles_x = Math.ceil(resolution[0] / PROBE_WANT_TILE);
|
|
51
|
+
const tiles_y = Math.ceil(resolution[1] / PROBE_WANT_TILE);
|
|
52
|
+
|
|
53
|
+
this.#groups[0] = Math.ceil(tiles_x / PROBE_WANT_WORKGROUP_TILES);
|
|
54
|
+
this.#groups[1] = Math.ceil(tiles_y / PROBE_WANT_WORKGROUP_TILES);
|
|
55
|
+
this.#tiles = tiles_x * tiles_y;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @returns {number} the most points a frame's wants list: a pixel of each tile, the eight points of a cage in
|
|
60
|
+
* each of two cascades
|
|
61
|
+
*/
|
|
62
|
+
wanted_bound() {
|
|
63
|
+
return 16 * this.#tiles;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Declare what the wants read on the lifetime's pass.
|
|
68
|
+
*
|
|
69
|
+
* @param {import("../../../../../engine/graphics/render/frame_graph/FramePassBuilder.js").FramePassBuilder} pass
|
|
70
|
+
* @param {Object} data the pass's data, which {@link encode} is given back
|
|
71
|
+
*/
|
|
72
|
+
graph_declare(pass, data) {
|
|
73
|
+
assert.isNonNegativeInteger(this.#depth, 'depth: set() first');
|
|
74
|
+
|
|
75
|
+
data.want_depth = pass.read(this.#depth);
|
|
76
|
+
data.want_normal = pass.read(this.#normal);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @param {GPUCommandEncoder} encoder
|
|
81
|
+
* @param {Object} data the lifetime pass's data
|
|
82
|
+
* @param {*} resources the frame graph's resources
|
|
83
|
+
* @param {Object} clipmap what the wanting clipmap binds: `probe_levels`, `probe_wanted`,
|
|
84
|
+
* `probe_wanted_bits` and its want settings as `settings`
|
|
85
|
+
*/
|
|
86
|
+
encode(encoder, data, resources, clipmap) {
|
|
87
|
+
const b = Object.assign(this.#bindings, clipmap);
|
|
88
|
+
|
|
89
|
+
b.gBufferDepth = resources.get(data.want_depth);
|
|
90
|
+
b.gBufferNormals = resources.get(data.want_normal);
|
|
91
|
+
b.camera = this.#camera;
|
|
92
|
+
b.tSTBN_vec2 = this.#stbn;
|
|
93
|
+
|
|
94
|
+
shader_probe_clipmap_want.dispatch({
|
|
95
|
+
encoder,
|
|
96
|
+
group_count_x: this.#groups[0],
|
|
97
|
+
group_count_y: this.#groups[1],
|
|
98
|
+
bindings: b,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|