@woosh/meep-engine 3.59.0 → 3.60.0
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/package.json +1 -1
- package/src/shade/playground/probe_clipmap/index.html +12 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +5 -0
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +4 -6
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +63 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +228 -16
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +27 -4
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +526 -23
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts +11 -0
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.js +21 -0
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts +65 -0
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +376 -0
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts +7 -3
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.js +70 -6
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts +20 -0
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.js +80 -0
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts +18 -0
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.js +113 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts +47 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGEO_SDF.js +80 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +91 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +902 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts +16 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_collect.js +67 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_decode.js +145 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/sdf/shader_vgeo_sdf_traverse.js +105 -0
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.js +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +3 -9
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +13 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +764 -48
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md +410 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +3 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +4 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +41 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +57 -33
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +11 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js +13 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +9 -18
- 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 +8 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts +12 -0
- 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 +28 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -29
- 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 +1 -74
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +161 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +219 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.d.ts +1 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK_INSTANCE_STRUCT.js +1 -9
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts +40 -12
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js +373 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.js +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +15 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +28 -14
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts +23 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +66 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts +29 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +210 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_command.d.ts +29 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_command.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_command.js +86 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts +41 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js +439 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts +23 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +135 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_free.d.ts +3 -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 +12 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +21 -18
- 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 +254 -73
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +149 -8
- 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 +181 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +179 -7
- 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 +412 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +4 -4
- 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 +4 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +36 -10
- 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 +218 -29
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +5 -1
- 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 +24 -14
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.d.ts +15 -6
- 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 +21 -22
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts +36 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.js +257 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +18 -7
- 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 +157 -51
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts +23 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.js +110 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +24 -2
- 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 +90 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts +45 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_ray_layout.js +205 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_relocate.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.d.ts +16 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.js +55 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_schedule.d.ts +19 -4
- 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 +60 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +4 -8
- 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 +21 -36
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +21 -14
- 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 +100 -30
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace_command.d.ts +6 -2
- 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 +26 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +3 -2
- 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 +12 -12
- package/src/shade/renderer/gpu_primitive/sort/SORT_DIGIT_SETTINGS_STRUCT.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/sort/SORT_DIGIT_SETTINGS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/SORT_DIGIT_SETTINGS_STRUCT.js +21 -0
- package/src/shade/renderer/gpu_primitive/sort/SORT_PASS_SETTINGS_STRUCT.d.ts +5 -2
- package/src/shade/renderer/gpu_primitive/sort/SORT_PASS_SETTINGS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/SORT_PASS_SETTINGS_STRUCT.js +31 -23
- package/src/shade/renderer/gpu_primitive/sort/SORT_SIZE_STRUCT.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/sort/SORT_SIZE_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/SORT_SIZE_STRUCT.js +22 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_constants.d.ts +9 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_constants.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_constants.js +18 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_digit.d.ts +8 -3
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_digit.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_digit.js +41 -32
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_histogram_tile.d.ts +31 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_histogram_tile.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_histogram_tile.js +71 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_scatter_tile.d.ts +47 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_scatter_tile.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_scatter_tile.js +210 -0
- package/src/shade/renderer/gpu_primitive/sort/defs.d.ts +5 -4
- package/src/shade/renderer/gpu_primitive/sort/defs.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/defs.js +5 -4
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +56 -15
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +410 -61
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram.d.ts +4 -1
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram.js +16 -42
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram_indirect.d.ts +15 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram_indirect.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_histogram_indirect.js +60 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_prepare.d.ts +25 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_prepare.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_prepare.js +89 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter.d.ts +3 -8
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter.js +28 -160
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter_indirect.d.ts +12 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter_indirect.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/shader_radix_sort_scatter_indirect.js +74 -0
- package/src/shade/renderer/gpu_primitive/sort/verify_radix_sort.d.ts +3 -1
- package/src/shade/renderer/gpu_primitive/sort/verify_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/verify_radix_sort.js +387 -188
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.js +1 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.js +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +90 -72
- package/src/shade/renderer/material/resident/RESIDENT_MATERIAL_TEXTURE_LAYOUT.d.ts +5 -0
- package/src/shade/renderer/material/resident/RESIDENT_MATERIAL_TEXTURE_LAYOUT.d.ts.map +1 -1
- package/src/shade/renderer/material/resident/RESIDENT_MATERIAL_TEXTURE_LAYOUT.js +9 -0
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts +13 -0
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.js +14 -0
- package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.d.ts +10 -0
- package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.js +15 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_tangent_normal.d.ts +4 -3
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_tangent_normal.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_tangent_normal.js +6 -5
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture.d.ts +17 -2
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture.js +25 -57
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_exact.d.ts +13 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_exact.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_exact.js +70 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_stochastic.d.ts +10 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_stochastic.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_sample_texture_stochastic.js +59 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_texture_load.d.ts +12 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_texture_load.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_indirect_texture_load.js +49 -0
- package/src/shade/renderer/path_tracer/shader/chunk_ray_hit_to_opacity.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_ray_hit_to_opacity.js +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.js +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material.js +2 -1
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts +7 -0
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +15 -6
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +7 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +26 -1
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.d.ts +7 -7
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.js +262 -294
- package/src/shade/renderer/shader/chunk/filter/MULTISCALE_MEAN_STRUCT.d.ts +9 -0
- package/src/shade/renderer/shader/chunk/filter/MULTISCALE_MEAN_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/filter/MULTISCALE_MEAN_STRUCT.js +21 -0
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +43 -0
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +87 -0
- package/src/shade/renderer/shader/chunk/noise/r/chunk_r2_canonical.d.ts +7 -1
- package/src/shade/renderer/shader/chunk/noise/r/chunk_r2_canonical.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/r/chunk_r2_canonical.js +1 -1
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.d.ts +21 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_reserve_workgroup.js +42 -0
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts +19 -0
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/CPUBitmapData.js +27 -0
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +39 -18
- package/src/view/elements/progress/segmented/GhostTrail.d.ts +56 -0
- package/src/view/elements/progress/segmented/GhostTrail.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/GhostTrail.js +98 -0
- package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.d.ts +3 -1
- package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.js +3 -1
- package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.d.ts +11 -0
- package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.js +15 -0
- package/src/view/elements/progress/segmented/SegmentDefinition.d.ts +3 -0
- package/src/view/elements/progress/segmented/SegmentDefinition.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentDefinition.js +3 -0
- package/src/view/elements/progress/segmented/SegmentTier.d.ts +38 -0
- package/src/view/elements/progress/segmented/SegmentTier.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/SegmentTier.js +50 -0
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +155 -10
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +427 -101
- package/src/view/elements/progress/segmented/playground/index.html +78 -0
- package/src/view/elements/progress/segmented/playground/main.d.ts +2 -0
- package/src/view/elements/progress/segmented/playground/main.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/playground/main.js +173 -0
- package/src/view/elements/progress/segmented/segment_cell_layout.d.ts +48 -0
- package/src/view/elements/progress/segmented/segment_cell_layout.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/segment_cell_layout.js +75 -0
- package/src/view/elements/progress/segmented/segment_notch_place.d.ts +18 -0
- package/src/view/elements/progress/segmented/segment_notch_place.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/segment_notch_place.js +28 -0
- package/src/view/elements/progress/segmented/segment_tick_positions.d.ts +32 -0
- package/src/view/elements/progress/segmented/segment_tick_positions.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/segment_tick_positions.js +103 -0
- package/src/view/elements/progress/segmented/segmented-resource-bar.css +142 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.d.ts +0 -35
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.js +0 -238
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts +0 -99
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.js +0 -139
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts +0 -65
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.js +0 -393
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts +0 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.js +0 -36
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts +0 -29
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.js +0 -108
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts +0 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.js +0 -113
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts +0 -36
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.js +0 -85
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts +0 -23
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.js +0 -273
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts +0 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.js +0 -151
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts +0 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.js +0 -133
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts +0 -22
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.js +0 -135
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
2
|
import { isPowerOfTwo } from "../../../../core/math/isPowerOfTwo.js";
|
|
3
3
|
import { MESH_CARD_CAPTURE_BUDGET_MAX } from "../../geometry/sdf/cards/GPUMeshCardSets.js";
|
|
4
|
+
import { MeshCardCaptureMode } from "../../geometry/sdf/cards/MeshCardCaptureMode.js";
|
|
4
5
|
import { MESH_SDF_BAKE_BUDGET_MAX } from "../../geometry/sdf/GPUGeometrySDFManager.js";
|
|
5
6
|
import { ProbeClipmapDebugView } from "./debug/ProbeClipmapDebugView.js";
|
|
6
7
|
|
|
@@ -239,8 +240,17 @@ export class ProbeClipmapSettings {
|
|
|
239
240
|
* GPU with another load of 40–73%, which is in the medians: the least loaded frames cost 0.11 ms at
|
|
240
241
|
* 16,384. At the default Sponza's cards are captured in 10 frames.
|
|
241
242
|
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
243
|
+
* Re-derived once the material reads became trilinear at a texel's footprint (2026-10-30), which
|
|
244
|
+
* costs 1.30× at the median, timed on the same pages in the same frame: 16,384 pages cost 0.54 and
|
|
245
|
+
* 0.55 ms at the median in two runs (the old capture 0.54 ms beside them), 32,768 cost 1.48 and
|
|
246
|
+
* 1.52 ms, and the least loaded frames 0.15 ms at 16,384.
|
|
247
|
+
*
|
|
248
|
+
* On the AMD iGPU (RDNA2), measured before that, a page costs 0.78 µs: 16,384 pages cost 33.5 ms at
|
|
249
|
+
* the median, and about 1,290 fit 1 ms (1,024 cost 0.80 ms).
|
|
250
|
+
*
|
|
251
|
+
* Derived for {@link MeshCardCaptureMode.Trace}. A rastered card set is taken whole, the frame's
|
|
252
|
+
* last past the budget, and a frame also stops at what its scratch holds: at the largest budget
|
|
253
|
+
* Sponza's recapture took 13 frames on the iGPU, 2.5 ms of capture a frame on average.
|
|
244
254
|
* @returns {number}
|
|
245
255
|
*/
|
|
246
256
|
get card_capture_budget() {
|
|
@@ -258,6 +268,38 @@ export class ProbeClipmapSettings {
|
|
|
258
268
|
this.#card_capture_budget = v;
|
|
259
269
|
}
|
|
260
270
|
|
|
271
|
+
#card_capture_mode = MeshCardCaptureMode.Raster;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* How card pages are captured: each card drawn through its material's own template and textures,
|
|
275
|
+
* or a ray a texel against the geometry's BLAS with the path tracer's material sampling. A change
|
|
276
|
+
* captures every card set again.
|
|
277
|
+
*
|
|
278
|
+
* Raster is the default. The trace took one level-0 tap of the material's 64² resident copy a
|
|
279
|
+
* texel and kept it, which aliased: on Sponza's outer wall the brick texture's dark band, every
|
|
280
|
+
* 12.8 card texels, landed on a row of texels once and between rows at its other repeats, a seam
|
|
281
|
+
* across the wall. The raster samples the texture's mips at the card texel's footprint, as UE's
|
|
282
|
+
* card capture does, and since 2026-10-30 the trace reads the resident copy's mips there too,
|
|
283
|
+
* trilinearly, at 1.30× its cost (see {@link card_capture_budget}). Against the one-tap trace, the
|
|
284
|
+
* cards' colours agreed with the raster's to 3 codes on average over Sponza's wall, floor, ceiling
|
|
285
|
+
* and banners, and recapturing all of Sponza (154,138 pages) at the largest budget, the two
|
|
286
|
+
* interleaved in one process, cost the trace 9.1–12.7 ms and the raster 0.6 ms on the RTX 4090,
|
|
287
|
+
* and 335 ms against 33 ms on the AMD iGPU (RDNA2).
|
|
288
|
+
* @returns {MeshCardCaptureMode}
|
|
289
|
+
*/
|
|
290
|
+
get card_capture_mode() {
|
|
291
|
+
return this.#card_capture_mode;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* @param {MeshCardCaptureMode} v
|
|
296
|
+
*/
|
|
297
|
+
set card_capture_mode(v) {
|
|
298
|
+
assert.enum(v, MeshCardCaptureMode, 'card_capture_mode');
|
|
299
|
+
|
|
300
|
+
this.#card_capture_mode = v;
|
|
301
|
+
}
|
|
302
|
+
|
|
261
303
|
#probe_cascade_count = 5;
|
|
262
304
|
|
|
263
305
|
/**
|
|
@@ -411,46 +453,28 @@ export class ProbeClipmapSettings {
|
|
|
411
453
|
this.#ray_budget = v;
|
|
412
454
|
}
|
|
413
455
|
|
|
414
|
-
#
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Seconds of the exponential blend a probe's radiance follows a change by: an update blends by
|
|
418
|
-
* `1 − e^(−Δt / response_time)`. DDGI's hysteresis of 0.97 a frame at 60 fps is 0.55 s.
|
|
419
|
-
* @returns {number}
|
|
420
|
-
*/
|
|
421
|
-
get response_time() {
|
|
422
|
-
return this.#response_time;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* @param {number} v seconds, positive and finite
|
|
427
|
-
*/
|
|
428
|
-
set response_time(v) {
|
|
429
|
-
assert.isFinite(v, 'response_time');
|
|
430
|
-
assert.greaterThan(v, 0, 'response_time');
|
|
431
|
-
|
|
432
|
-
this.#response_time = v;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
#retention_time = 1;
|
|
456
|
+
#response_frames = 30;
|
|
436
457
|
|
|
437
458
|
/**
|
|
438
|
-
*
|
|
439
|
-
*
|
|
459
|
+
* Frames of the short mean a probe's radiance follows a change by, in its multi-scale mean: an update
|
|
460
|
+
* blends the short mean by `1 − e^(−Δt / response_frames)`, Δt the frames since the probe's last update,
|
|
461
|
+
* and the mean catches up with it once the two disagree past the texel's noise. The depth's moments
|
|
462
|
+
* blend by the same. Frames, not seconds: an update happens in a frame, and the records count them.
|
|
463
|
+
* 30 is half a second at 60 fps; DDGI's hysteresis of 0.97 a frame is 33.
|
|
440
464
|
* @returns {number}
|
|
441
465
|
*/
|
|
442
|
-
get
|
|
443
|
-
return this.#
|
|
466
|
+
get response_frames() {
|
|
467
|
+
return this.#response_frames;
|
|
444
468
|
}
|
|
445
469
|
|
|
446
470
|
/**
|
|
447
|
-
* @param {number} v
|
|
471
|
+
* @param {number} v frames, positive and finite
|
|
448
472
|
*/
|
|
449
|
-
set
|
|
450
|
-
assert.isFinite(v, '
|
|
451
|
-
assert.greaterThan(v, 0, '
|
|
473
|
+
set response_frames(v) {
|
|
474
|
+
assert.isFinite(v, 'response_frames');
|
|
475
|
+
assert.greaterThan(v, 0, 'response_frames');
|
|
452
476
|
|
|
453
|
-
this.#
|
|
477
|
+
this.#response_frames = v;
|
|
454
478
|
}
|
|
455
479
|
|
|
456
480
|
#debug_view = ProbeClipmapDebugView.None;
|
|
@@ -51,13 +51,21 @@ export const BRICK_OBJECT_ROW_LIMIT: number;
|
|
|
51
51
|
*/
|
|
52
52
|
export const BRICK_STAGING_DISTANCE_WORDS: number;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* The word of a build slot that asks for its cell again (§7.6, contract 7), after its distances and
|
|
55
|
+
* its objects: clear makes it 0, and a provider that could not finish the cell this frame writes 1.
|
|
56
|
+
* Free then puts the key back on the ring rather than out of the pending set, and the cell is built
|
|
57
|
+
* again from what the frame stored.
|
|
58
|
+
* @type {number}
|
|
59
|
+
*/
|
|
60
|
+
export const BRICK_STAGING_RETRY_WORD: number;
|
|
61
|
+
/**
|
|
62
|
+
* Words of a build slot in the staging: its distances, its objects, then its retry word.
|
|
55
63
|
* @type {number}
|
|
56
64
|
*/
|
|
57
65
|
export const BRICK_STAGING_WORDS: number;
|
|
58
66
|
/**
|
|
59
|
-
* Lanes of the passes that run a workgroup a taken cell: free, store and the mesh provider
|
|
60
|
-
* texels a lane.
|
|
67
|
+
* Lanes of the passes that run a workgroup a taken cell: free, store and the mesh provider's walk,
|
|
68
|
+
* batches and resolve. Eight texels a lane.
|
|
61
69
|
* @type {number}
|
|
62
70
|
*/
|
|
63
71
|
export const BRICK_CELL_WORKGROUP_SIZE: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BRICK_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,oCAFU,MAAM,CAEgC;AAEhD;;;;GAIG;AACH,kCAFU,MAAM,CAE8B;AAE9C;;;;GAIG;AACH,yCAFU,MAAM,CAEkD;AAElE;;;;GAIG;AACH,0CAFU,MAAM,CAEmD;AAEnE;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,0CAFU,MAAM,CAE6B;AAE7C;;;GAGG;AACH,iCAFU,MAAM,CAEmD;AAEnE;;;;;GAKG;AACH,qCAFU,MAAM,CAE8B;AAE9C;;;;GAIG;AACH,2CAFU,MAAM,CAE2D;AAE3E;;;GAGG;AACH,kCAFU,MAAM,
|
|
1
|
+
{"version":3,"file":"BRICK_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,oCAFU,MAAM,CAEgC;AAEhD;;;;GAIG;AACH,kCAFU,MAAM,CAE8B;AAE9C;;;;GAIG;AACH,yCAFU,MAAM,CAEkD;AAElE;;;;GAIG;AACH,0CAFU,MAAM,CAEmD;AAEnE;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAEvC;;;GAGG;AACH,0CAFU,MAAM,CAE6B;AAE7C;;;GAGG;AACH,iCAFU,MAAM,CAEmD;AAEnE;;;;;GAKG;AACH,qCAFU,MAAM,CAE8B;AAE9C;;;;GAIG;AACH,2CAFU,MAAM,CAE2D;AAE3E;;;;;;GAMG;AACH,uCAFU,MAAM,CAE0E;AAE1F;;;GAGG;AACH,kCAFU,MAAM,CAEgD;AAEhE;;;;GAIG;AACH,wCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,0CAFU,MAAM,CAE8B;AAM9C;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;;;GAKG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;GAGG;AACH,gCAFU,MAAM,CAEmB;AAQnC;;;;GAIG;AACH,uCAFU,MAAM,CAE0B;AAE1C;;;GAGG;AACH,uCAFU,MAAM,CAE0B;AAE1C;;;;GAIG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAOlC;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,8BAFU,MAAM,CAEiB;AAEjC;;;GAGG;AACH,qCAFU,MAAM,CAEwB"}
|
|
@@ -73,14 +73,23 @@ export const BRICK_OBJECT_ROW_LIMIT = 1 << 24;
|
|
|
73
73
|
export const BRICK_STAGING_DISTANCE_WORDS = MESH_SDF_BRICK_TEXEL_COUNT / 4;
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* The word of a build slot that asks for its cell again (§7.6, contract 7), after its distances and
|
|
77
|
+
* its objects: clear makes it 0, and a provider that could not finish the cell this frame writes 1.
|
|
78
|
+
* Free then puts the key back on the ring rather than out of the pending set, and the cell is built
|
|
79
|
+
* again from what the frame stored.
|
|
77
80
|
* @type {number}
|
|
78
81
|
*/
|
|
79
|
-
export const
|
|
82
|
+
export const BRICK_STAGING_RETRY_WORD = BRICK_STAGING_DISTANCE_WORDS + BRICK_OBJECT_CELLS;
|
|
80
83
|
|
|
81
84
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
85
|
+
* Words of a build slot in the staging: its distances, its objects, then its retry word.
|
|
86
|
+
* @type {number}
|
|
87
|
+
*/
|
|
88
|
+
export const BRICK_STAGING_WORDS = BRICK_STAGING_RETRY_WORD + 1;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Lanes of the passes that run a workgroup a taken cell: free, store and the mesh provider's walk,
|
|
92
|
+
* batches and resolve. Eight texels a lane.
|
|
84
93
|
* @type {number}
|
|
85
94
|
*/
|
|
86
95
|
export const BRICK_CELL_WORKGROUP_SIZE = 64;
|
|
@@ -9,14 +9,11 @@
|
|
|
9
9
|
* @property {number} take `brick_take`'s handle: the taken keys' first and count, and the cell dispatch
|
|
10
10
|
* at {@link BRICK_TAKE_CELL_DISPATCH}, a workgroup a taken cell. Bind it read-only and dispatch
|
|
11
11
|
* through it.
|
|
12
|
-
* @property {number} staging `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot
|
|
12
|
+
* @property {number} staging `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot. A provider
|
|
13
|
+
* that could not finish a cell sets its `BRICK_STAGING_RETRY_WORD`, and the cell is built again (§7.6, contract 7)
|
|
14
|
+
* @property {number} staging_capacity build slots the staging holds: at least the frame's taken cells
|
|
13
15
|
* @property {GPUBuffer} ring the keys; taken key `b` sits at `(taken_first + b) & (ring_capacity - 1)`
|
|
14
16
|
* @property {number} ring_capacity
|
|
15
|
-
* @property {GPUBuffer} pending a bit per key, set while the key is on the ring or being built. With `state` and
|
|
16
|
-
* `ring`, the queue that a provider which learns on the device that a cell must be built again puts its key on,
|
|
17
|
-
* with `brick_clipmap_enqueue` (contract 6). Such a pass writes `state` and hands its version on, as
|
|
18
|
-
* `staging`.
|
|
19
|
-
* @property {number} budget cells taken a frame at most: what sizes a provider's own buffers of the taken cells
|
|
20
17
|
* @property {number} resolution cells a cascade's window has a side
|
|
21
18
|
* @property {number} cascade_count
|
|
22
19
|
* @property {GPUBuffer} levels the cascades' windows, a {@link CLIPMAP_LEVEL_ARRAY}, finest first, a
|
|
@@ -197,25 +194,19 @@ export type BrickProviderContext = {
|
|
|
197
194
|
*/
|
|
198
195
|
take: number;
|
|
199
196
|
/**
|
|
200
|
-
* `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot
|
|
197
|
+
* `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot. A provider
|
|
198
|
+
* that could not finish a cell sets its `BRICK_STAGING_RETRY_WORD`, and the cell is built again (§7.6, contract 7)
|
|
201
199
|
*/
|
|
202
200
|
staging: number;
|
|
201
|
+
/**
|
|
202
|
+
* build slots the staging holds: at least the frame's taken cells
|
|
203
|
+
*/
|
|
204
|
+
staging_capacity: number;
|
|
203
205
|
/**
|
|
204
206
|
* the keys; taken key `b` sits at `(taken_first + b) & (ring_capacity - 1)`
|
|
205
207
|
*/
|
|
206
208
|
ring: GPUBuffer;
|
|
207
209
|
ring_capacity: number;
|
|
208
|
-
/**
|
|
209
|
-
* a bit per key, set while the key is on the ring or being built. With `state` and
|
|
210
|
-
* `ring`, the queue that a provider which learns on the device that a cell must be built again puts its key on,
|
|
211
|
-
* with `brick_clipmap_enqueue` (contract 6). Such a pass writes `state` and hands its version on, as
|
|
212
|
-
* `staging`.
|
|
213
|
-
*/
|
|
214
|
-
pending: GPUBuffer;
|
|
215
|
-
/**
|
|
216
|
-
* cells taken a frame at most: what sizes a provider's own buffers of the taken cells
|
|
217
|
-
*/
|
|
218
|
-
budget: number;
|
|
219
210
|
/**
|
|
220
211
|
* cells a cascade's window has a side
|
|
221
212
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GPUBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js"],"names":[],"mappings":"AAiFA
|
|
1
|
+
{"version":3,"file":"GPUBrickClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js"],"names":[],"mappings":"AAiFA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;IA2JI;;;;;;OAMG;IACH;QAJ2B,aAAa,EAA7B,MAAM;QACU,UAAU,EAA1B,MAAM;QACU,UAAU,EAA1B,MAAM;OA8FhB;IA7PD;;;OAGG;IACH,wBAHU,MAAM,CAGF;IAEd;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAEX;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IA6OX;;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;IAgWD,gBAcC;;CACJ;mCAl7BY,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;;+BA1F/B,0CAA0C"}
|
|
@@ -90,14 +90,11 @@ const SCROLL_BOXES_PER_CASCADE = 3;
|
|
|
90
90
|
* @property {number} take `brick_take`'s handle: the taken keys' first and count, and the cell dispatch
|
|
91
91
|
* at {@link BRICK_TAKE_CELL_DISPATCH}, a workgroup a taken cell. Bind it read-only and dispatch
|
|
92
92
|
* through it.
|
|
93
|
-
* @property {number} staging `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot
|
|
93
|
+
* @property {number} staging `brick_staging`'s handle, `BRICK_STAGING_WORDS` words a build slot. A provider
|
|
94
|
+
* that could not finish a cell sets its `BRICK_STAGING_RETRY_WORD`, and the cell is built again (§7.6, contract 7)
|
|
95
|
+
* @property {number} staging_capacity build slots the staging holds: at least the frame's taken cells
|
|
94
96
|
* @property {GPUBuffer} ring the keys; taken key `b` sits at `(taken_first + b) & (ring_capacity - 1)`
|
|
95
97
|
* @property {number} ring_capacity
|
|
96
|
-
* @property {GPUBuffer} pending a bit per key, set while the key is on the ring or being built. With `state` and
|
|
97
|
-
* `ring`, the queue that a provider which learns on the device that a cell must be built again puts its key on,
|
|
98
|
-
* with `brick_clipmap_enqueue` (contract 6). Such a pass writes `state` and hands its version on, as
|
|
99
|
-
* `staging`.
|
|
100
|
-
* @property {number} budget cells taken a frame at most: what sizes a provider's own buffers of the taken cells
|
|
101
98
|
* @property {number} resolution cells a cascade's window has a side
|
|
102
99
|
* @property {number} cascade_count
|
|
103
100
|
* @property {GPUBuffer} levels the cascades' windows, a {@link CLIPMAP_LEVEL_ARRAY}, finest first, a
|
|
@@ -283,10 +280,9 @@ export class GPUBrickClipmap {
|
|
|
283
280
|
state: -1,
|
|
284
281
|
take: -1,
|
|
285
282
|
staging: -1,
|
|
283
|
+
staging_capacity: 0,
|
|
286
284
|
ring: null,
|
|
287
285
|
ring_capacity: 0,
|
|
288
|
-
pending: null,
|
|
289
|
-
budget: 0,
|
|
290
286
|
resolution: 0,
|
|
291
287
|
cascade_count: 0,
|
|
292
288
|
levels: null,
|
|
@@ -583,10 +579,9 @@ export class GPUBrickClipmap {
|
|
|
583
579
|
context.state = take_data.state;
|
|
584
580
|
context.take = take_data.take;
|
|
585
581
|
context.staging = take_data.staging;
|
|
582
|
+
context.staging_capacity = this.#staging_cells;
|
|
586
583
|
context.ring = this.#ring;
|
|
587
584
|
context.ring_capacity = this.#ring_capacity;
|
|
588
|
-
context.pending = this.#pending;
|
|
589
|
-
context.budget = budget;
|
|
590
585
|
context.resolution = this.resolution;
|
|
591
586
|
context.cascade_count = this.cascade_count;
|
|
592
587
|
context.levels = this.#levels;
|
|
@@ -618,6 +613,9 @@ export class GPUBrickClipmap {
|
|
|
618
613
|
} finally {
|
|
619
614
|
reference.release();
|
|
620
615
|
}
|
|
616
|
+
})
|
|
617
|
+
.catch(() => {
|
|
618
|
+
// a reading lost to a timeout or a lost device: the count runs on, and a later reading carries it
|
|
621
619
|
});
|
|
622
620
|
|
|
623
621
|
this.#fresh = false;
|
|
@@ -64,6 +64,18 @@ export const chunk_brick_clipmap: CodeChunk;
|
|
|
64
64
|
* @type {CodeChunk}
|
|
65
65
|
*/
|
|
66
66
|
export const chunk_brick_clipmap_enqueue: CodeChunk;
|
|
67
|
+
/**
|
|
68
|
+
* Put a key that is still pending back on the ring: one taken this frame whose cell a provider asked
|
|
69
|
+
* for again (§7.6, contract 7). Its pending bit stays set, so no enqueue can add it a second time, and
|
|
70
|
+
* the ring still holds every key at most once.
|
|
71
|
+
*
|
|
72
|
+
* ```wgsl
|
|
73
|
+
* fn brick_clipmap_requeue_pending(key: u32, ring_capacity: u32)
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @type {CodeChunk}
|
|
77
|
+
*/
|
|
78
|
+
export const chunk_brick_clipmap_requeue_pending: CodeChunk;
|
|
67
79
|
import { ShaderResourceDescriptor } from "../../../shader/resource/ShaderResourceDescriptor.js";
|
|
68
80
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
69
81
|
//# sourceMappingURL=chunk_brick_clipmap.d.ts.map
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_brick_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chunk_brick_clipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.js"],"names":[],"mappings":"AA2BA;;;GAGG;AACH,mCAFU,wBAAwB,CAE4F;AAE9H;;;;;GAKG;AACH,kCAFU,wBAAwB,CAEuE;AAEzG;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;GAIG;AACH,qCAFU,wBAAwB,CAEgG;AAElI;;;;GAIG;AACH,kCAFU,wBAAwB,CAE6E;AAE/G;;;;GAIG;AACH,qCAFU,wBAAwB,CAEmF;AAErH;;;;;;;;;;;;;;;;GAgBG;AACH,kCAFU,SAAS,CAoDhB;AAEH;;;;;;;;;;GAUG;AACH,0CAFU,SAAS,CAmBhB;AAMH;;;;;;;;;;GAUG;AACH,kDAFU,SAAS,CAYhB;yCAhMsC,sDAAsD;0BADrE,uCAAuC"}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
BRICK_OBJECT_CELLS,
|
|
13
13
|
BRICK_OBJECT_CELLS_PER_AXIS,
|
|
14
14
|
BRICK_STAGING_DISTANCE_WORDS,
|
|
15
|
+
BRICK_STAGING_RETRY_WORD,
|
|
15
16
|
BRICK_STAGING_WORDS,
|
|
16
17
|
BRICK_STATE_FREE,
|
|
17
18
|
BRICK_STATE_HEAD,
|
|
@@ -95,6 +96,7 @@ const BRICK_CLIPMAP_BAND_VOXELS = ${MESH_SDF_BAND_VOXELS}.0;
|
|
|
95
96
|
const BRICK_OBJECT_CELLS = ${BRICK_OBJECT_CELLS}u;
|
|
96
97
|
const BRICK_OBJECT_CELLS_PER_AXIS = ${BRICK_OBJECT_CELLS_PER_AXIS}u;
|
|
97
98
|
const BRICK_STAGING_DISTANCE_WORDS = ${BRICK_STAGING_DISTANCE_WORDS}u;
|
|
99
|
+
const BRICK_STAGING_RETRY_WORD = ${BRICK_STAGING_RETRY_WORD}u;
|
|
98
100
|
const BRICK_STAGING_WORDS = ${BRICK_STAGING_WORDS}u;
|
|
99
101
|
const BRICK_CELL_WORKGROUP_SIZE = ${BRICK_CELL_WORKGROUP_SIZE}u;
|
|
100
102
|
const BRICK_THREAD_WORKGROUP_SIZE = ${BRICK_THREAD_WORKGROUP_SIZE}u;
|
|
@@ -167,3 +169,29 @@ fn brick_clipmap_enqueue(key: u32, ring_capacity: u32) {
|
|
|
167
169
|
chunk_brick_clipmap_enqueue.requireResource(BRICK_STATE_RESOURCE);
|
|
168
170
|
chunk_brick_clipmap_enqueue.requireResource(BRICK_RING_RESOURCE);
|
|
169
171
|
chunk_brick_clipmap_enqueue.requireResource(BRICK_PENDING_RESOURCE);
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Put a key that is still pending back on the ring: one taken this frame whose cell a provider asked
|
|
175
|
+
* for again (§7.6, contract 7). Its pending bit stays set, so no enqueue can add it a second time, and
|
|
176
|
+
* the ring still holds every key at most once.
|
|
177
|
+
*
|
|
178
|
+
* ```wgsl
|
|
179
|
+
* fn brick_clipmap_requeue_pending(key: u32, ring_capacity: u32)
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* @type {CodeChunk}
|
|
183
|
+
*/
|
|
184
|
+
export const chunk_brick_clipmap_requeue_pending = CodeChunk.from(
|
|
185
|
+
//language=WGSL
|
|
186
|
+
`
|
|
187
|
+
fn brick_clipmap_requeue_pending(key: u32, ring_capacity: u32) {
|
|
188
|
+
let at = atomicAdd(&brick_state[BRICK_STATE_TAIL], 1u);
|
|
189
|
+
|
|
190
|
+
brick_ring[at & (ring_capacity - 1u)] = key;
|
|
191
|
+
}
|
|
192
|
+
`, [
|
|
193
|
+
chunk_brick_clipmap,
|
|
194
|
+
]);
|
|
195
|
+
|
|
196
|
+
chunk_brick_clipmap_requeue_pending.requireResource(BRICK_STATE_RESOURCE);
|
|
197
|
+
chunk_brick_clipmap_requeue_pending.requireResource(BRICK_RING_RESOURCE);
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export const chunk_brick_clipmap_sample: CodeChunk;
|
|
|
71
71
|
export const chunk_brick_clipmap_window: CodeChunk;
|
|
72
72
|
/**
|
|
73
73
|
* A step of a march through the brick clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.9): what the
|
|
74
|
-
* tracer
|
|
74
|
+
* tracer walks.
|
|
75
75
|
*
|
|
76
76
|
* ```wgsl
|
|
77
77
|
* fn brick_clipmap_march(origin: vec3<f32>, direction: vec3<f32>, cascade_count: u32, march: ptr<function, BrickClipmapMarch>) -> u32
|
|
@@ -112,34 +112,6 @@ export const chunk_brick_clipmap_march: CodeChunk;
|
|
|
112
112
|
* @type {CodeChunk}
|
|
113
113
|
*/
|
|
114
114
|
export const chunk_brick_clipmap_trace: CodeChunk;
|
|
115
|
-
/**
|
|
116
|
-
* How much of a light's disk a point sees along a ray through the brick clipmap (§7.9), from 0 to 1.
|
|
117
|
-
*
|
|
118
|
-
* ```wgsl
|
|
119
|
-
* fn brick_clipmap_soft_shadow(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_max: f32, sin_angle: f32, cascade_count: u32) -> f32
|
|
120
|
-
* ```
|
|
121
|
-
*
|
|
122
|
-
* `direction` is toward the light, unit length, and `sin_angle` the sine of the light's angular
|
|
123
|
-
* radius (its `disk_radius`). The march is the tracer's (`brick_clipmap_march`), from `t_min`, at
|
|
124
|
-
* most {@link BRICK_TRACE_STEPS} steps.
|
|
125
|
-
*
|
|
126
|
-
* The estimate is Quílez's two-sided penumbra. The light's edge is a cone about the ray, of radius
|
|
127
|
-
* `t·sin θ`; in each brick the march reads the clearance, the field less the tracer's half-voxel
|
|
128
|
-
* expand, so that a wall thinner than a voxel shadows as it is hit. The least of the clearance over the
|
|
129
|
-
* cone's radius goes below zero inside the occluder:
|
|
130
|
-
* - the march goes on into the occluder, half a voxel a step, until the least reaches -1, which is
|
|
131
|
-
* the light hidden whole;
|
|
132
|
-
* - clamped to [-1, 1], it maps through `¼(1 + x)²(2 - x)` to the visible part, which is half at the
|
|
133
|
-
* shadow's geometric edge, as the analytic disk is. The classic, one-sided estimate reads 0 there.
|
|
134
|
-
*
|
|
135
|
-
* EMPTY inside hides the light whole. An EMPTY cell, or a block passed whole, is clear by at least a
|
|
136
|
-
* voxel, wider than a sun's cone within its cascade's range, and the march reads nothing in it. A march
|
|
137
|
-
* out of every window, or past `t_max`, sees what it has not found hidden; so does one that spends
|
|
138
|
-
* its steps.
|
|
139
|
-
*
|
|
140
|
-
* @type {CodeChunk}
|
|
141
|
-
*/
|
|
142
|
-
export const chunk_brick_clipmap_soft_shadow: CodeChunk;
|
|
143
115
|
/**
|
|
144
116
|
* The finest cascade's signed distance at a point (§7.9), for probe relocation.
|
|
145
117
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,gCAFU,MAAM,CAEwB;AAExC;;;GAGG;AACH,yCAFU,wBAAwB,CAEoE;AAEtG;;;GAGG;AACH,+CAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAE6E;AAE/G;;;;;;;;;;;;;GAaG;AACH,yCAFU,SAAS,CAoCZ;AAKP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAyBZ;AAIP;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wCAFU,SAAS,CAgFZ;AAKP;;;;;;;;;;;;;;;;;;GAkBG;AACH,wCAFU,SAAS,CAoGZ;AAEP
|
|
1
|
+
{"version":3,"file":"chunk_brick_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,gCAFU,MAAM,CAEoB;AAEpC;;;;GAIG;AACH,gCAFU,MAAM,CAEwB;AAExC;;;GAGG;AACH,yCAFU,wBAAwB,CAEoE;AAEtG;;;GAGG;AACH,+CAFU,wBAAwB,CAEgF;AAElH;;;GAGG;AACH,2CAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAEqF;AAEvH;;;GAGG;AACH,oCAFU,wBAAwB,CAEyE;AAE3G;;;GAGG;AACH,qCAFU,wBAAwB,CAE6E;AAE/G;;;;;;;;;;;;;GAaG;AACH,yCAFU,SAAS,CAoCZ;AAKP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAyBZ;AAIP;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wCAFU,SAAS,CAgFZ;AAKP;;;;;;;;;;;;;;;;;;GAkBG;AACH,wCAFU,SAAS,CAoGZ;AAEP;;;;;;;;;;;;GAYG;AACH,2CAFU,SAAS,CAsCZ;AAIP;;;;;;;;;;;;;;GAcG;AACH,2CAFU,SAAS,CA0BZ;AAEP;;;;;;;;;;;;;;GAcG;AACH,yCAFU,SAAS,CAqBZ;yCA5fkC,sDAAsD;0BADrE,uCAAuC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js
CHANGED
|
@@ -161,7 +161,7 @@ chunk_brick_clipmap_window.requireResource(BRICK_LEVELS_RESOURCE);
|
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* A step of a march through the brick clipmap (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §7.9): what the
|
|
164
|
-
* tracer
|
|
164
|
+
* tracer walks.
|
|
165
165
|
*
|
|
166
166
|
* ```wgsl
|
|
167
167
|
* fn brick_clipmap_march(origin: vec3<f32>, direction: vec3<f32>, cascade_count: u32, march: ptr<function, BrickClipmapMarch>) -> u32
|
|
@@ -383,79 +383,6 @@ fn brick_clipmap_trace(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_ma
|
|
|
383
383
|
chunk_brick_clipmap_march,
|
|
384
384
|
]);
|
|
385
385
|
|
|
386
|
-
/**
|
|
387
|
-
* How much of a light's disk a point sees along a ray through the brick clipmap (§7.9), from 0 to 1.
|
|
388
|
-
*
|
|
389
|
-
* ```wgsl
|
|
390
|
-
* fn brick_clipmap_soft_shadow(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_max: f32, sin_angle: f32, cascade_count: u32) -> f32
|
|
391
|
-
* ```
|
|
392
|
-
*
|
|
393
|
-
* `direction` is toward the light, unit length, and `sin_angle` the sine of the light's angular
|
|
394
|
-
* radius (its `disk_radius`). The march is the tracer's (`brick_clipmap_march`), from `t_min`, at
|
|
395
|
-
* most {@link BRICK_TRACE_STEPS} steps.
|
|
396
|
-
*
|
|
397
|
-
* The estimate is Quílez's two-sided penumbra. The light's edge is a cone about the ray, of radius
|
|
398
|
-
* `t·sin θ`; in each brick the march reads the clearance, the field less the tracer's half-voxel
|
|
399
|
-
* expand, so that a wall thinner than a voxel shadows as it is hit. The least of the clearance over the
|
|
400
|
-
* cone's radius goes below zero inside the occluder:
|
|
401
|
-
* - the march goes on into the occluder, half a voxel a step, until the least reaches -1, which is
|
|
402
|
-
* the light hidden whole;
|
|
403
|
-
* - clamped to [-1, 1], it maps through `¼(1 + x)²(2 - x)` to the visible part, which is half at the
|
|
404
|
-
* shadow's geometric edge, as the analytic disk is. The classic, one-sided estimate reads 0 there.
|
|
405
|
-
*
|
|
406
|
-
* EMPTY inside hides the light whole. An EMPTY cell, or a block passed whole, is clear by at least a
|
|
407
|
-
* voxel, wider than a sun's cone within its cascade's range, and the march reads nothing in it. A march
|
|
408
|
-
* out of every window, or past `t_max`, sees what it has not found hidden; so does one that spends
|
|
409
|
-
* its steps.
|
|
410
|
-
*
|
|
411
|
-
* @type {CodeChunk}
|
|
412
|
-
*/
|
|
413
|
-
export const chunk_brick_clipmap_soft_shadow = CodeChunk.from(
|
|
414
|
-
//language=WGSL
|
|
415
|
-
`
|
|
416
|
-
fn brick_clipmap_soft_shadow(origin: vec3<f32>, direction: vec3<f32>, t_min: f32, t_max: f32, sin_angle: f32, cascade_count: u32) -> f32 {
|
|
417
|
-
var march: BrickClipmapMarch;
|
|
418
|
-
|
|
419
|
-
march.t = t_min;
|
|
420
|
-
march.cascade = brick_clipmap_start(origin + t_min * direction, cascade_count);
|
|
421
|
-
|
|
422
|
-
// the least clearance over the cone's radius, the light's edge
|
|
423
|
-
var least = 1.0;
|
|
424
|
-
|
|
425
|
-
for (var step = 0u; step < ${BRICK_TRACE_STEPS}u && march.cascade < cascade_count && march.t <= t_max; step++) {
|
|
426
|
-
let stood = brick_clipmap_march(origin, direction, cascade_count, &march);
|
|
427
|
-
|
|
428
|
-
if (stood != BRICK_MARCH_CELL) {
|
|
429
|
-
continue;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
if (march.entry == BRICK_CLIPMAP_EMPTY_INSIDE) {
|
|
433
|
-
return 0.0;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
let distance = brick_clipmap_sample(march.entry, (march.position - march.cell_min) / march.voxel, march.voxel);
|
|
437
|
-
|
|
438
|
-
least = min(least, (distance - 0.5 * march.voxel) / (march.t * sin_angle));
|
|
439
|
-
|
|
440
|
-
if (least <= -1.0) {
|
|
441
|
-
return 0.0;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// inside the occluder the field gives no step: half a voxel, the tracer's least
|
|
445
|
-
march.t += max(distance, 0.5 * march.voxel);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
let x = clamp(least, -1.0, 1.0);
|
|
449
|
-
|
|
450
|
-
return 0.25 * (1.0 + x) * (1.0 + x) * (2.0 - x);
|
|
451
|
-
}
|
|
452
|
-
`, [
|
|
453
|
-
chunk_brick_clipmap,
|
|
454
|
-
chunk_brick_clipmap_sample,
|
|
455
|
-
chunk_brick_clipmap_window,
|
|
456
|
-
chunk_brick_clipmap_march,
|
|
457
|
-
]);
|
|
458
|
-
|
|
459
386
|
/**
|
|
460
387
|
* The finest cascade's signed distance at a point (§7.9), for probe relocation.
|
|
461
388
|
*
|