@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,34 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cascades either clipmap may have at most.
|
|
3
|
-
* @type {number}
|
|
4
|
-
*/
|
|
5
|
-
export const PROBE_CLIPMAP_CASCADE_COUNT_MAX: number;
|
|
6
|
-
/**
|
|
7
|
-
* Cells per axis a cascade of either clipmap may have.
|
|
8
|
-
* @type {ReadonlyArray<number>}
|
|
9
|
-
*/
|
|
10
|
-
export const PROBE_CLIPMAP_CASCADE_RESOLUTIONS: ReadonlyArray<number>;
|
|
11
|
-
/**
|
|
12
|
-
* Bounds of the octahedral radiance and depth resolutions, texels per side.
|
|
13
|
-
* @type {number}
|
|
14
|
-
*/
|
|
15
|
-
export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN: number;
|
|
16
|
-
/**
|
|
17
|
-
* @type {number}
|
|
18
|
-
*/
|
|
19
|
-
export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX: number;
|
|
20
|
-
/**
|
|
21
|
-
* The smallest {@link ProbeClipmapSettings#brick_build_budget}: one workgroup's worth of cells.
|
|
22
|
-
* @type {number}
|
|
23
|
-
*/
|
|
24
|
-
export const PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN: number;
|
|
25
|
-
/**
|
|
26
|
-
* The most {@link ProbeClipmapSettings#mesh_sdf_max_bricks}: 64 bricks are 448 voxels a side, three and a
|
|
27
|
-
* half times Unreal's cap, in seven levels. It bounds the levels a thread walks, and the bake's ring,
|
|
28
|
-
* which holds twice the largest geometry's bricks, to 2^20 entries.
|
|
29
|
-
* @type {number}
|
|
30
|
-
*/
|
|
31
|
-
export const PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT: number;
|
|
32
1
|
/**
|
|
33
2
|
* Settings of {@link ShadeIndirectLightingMode.ProbeClipmap}, held on `Renderer.probe_clipmap` and
|
|
34
3
|
* read every frame the mode runs (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §10).
|
|
@@ -48,7 +17,8 @@ export const PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT: number;
|
|
|
48
17
|
*/
|
|
49
18
|
export class ProbeClipmapSettings {
|
|
50
19
|
/**
|
|
51
|
-
* @param {number} v integer
|
|
20
|
+
* @param {number} v a positive integer; the brick clipmap checks it against what its layout and the
|
|
21
|
+
* device hold when it is built
|
|
52
22
|
*/
|
|
53
23
|
set brick_cascade_count(v: number);
|
|
54
24
|
/**
|
|
@@ -58,7 +28,8 @@ export class ProbeClipmapSettings {
|
|
|
58
28
|
*/
|
|
59
29
|
get brick_cascade_count(): number;
|
|
60
30
|
/**
|
|
61
|
-
* @param {number} v
|
|
31
|
+
* @param {number} v a power of two, since a cascade's cells wrap by masking; the brick clipmap checks
|
|
32
|
+
* the rest of what its layout and the device hold when it is built
|
|
62
33
|
*/
|
|
63
34
|
set brick_cascade_resolution(v: number);
|
|
64
35
|
/**
|
|
@@ -78,7 +49,7 @@ export class ProbeClipmapSettings {
|
|
|
78
49
|
*/
|
|
79
50
|
get brick_voxel_size(): number;
|
|
80
51
|
/**
|
|
81
|
-
* @param {number} v
|
|
52
|
+
* @param {number} v a positive integer
|
|
82
53
|
*/
|
|
83
54
|
set brick_build_budget(v: number);
|
|
84
55
|
/**
|
|
@@ -99,8 +70,8 @@ export class ProbeClipmapSettings {
|
|
|
99
70
|
*/
|
|
100
71
|
get mesh_sdf_voxel_size(): number;
|
|
101
72
|
/**
|
|
102
|
-
* @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks
|
|
103
|
-
*
|
|
73
|
+
* @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks; the
|
|
74
|
+
* geometry SDF manager checks the bake's ring against the device when it sizes it
|
|
104
75
|
*/
|
|
105
76
|
set mesh_sdf_max_bricks(v: number);
|
|
106
77
|
/**
|
|
@@ -188,7 +159,8 @@ export class ProbeClipmapSettings {
|
|
|
188
159
|
*/
|
|
189
160
|
get card_capture_mode(): number;
|
|
190
161
|
/**
|
|
191
|
-
* @param {number} v integer
|
|
162
|
+
* @param {number} v a positive integer; the probe clipmap checks it against what its layout and the
|
|
163
|
+
* device hold when it is built
|
|
192
164
|
*/
|
|
193
165
|
set probe_cascade_count(v: number);
|
|
194
166
|
/**
|
|
@@ -198,7 +170,8 @@ export class ProbeClipmapSettings {
|
|
|
198
170
|
*/
|
|
199
171
|
get probe_cascade_count(): number;
|
|
200
172
|
/**
|
|
201
|
-
* @param {number} v
|
|
173
|
+
* @param {number} v a power of two, since a cascade's points wrap by masking; the probe clipmap checks
|
|
174
|
+
* the rest of what its layout holds when it is built
|
|
202
175
|
*/
|
|
203
176
|
set probe_cascade_resolution(v: number);
|
|
204
177
|
/**
|
|
@@ -218,8 +191,8 @@ export class ProbeClipmapSettings {
|
|
|
218
191
|
*/
|
|
219
192
|
get probe_spacing(): number;
|
|
220
193
|
/**
|
|
221
|
-
* @param {number} v a power of two
|
|
222
|
-
*
|
|
194
|
+
* @param {number} v a power of two from 2: an update's spread of rays walks the texels in bit-reversed
|
|
195
|
+
* order, which needs more than one; the atlas checks a tile against the device
|
|
223
196
|
*/
|
|
224
197
|
set radiance_resolution(v: number);
|
|
225
198
|
/**
|
|
@@ -229,8 +202,7 @@ export class ProbeClipmapSettings {
|
|
|
229
202
|
*/
|
|
230
203
|
get radiance_resolution(): number;
|
|
231
204
|
/**
|
|
232
|
-
* @param {number} v a power of two
|
|
233
|
-
* {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX}
|
|
205
|
+
* @param {number} v a power of two; the atlas checks a tile against the device
|
|
234
206
|
*/
|
|
235
207
|
set depth_resolution(v: number);
|
|
236
208
|
/**
|
|
@@ -240,7 +212,8 @@ export class ProbeClipmapSettings {
|
|
|
240
212
|
*/
|
|
241
213
|
get depth_resolution(): number;
|
|
242
214
|
/**
|
|
243
|
-
* @param {number} v a power of two
|
|
215
|
+
* @param {number} v a power of two, at most `PROBE_TEXEL_RAYS·radiance_resolution²` and
|
|
216
|
+
* `PROBE_DEPTH_TEXEL_RAYS·depth_resolution²`, the rays one thread gathers into a texel, checked
|
|
244
217
|
* against {@link radiance_resolution} when the GI takes the settings
|
|
245
218
|
*/
|
|
246
219
|
set rays_per_probe(v: number);
|
|
@@ -251,41 +224,109 @@ export class ProbeClipmapSettings {
|
|
|
251
224
|
*/
|
|
252
225
|
get rays_per_probe(): number;
|
|
253
226
|
/**
|
|
254
|
-
* @param {number} v integer
|
|
227
|
+
* @param {number} v integer; each set's share is checked against its rays a probe when the GI takes the
|
|
228
|
+
* settings
|
|
255
229
|
*/
|
|
256
230
|
set ray_budget(v: number);
|
|
257
231
|
/**
|
|
258
|
-
* Rays
|
|
259
|
-
*
|
|
260
|
-
* mid tiers (100k and 250k rays a frame). A time knob.
|
|
232
|
+
* Rays both probe sets trace a frame at most, between Enshrouded's low and mid tiers (100k and 250k): the
|
|
233
|
+
* frustum's {@link frustum_ray_budget} and the world cache's {@link world_ray_budget}. A time knob.
|
|
261
234
|
* @returns {number}
|
|
262
235
|
*/
|
|
263
236
|
get ray_budget(): number;
|
|
237
|
+
/**
|
|
238
|
+
* Rays the frustum's probes trace a frame at most, `FRUSTUM_RAY_BUDGET_FRACTION` of {@link ray_budget}
|
|
239
|
+
* rounded down, so `floor(frustum_ray_budget / rays_per_probe)` of them update a frame and every wanted one
|
|
240
|
+
* is traced again after as many frames as that takes.
|
|
241
|
+
* @returns {number}
|
|
242
|
+
*/
|
|
243
|
+
get frustum_ray_budget(): number;
|
|
244
|
+
/**
|
|
245
|
+
* Rays the world cache's probes trace a frame at most: the rest of {@link ray_budget}.
|
|
246
|
+
* @returns {number}
|
|
247
|
+
*/
|
|
248
|
+
get world_ray_budget(): number;
|
|
249
|
+
/**
|
|
250
|
+
* @param {number} v a positive integer; the world cache checks its lattice against what its layout and the
|
|
251
|
+
* device hold when it is built
|
|
252
|
+
*/
|
|
253
|
+
set world_cache_spacing_shift(v: number);
|
|
254
|
+
/**
|
|
255
|
+
* The world cache's probes against the frustum's (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.2): k, its
|
|
256
|
+
* spacing the frustum's over 2^k and its lattice 2^k the frustum's {@link probe_cascade_resolution}, in the
|
|
257
|
+
* frustum's windows, so every frustum probe's point is one of the world cache's. 2, a quarter of the
|
|
258
|
+
* spacing, Enshrouded's denser world cache. Structure.
|
|
259
|
+
* @returns {number}
|
|
260
|
+
*/
|
|
261
|
+
get world_cache_spacing_shift(): number;
|
|
262
|
+
/**
|
|
263
|
+
* @param {number} v a power of two from 2, as {@link radiance_resolution}
|
|
264
|
+
*/
|
|
265
|
+
set world_cache_radiance_resolution(v: number);
|
|
266
|
+
/**
|
|
267
|
+
* Octahedral radiance texels per side of a world cache probe: Enshrouded's 4. Its radiance is only made
|
|
268
|
+
* into its SH, never sampled, so its tiles have no skirt. Structure.
|
|
269
|
+
* @returns {number}
|
|
270
|
+
*/
|
|
271
|
+
get world_cache_radiance_resolution(): number;
|
|
272
|
+
/**
|
|
273
|
+
* @param {number} v a power of two
|
|
274
|
+
*/
|
|
275
|
+
set world_cache_depth_resolution(v: number);
|
|
276
|
+
/**
|
|
277
|
+
* Octahedral depth-moment texels per side of a world cache probe, which a hit's pick weighs it by.
|
|
278
|
+
* Structure.
|
|
279
|
+
* @returns {number}
|
|
280
|
+
*/
|
|
281
|
+
get world_cache_depth_resolution(): number;
|
|
282
|
+
/**
|
|
283
|
+
* @param {number} v a power of two, held as {@link rays_per_probe} is against the world cache's
|
|
284
|
+
* resolutions when the GI takes the settings
|
|
285
|
+
*/
|
|
286
|
+
set world_cache_rays_per_probe(v: number);
|
|
287
|
+
/**
|
|
288
|
+
* Rays a world cache probe traces each uniform update: one a texel at the default
|
|
289
|
+
* {@link world_cache_radiance_resolution}, as {@link rays_per_probe} is for the frustum's.
|
|
290
|
+
* @returns {number}
|
|
291
|
+
*/
|
|
292
|
+
get world_cache_rays_per_probe(): number;
|
|
264
293
|
/**
|
|
265
294
|
* @param {number} v frames, positive and finite
|
|
266
295
|
*/
|
|
267
296
|
set response_frames(v: number);
|
|
268
297
|
/**
|
|
269
|
-
* Frames
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* 30 is half a second at 60 fps
|
|
298
|
+
* Frames over which a neighbour's history goes stale to an update that re-samples it
|
|
299
|
+
* (`history_resampling`): a neighbour last updated Δt frames ago weighs `e^(−Δt / response_frames)`.
|
|
300
|
+
* A probe's own history blends a sample by a sample's blend however long since its last update, the
|
|
301
|
+
* time between them being no change in the light. Frames, not seconds: an update happens in a frame, and
|
|
302
|
+
* the records count them. 30 is half a second at 60 fps.
|
|
274
303
|
* @returns {number}
|
|
275
304
|
*/
|
|
276
305
|
get response_frames(): number;
|
|
277
306
|
/**
|
|
278
307
|
* @param {boolean} v
|
|
279
308
|
*/
|
|
280
|
-
set
|
|
309
|
+
set history_resampling(v: boolean);
|
|
281
310
|
/**
|
|
282
|
-
* Whether each probe update also re-samples its neighbours: every radiance texel takes what four of
|
|
283
|
-
* probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
|
|
284
|
-
* they can see it, each a ray's worth beside its own rays. It traces nothing, and buys
|
|
311
|
+
* Whether each probe update also re-samples its neighbours' histories: every radiance texel takes what four of
|
|
312
|
+
* the probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
|
|
313
|
+
* they can see it, each a ray's worth beside its own rays. It traces nothing, and buys stability for
|
|
285
314
|
* some spatial blur. Off, the update's pass is not recorded. Takes effect the next frame.
|
|
286
315
|
* @returns {boolean}
|
|
287
316
|
*/
|
|
288
|
-
get
|
|
317
|
+
get history_resampling(): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* @param {boolean} v
|
|
320
|
+
*/
|
|
321
|
+
set ray_resampling(v: boolean);
|
|
322
|
+
/**
|
|
323
|
+
* Whether each probe update also re-samples one neighbour's rays of the same frame: it draws a neighbour
|
|
324
|
+
* updated this frame by its radiance and how well the probe sees it, and takes every one of its rays whose hit,
|
|
325
|
+
* or sky, the probe's depth confirms, in the texel the probe sees it in. It traces nothing, and brings in light
|
|
326
|
+
* the neighbour's rays found this frame. Off, the update's passes are not recorded. Takes effect the next frame.
|
|
327
|
+
* @returns {boolean}
|
|
328
|
+
*/
|
|
329
|
+
get ray_resampling(): boolean;
|
|
289
330
|
/**
|
|
290
331
|
* @param {ProbeClipmapDebugView} v
|
|
291
332
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProbeClipmapSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProbeClipmapSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;GAgBG;AACH;IAaI;;;OAGG;IACH,mCAIC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;;OAGG;IACH,wCAKC;IAjBD;;;OAGG;IACH,uCAEC;IAyBD;;OAEG;IACH,gCAKC;IAlBD;;;;;OAKG;IACH,+BAEC;IAuBD;;OAEG;IACH,kCAIC;IAhBD;;;;OAIG;IACH,iCAEC;IAuBD;;OAEG;IACH,mCAKC;IAlBD;;;;;OAKG;IACH,kCAEC;IAyBD;;;OAGG;IACH,mCAMC;IArBD;;;;;;OAMG;IACH,kCAEC;IAoCD;;;OAGG;IACH,oCAKC;IA7BD;;;;;;;;;;;;;;;OAeG;IACH,mCAEC;IA6CD;;;OAGG;IACH,mCAKC;IAvCD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kCAEC;IAoCD;;OAEG;IACH,iCAIC;IA5BD;;;;;;;;;;;;;;;;OAgBG;IACH,gCAEC;IAsBD;;;OAGG;IACH,mCAIC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;;OAGG;IACH,wCAKC;IAjBD;;;OAGG;IACH,uCAEC;IAyBD;;OAEG;IACH,6BAKC;IAlBD;;;;;OAKG;IACH,4BAEC;IAuBD;;;OAGG;IACH,mCAMC;IAnBD;;;;OAIG;IACH,kCAEC;IAyBD;;OAEG;IACH,gCAKC;IAjBD;;;;OAIG;IACH,+BAEC;IAuBD;;;;OAIG;IACH,8BAKC;IAnBD;;;;OAIG;IACH,6BAEC;IAyBD;;;OAGG;IACH,0BAIC;IAjBD;;;;OAIG;IACH,yBAEC;IAYD;;;;;OAKG;IACH,iCAEC;IAED;;;OAGG;IACH,+BAEC;IAeD;;;OAGG;IACH,yCAIC;IAnBD;;;;;;OAMG;IACH,wCAEC;IAuBD;;OAEG;IACH,+CAMC;IAlBD;;;;OAIG;IACH,8CAEC;IAwBD;;OAEG;IACH,4CAKC;IAjBD;;;;OAIG;IACH,2CAEC;IAuBD;;;OAGG;IACH,0CAKC;IAlBD;;;;OAIG;IACH,yCAEC;IA2BD;;OAEG;IACH,+BAKC;IApBD;;;;;;;OAOG;IACH,8BAEC;IAyBD;;OAEG;IACH,mCAIC;IAlBD;;;;;;OAMG;IACH,kCAEC;IAwBD;;OAEG;IACH,+BAIC;IAlBD;;;;;;OAMG;IACH,8BAEC;IAsBD;;OAEG;IACH,0BAIC;IAhBD;;;;OAIG;IACH,yBAEC;;CAUJ"}
|
|
@@ -4,43 +4,7 @@ import { MESH_CARD_CAPTURE_BUDGET_MAX } from "../../geometry/sdf/cards/GPUMeshCa
|
|
|
4
4
|
import { MeshCardCaptureMode } from "../../geometry/sdf/cards/MeshCardCaptureMode.js";
|
|
5
5
|
import { MESH_SDF_BAKE_BUDGET_MAX } from "../../geometry/sdf/GPUGeometrySDFManager.js";
|
|
6
6
|
import { ProbeClipmapDebugView } from "./debug/ProbeClipmapDebugView.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Cascades either clipmap may have at most.
|
|
10
|
-
* @type {number}
|
|
11
|
-
*/
|
|
12
|
-
export const PROBE_CLIPMAP_CASCADE_COUNT_MAX = 8;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Cells per axis a cascade of either clipmap may have.
|
|
16
|
-
* @type {ReadonlyArray<number>}
|
|
17
|
-
*/
|
|
18
|
-
export const PROBE_CLIPMAP_CASCADE_RESOLUTIONS = Object.freeze([16, 32, 64]);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Bounds of the octahedral radiance and depth resolutions, texels per side.
|
|
22
|
-
* @type {number}
|
|
23
|
-
*/
|
|
24
|
-
export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN = 4;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @type {number}
|
|
28
|
-
*/
|
|
29
|
-
export const PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX = 32;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The smallest {@link ProbeClipmapSettings#brick_build_budget}: one workgroup's worth of cells.
|
|
33
|
-
* @type {number}
|
|
34
|
-
*/
|
|
35
|
-
export const PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN = 64;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The most {@link ProbeClipmapSettings#mesh_sdf_max_bricks}: 64 bricks are 448 voxels a side, three and a
|
|
39
|
-
* half times Unreal's cap, in seven levels. It bounds the levels a thread walks, and the bake's ring,
|
|
40
|
-
* which holds twice the largest geometry's bricks, to 2^20 entries.
|
|
41
|
-
* @type {number}
|
|
42
|
-
*/
|
|
43
|
-
export const PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT = 64;
|
|
7
|
+
import { FRUSTUM_RAY_BUDGET_FRACTION } from "./probe/PROBE_CLIPMAP.js";
|
|
44
8
|
|
|
45
9
|
/**
|
|
46
10
|
* Settings of {@link ShadeIndirectLightingMode.ProbeClipmap}, held on `Renderer.probe_clipmap` and
|
|
@@ -73,11 +37,11 @@ export class ProbeClipmapSettings {
|
|
|
73
37
|
}
|
|
74
38
|
|
|
75
39
|
/**
|
|
76
|
-
* @param {number} v integer
|
|
40
|
+
* @param {number} v a positive integer; the brick clipmap checks it against what its layout and the
|
|
41
|
+
* device hold when it is built
|
|
77
42
|
*/
|
|
78
43
|
set brick_cascade_count(v) {
|
|
79
44
|
assert.isPositiveInteger(v, 'brick_cascade_count');
|
|
80
|
-
assert.lessThanOrEqual(v, PROBE_CLIPMAP_CASCADE_COUNT_MAX, 'brick_cascade_count');
|
|
81
45
|
|
|
82
46
|
this.#brick_cascade_count = v;
|
|
83
47
|
}
|
|
@@ -93,10 +57,12 @@ export class ProbeClipmapSettings {
|
|
|
93
57
|
}
|
|
94
58
|
|
|
95
59
|
/**
|
|
96
|
-
* @param {number} v
|
|
60
|
+
* @param {number} v a power of two, since a cascade's cells wrap by masking; the brick clipmap checks
|
|
61
|
+
* the rest of what its layout and the device hold when it is built
|
|
97
62
|
*/
|
|
98
63
|
set brick_cascade_resolution(v) {
|
|
99
|
-
assert.
|
|
64
|
+
assert.isPositiveInteger(v, 'brick_cascade_resolution');
|
|
65
|
+
assert.ok(isPowerOfTwo(v), 'brick_cascade_resolution must be a power of two');
|
|
100
66
|
|
|
101
67
|
this.#brick_cascade_resolution = v;
|
|
102
68
|
}
|
|
@@ -135,11 +101,10 @@ export class ProbeClipmapSettings {
|
|
|
135
101
|
}
|
|
136
102
|
|
|
137
103
|
/**
|
|
138
|
-
* @param {number} v
|
|
104
|
+
* @param {number} v a positive integer
|
|
139
105
|
*/
|
|
140
106
|
set brick_build_budget(v) {
|
|
141
107
|
assert.isPositiveInteger(v, 'brick_build_budget');
|
|
142
|
-
assert.greaterThanOrEqual(v, PROBE_CLIPMAP_BRICK_BUILD_BUDGET_MIN, 'brick_build_budget');
|
|
143
108
|
|
|
144
109
|
this.#brick_build_budget = v;
|
|
145
110
|
}
|
|
@@ -180,13 +145,12 @@ export class ProbeClipmapSettings {
|
|
|
180
145
|
}
|
|
181
146
|
|
|
182
147
|
/**
|
|
183
|
-
* @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks
|
|
184
|
-
*
|
|
148
|
+
* @param {number} v an even integer from 2, since a geometry's grid grows in steps of two bricks; the
|
|
149
|
+
* geometry SDF manager checks the bake's ring against the device when it sizes it
|
|
185
150
|
*/
|
|
186
151
|
set mesh_sdf_max_bricks(v) {
|
|
187
152
|
assert.isPositiveInteger(v, 'mesh_sdf_max_bricks');
|
|
188
153
|
assert.greaterThanOrEqual(v, 2, 'mesh_sdf_max_bricks');
|
|
189
|
-
assert.lessThanOrEqual(v, PROBE_CLIPMAP_MESH_SDF_MAX_BRICKS_LIMIT, 'mesh_sdf_max_bricks');
|
|
190
154
|
assert.equal(v % 2, 0, 'mesh_sdf_max_bricks must be even');
|
|
191
155
|
|
|
192
156
|
this.#mesh_sdf_max_bricks = v;
|
|
@@ -312,11 +276,11 @@ export class ProbeClipmapSettings {
|
|
|
312
276
|
}
|
|
313
277
|
|
|
314
278
|
/**
|
|
315
|
-
* @param {number} v integer
|
|
279
|
+
* @param {number} v a positive integer; the probe clipmap checks it against what its layout and the
|
|
280
|
+
* device hold when it is built
|
|
316
281
|
*/
|
|
317
282
|
set probe_cascade_count(v) {
|
|
318
283
|
assert.isPositiveInteger(v, 'probe_cascade_count');
|
|
319
|
-
assert.lessThanOrEqual(v, PROBE_CLIPMAP_CASCADE_COUNT_MAX, 'probe_cascade_count');
|
|
320
284
|
|
|
321
285
|
this.#probe_cascade_count = v;
|
|
322
286
|
}
|
|
@@ -332,10 +296,12 @@ export class ProbeClipmapSettings {
|
|
|
332
296
|
}
|
|
333
297
|
|
|
334
298
|
/**
|
|
335
|
-
* @param {number} v
|
|
299
|
+
* @param {number} v a power of two, since a cascade's points wrap by masking; the probe clipmap checks
|
|
300
|
+
* the rest of what its layout holds when it is built
|
|
336
301
|
*/
|
|
337
302
|
set probe_cascade_resolution(v) {
|
|
338
|
-
assert.
|
|
303
|
+
assert.isPositiveInteger(v, 'probe_cascade_resolution');
|
|
304
|
+
assert.ok(isPowerOfTwo(v), 'probe_cascade_resolution must be a power of two');
|
|
339
305
|
|
|
340
306
|
this.#probe_cascade_resolution = v;
|
|
341
307
|
}
|
|
@@ -374,14 +340,13 @@ export class ProbeClipmapSettings {
|
|
|
374
340
|
}
|
|
375
341
|
|
|
376
342
|
/**
|
|
377
|
-
* @param {number} v a power of two
|
|
378
|
-
*
|
|
343
|
+
* @param {number} v a power of two from 2: an update's spread of rays walks the texels in bit-reversed
|
|
344
|
+
* order, which needs more than one; the atlas checks a tile against the device
|
|
379
345
|
*/
|
|
380
346
|
set radiance_resolution(v) {
|
|
381
347
|
assert.isPositiveInteger(v, 'radiance_resolution');
|
|
382
348
|
assert.ok(isPowerOfTwo(v), 'radiance_resolution must be a power of two');
|
|
383
|
-
assert.greaterThanOrEqual(v,
|
|
384
|
-
assert.lessThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX, 'radiance_resolution');
|
|
349
|
+
assert.greaterThanOrEqual(v, 2, 'radiance_resolution');
|
|
385
350
|
|
|
386
351
|
this.#radiance_resolution = v;
|
|
387
352
|
}
|
|
@@ -398,14 +363,11 @@ export class ProbeClipmapSettings {
|
|
|
398
363
|
}
|
|
399
364
|
|
|
400
365
|
/**
|
|
401
|
-
* @param {number} v a power of two
|
|
402
|
-
* {@link PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX}
|
|
366
|
+
* @param {number} v a power of two; the atlas checks a tile against the device
|
|
403
367
|
*/
|
|
404
368
|
set depth_resolution(v) {
|
|
405
369
|
assert.isPositiveInteger(v, 'depth_resolution');
|
|
406
370
|
assert.ok(isPowerOfTwo(v), 'depth_resolution must be a power of two');
|
|
407
|
-
assert.greaterThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN, 'depth_resolution');
|
|
408
|
-
assert.lessThanOrEqual(v, PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX, 'depth_resolution');
|
|
409
371
|
|
|
410
372
|
this.#depth_resolution = v;
|
|
411
373
|
}
|
|
@@ -422,7 +384,8 @@ export class ProbeClipmapSettings {
|
|
|
422
384
|
}
|
|
423
385
|
|
|
424
386
|
/**
|
|
425
|
-
* @param {number} v a power of two
|
|
387
|
+
* @param {number} v a power of two, at most `PROBE_TEXEL_RAYS·radiance_resolution²` and
|
|
388
|
+
* `PROBE_DEPTH_TEXEL_RAYS·depth_resolution²`, the rays one thread gathers into a texel, checked
|
|
426
389
|
* against {@link radiance_resolution} when the GI takes the settings
|
|
427
390
|
*/
|
|
428
391
|
set rays_per_probe(v) {
|
|
@@ -435,9 +398,8 @@ export class ProbeClipmapSettings {
|
|
|
435
398
|
#ray_budget = 131072;
|
|
436
399
|
|
|
437
400
|
/**
|
|
438
|
-
* Rays
|
|
439
|
-
*
|
|
440
|
-
* mid tiers (100k and 250k rays a frame). A time knob.
|
|
401
|
+
* Rays both probe sets trace a frame at most, between Enshrouded's low and mid tiers (100k and 250k): the
|
|
402
|
+
* frustum's {@link frustum_ray_budget} and the world cache's {@link world_ray_budget}. A time knob.
|
|
441
403
|
* @returns {number}
|
|
442
404
|
*/
|
|
443
405
|
get ray_budget() {
|
|
@@ -445,7 +407,8 @@ export class ProbeClipmapSettings {
|
|
|
445
407
|
}
|
|
446
408
|
|
|
447
409
|
/**
|
|
448
|
-
* @param {number} v integer
|
|
410
|
+
* @param {number} v integer; each set's share is checked against its rays a probe when the GI takes the
|
|
411
|
+
* settings
|
|
449
412
|
*/
|
|
450
413
|
set ray_budget(v) {
|
|
451
414
|
assert.isPositiveInteger(v, 'ray_budget');
|
|
@@ -453,14 +416,120 @@ export class ProbeClipmapSettings {
|
|
|
453
416
|
this.#ray_budget = v;
|
|
454
417
|
}
|
|
455
418
|
|
|
419
|
+
/**
|
|
420
|
+
* Rays the frustum's probes trace a frame at most, `FRUSTUM_RAY_BUDGET_FRACTION` of {@link ray_budget}
|
|
421
|
+
* rounded down, so `floor(frustum_ray_budget / rays_per_probe)` of them update a frame and every wanted one
|
|
422
|
+
* is traced again after as many frames as that takes.
|
|
423
|
+
* @returns {number}
|
|
424
|
+
*/
|
|
425
|
+
get frustum_ray_budget() {
|
|
426
|
+
return Math.floor(this.#ray_budget * FRUSTUM_RAY_BUDGET_FRACTION);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Rays the world cache's probes trace a frame at most: the rest of {@link ray_budget}.
|
|
431
|
+
* @returns {number}
|
|
432
|
+
*/
|
|
433
|
+
get world_ray_budget() {
|
|
434
|
+
return this.#ray_budget - this.frustum_ray_budget;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
#world_cache_spacing_shift = 2;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* The world cache's probes against the frustum's (WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.2): k, its
|
|
441
|
+
* spacing the frustum's over 2^k and its lattice 2^k the frustum's {@link probe_cascade_resolution}, in the
|
|
442
|
+
* frustum's windows, so every frustum probe's point is one of the world cache's. 2, a quarter of the
|
|
443
|
+
* spacing, Enshrouded's denser world cache. Structure.
|
|
444
|
+
* @returns {number}
|
|
445
|
+
*/
|
|
446
|
+
get world_cache_spacing_shift() {
|
|
447
|
+
return this.#world_cache_spacing_shift;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* @param {number} v a positive integer; the world cache checks its lattice against what its layout and the
|
|
452
|
+
* device hold when it is built
|
|
453
|
+
*/
|
|
454
|
+
set world_cache_spacing_shift(v) {
|
|
455
|
+
assert.isPositiveInteger(v, 'world_cache_spacing_shift');
|
|
456
|
+
|
|
457
|
+
this.#world_cache_spacing_shift = v;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
#world_cache_radiance_resolution = 4;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Octahedral radiance texels per side of a world cache probe: Enshrouded's 4. Its radiance is only made
|
|
464
|
+
* into its SH, never sampled, so its tiles have no skirt. Structure.
|
|
465
|
+
* @returns {number}
|
|
466
|
+
*/
|
|
467
|
+
get world_cache_radiance_resolution() {
|
|
468
|
+
return this.#world_cache_radiance_resolution;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* @param {number} v a power of two from 2, as {@link radiance_resolution}
|
|
473
|
+
*/
|
|
474
|
+
set world_cache_radiance_resolution(v) {
|
|
475
|
+
assert.isPositiveInteger(v, 'world_cache_radiance_resolution');
|
|
476
|
+
assert.ok(isPowerOfTwo(v), 'world_cache_radiance_resolution must be a power of two');
|
|
477
|
+
assert.greaterThanOrEqual(v, 2, 'world_cache_radiance_resolution');
|
|
478
|
+
|
|
479
|
+
this.#world_cache_radiance_resolution = v;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
#world_cache_depth_resolution = 4;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Octahedral depth-moment texels per side of a world cache probe, which a hit's pick weighs it by.
|
|
486
|
+
* Structure.
|
|
487
|
+
* @returns {number}
|
|
488
|
+
*/
|
|
489
|
+
get world_cache_depth_resolution() {
|
|
490
|
+
return this.#world_cache_depth_resolution;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @param {number} v a power of two
|
|
495
|
+
*/
|
|
496
|
+
set world_cache_depth_resolution(v) {
|
|
497
|
+
assert.isPositiveInteger(v, 'world_cache_depth_resolution');
|
|
498
|
+
assert.ok(isPowerOfTwo(v), 'world_cache_depth_resolution must be a power of two');
|
|
499
|
+
|
|
500
|
+
this.#world_cache_depth_resolution = v;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
#world_cache_rays_per_probe = 16;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Rays a world cache probe traces each uniform update: one a texel at the default
|
|
507
|
+
* {@link world_cache_radiance_resolution}, as {@link rays_per_probe} is for the frustum's.
|
|
508
|
+
* @returns {number}
|
|
509
|
+
*/
|
|
510
|
+
get world_cache_rays_per_probe() {
|
|
511
|
+
return this.#world_cache_rays_per_probe;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @param {number} v a power of two, held as {@link rays_per_probe} is against the world cache's
|
|
516
|
+
* resolutions when the GI takes the settings
|
|
517
|
+
*/
|
|
518
|
+
set world_cache_rays_per_probe(v) {
|
|
519
|
+
assert.isPositiveInteger(v, 'world_cache_rays_per_probe');
|
|
520
|
+
assert.ok(isPowerOfTwo(v), 'world_cache_rays_per_probe must be a power of two');
|
|
521
|
+
|
|
522
|
+
this.#world_cache_rays_per_probe = v;
|
|
523
|
+
}
|
|
524
|
+
|
|
456
525
|
#response_frames = 30;
|
|
457
526
|
|
|
458
527
|
/**
|
|
459
|
-
* Frames
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* 30 is half a second at 60 fps
|
|
528
|
+
* Frames over which a neighbour's history goes stale to an update that re-samples it
|
|
529
|
+
* (`history_resampling`): a neighbour last updated Δt frames ago weighs `e^(−Δt / response_frames)`.
|
|
530
|
+
* A probe's own history blends a sample by a sample's blend however long since its last update, the
|
|
531
|
+
* time between them being no change in the light. Frames, not seconds: an update happens in a frame, and
|
|
532
|
+
* the records count them. 30 is half a second at 60 fps.
|
|
464
533
|
* @returns {number}
|
|
465
534
|
*/
|
|
466
535
|
get response_frames() {
|
|
@@ -477,26 +546,48 @@ export class ProbeClipmapSettings {
|
|
|
477
546
|
this.#response_frames = v;
|
|
478
547
|
}
|
|
479
548
|
|
|
480
|
-
#
|
|
549
|
+
#history_resampling = false;
|
|
481
550
|
|
|
482
551
|
/**
|
|
483
|
-
* Whether each probe update also re-samples its neighbours: every radiance texel takes what four of
|
|
484
|
-
* probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
|
|
485
|
-
* they can see it, each a ray's worth beside its own rays. It traces nothing, and buys
|
|
552
|
+
* Whether each probe update also re-samples its neighbours' histories: every radiance texel takes what four of
|
|
553
|
+
* the probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
|
|
554
|
+
* they can see it, each a ray's worth beside its own rays. It traces nothing, and buys stability for
|
|
486
555
|
* some spatial blur. Off, the update's pass is not recorded. Takes effect the next frame.
|
|
487
556
|
* @returns {boolean}
|
|
488
557
|
*/
|
|
489
|
-
get
|
|
490
|
-
return this.#
|
|
558
|
+
get history_resampling() {
|
|
559
|
+
return this.#history_resampling;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* @param {boolean} v
|
|
564
|
+
*/
|
|
565
|
+
set history_resampling(v) {
|
|
566
|
+
assert.isBoolean(v, 'history_resampling');
|
|
567
|
+
|
|
568
|
+
this.#history_resampling = v;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
#ray_resampling = false;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Whether each probe update also re-samples one neighbour's rays of the same frame: it draws a neighbour
|
|
575
|
+
* updated this frame by its radiance and how well the probe sees it, and takes every one of its rays whose hit,
|
|
576
|
+
* or sky, the probe's depth confirms, in the texel the probe sees it in. It traces nothing, and brings in light
|
|
577
|
+
* the neighbour's rays found this frame. Off, the update's passes are not recorded. Takes effect the next frame.
|
|
578
|
+
* @returns {boolean}
|
|
579
|
+
*/
|
|
580
|
+
get ray_resampling() {
|
|
581
|
+
return this.#ray_resampling;
|
|
491
582
|
}
|
|
492
583
|
|
|
493
584
|
/**
|
|
494
585
|
* @param {boolean} v
|
|
495
586
|
*/
|
|
496
|
-
set
|
|
497
|
-
assert.isBoolean(v, '
|
|
587
|
+
set ray_resampling(v) {
|
|
588
|
+
assert.isBoolean(v, 'ray_resampling');
|
|
498
589
|
|
|
499
|
-
this.#
|
|
590
|
+
this.#ray_resampling = v;
|
|
500
591
|
}
|
|
501
592
|
|
|
502
593
|
#debug_view = ProbeClipmapDebugView.None;
|
|
@@ -55,8 +55,10 @@ export class GPUBrickClipmap {
|
|
|
55
55
|
/**
|
|
56
56
|
* @param {GPUDevice} device
|
|
57
57
|
* @param {object} options
|
|
58
|
-
* @param {number} options.cascade_count
|
|
59
|
-
* @param {number} options.resolution
|
|
58
|
+
* @param {number} options.cascade_count at most the levels table holds, {@link CLIPMAP_LEVEL_LIMIT}
|
|
59
|
+
* @param {number} options.resolution a power of two, at least an occupancy block,
|
|
60
|
+
* {@link BRICK_OCCUPANCY_BLOCK}; the brick map's height, resolution · cascade_count, at most the
|
|
61
|
+
* device's `maxTextureDimension3D`
|
|
60
62
|
* @param {number} options.voxel_size metres
|
|
61
63
|
*/
|
|
62
64
|
constructor(device: GPUDevice, { cascade_count, resolution, voxel_size }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GPUBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GPUBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js"],"names":[],"mappings":"AAwFA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IA2JI;;;;;;;;OAQG;IACH;QAN2B,aAAa,EAA7B,MAAM;QACU,UAAU,EAA1B,MAAM;QAGU,UAAU,EAA1B,MAAM;OAiGhB;IAlQD;;;OAGG;IACH,wBAHU,MAAM,CAGF;IAEd;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAEX;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAkPX;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,yBAEC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;;;;;;OAQG;IACH,mCASC;IAED;;;OAGG;IACH,uBAEC;IAED;;;;OAIG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;;;;OAMG;IACH,sBAFW,UAAU,MAAM,CAAC,QAiB3B;IAED;;;OAGG;IACH,oBAHW,oBAAoB,GAClB,OAAO,CAMnB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH;QAZ+B,KAAK,EAAzB,UAAU;QACM,CAAC,EAAjB,MAAM;QACU,CAAC,EAAjB,MAAM;QACU,CAAC,EAAjB,MAAM;QACU,MAAM,EAAtB,MAAM;QAC4B,SAAS,EAA3C,UAAU,aAAa,CAAC;QACM,KAAK,EAAnC,eAAe,GAAC,IAAI;QACH,MAAM,GAAvB,MAAM;QAEJ,MAAM,CAoGlB;IAmWD,gBAcC;;CACJ;mCA17BY,OAAO,4BAA4B,EAAE,oBAAoB;yBACzD,OAAO,iEAAiE,EAAE,UAAU;8BACpF,OAAO,mCAAmC,EAAE,eAAe;;;;;;;WAyC1D,UAAU;;;;WACV,MAAM;;;;;;UACN,MAAM;;;;;aAGN,MAAM;;;;sBAEN,MAAM;;;;;mBAEN,MAAM;;;;gBACN,MAAM;mBACN,MAAM;;;;;;;;;;WAGN,eAAe;;;+BAMN,UAAU,QAAE,oBAAoB,KAAG,IAAI;;+BAxF/B,0CAA0C"}
|