@woosh/meep-engine 3.59.0 → 3.60.1
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 +10 -9
- 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 +32 -39
- 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 +65 -19
- package/src/view/elements/progress/segmented/GhostTrail.d.ts +116 -0
- package/src/view/elements/progress/segmented/GhostTrail.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/GhostTrail.js +280 -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 +163 -10
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +442 -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
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.js
CHANGED
|
@@ -12,10 +12,9 @@ import {
|
|
|
12
12
|
PROBE_COUNTERS_READ_RESOURCE,
|
|
13
13
|
PROBE_RECORDS_READ_RESOURCE,
|
|
14
14
|
PROBE_STATES_READ_RESOURCE,
|
|
15
|
-
PROBE_TRACE_WRITE_RESOURCE
|
|
16
|
-
PROBE_WANTED_BITS_READ_RESOURCE
|
|
15
|
+
PROBE_TRACE_WRITE_RESOURCE
|
|
17
16
|
} from "./chunk_probe_clipmap.js";
|
|
18
|
-
import {
|
|
17
|
+
import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* @type {WebGPUStruct}
|
|
@@ -23,8 +22,6 @@ import { PROBE_DEAD_PERIODS, PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP
|
|
|
23
22
|
export const PROBE_DUE_SETTINGS = WebGPUStruct.from({
|
|
24
23
|
/** slots, which no active list outgrows */
|
|
25
24
|
capacity: u32,
|
|
26
|
-
/** lattice points a cascade's window has a side */
|
|
27
|
-
resolution: u32,
|
|
28
25
|
/** probes a frame updates at most, U = ⌊ray_budget / rays_per_probe⌋: the trace list's bound */
|
|
29
26
|
trace_capacity: u32,
|
|
30
27
|
/** the frame's index, what a probe's turn in its period is counted by */
|
|
@@ -41,21 +38,29 @@ resources.createGroup()
|
|
|
41
38
|
.add(PROBE_STATES_READ_RESOURCE)
|
|
42
39
|
.add(PROBE_RECORDS_READ_RESOURCE)
|
|
43
40
|
.add(PROBE_COUNTERS_READ_RESOURCE)
|
|
44
|
-
.add(PROBE_WANTED_BITS_READ_RESOURCE)
|
|
45
41
|
.add(PROBE_ACTIVE_WRITTEN_RESOURCE)
|
|
46
42
|
.add(PROBE_TRACE_WRITE_RESOURCE);
|
|
47
43
|
|
|
48
44
|
/**
|
|
49
45
|
* Due (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.5): a thread an entry of the frame's active list,
|
|
50
46
|
* dispatched twice through `PROBE_DISPATCH_ACTIVE` after schedule has set the period T. A probe is due
|
|
51
|
-
* when a
|
|
52
|
-
* - it is NEW, in the first pass, which lists them first;
|
|
53
|
-
* - in the second pass, it is ALIVE
|
|
54
|
-
* `(frame + h(slot)) mod
|
|
47
|
+
* when a want waits on it:
|
|
48
|
+
* - it is NEW, in the first pass, which lists them first: it has had no update;
|
|
49
|
+
* - in the second pass, it is ALIVE or DEAD, a pixel or a hit wanted it since its last update, its
|
|
50
|
+
* wanted time past its traced time, and `(frame + h(slot)) mod T` is 0. A DEAD probe's update casts
|
|
51
|
+
* the fewest rays (`PROBE_RAYS_PER_TEXEL_MIN`), every period rather than every eighth at R, so that a
|
|
52
|
+
* probe inside a solid notices when the scene changes sooner, for fewer rays (Enshrouded's dead probes
|
|
53
|
+
* trace 16 a frame).
|
|
54
|
+
*
|
|
55
|
+
* Wanted since its last update, not this frame: a hit wants a probe the frame after its own probe's
|
|
56
|
+
* update, so a probe that only hits keep is wanted on few of its turns. Measured on Sponza with the
|
|
57
|
+
* point's bit as the test, the hits' probes were updated 0.8 times a second at p10 against the screen's
|
|
58
|
+
* 6.6 at the least, and 6 s had passed since the last update at p99 (§8.3). A want an update served
|
|
59
|
+
* waits on nothing: the update comes after admit in its frame, so its traced time is the want's or later.
|
|
55
60
|
*
|
|
56
61
|
* The due go on the trace list, which holds the frame's updates, at most U: past it the count still
|
|
57
|
-
* rises and nothing is written, and a probe not listed waits its next turn. With T = ⌈P_w / U⌉ the
|
|
58
|
-
* expected count a frame is under U, so only NEW probes past U, a camera cut, wait.
|
|
62
|
+
* rises and nothing is written, and a probe not listed waits its next turn. With T = ⌈P_w / U⌉ over the
|
|
63
|
+
* probes waiting, the expected count a frame is under U, so only NEW probes past U, a camera cut, wait.
|
|
59
64
|
*
|
|
60
65
|
* @type {ComputeShader}
|
|
61
66
|
*/
|
|
@@ -80,22 +85,16 @@ fn main(
|
|
|
80
85
|
|
|
81
86
|
let kind = probe_state_kind(probe_states[slot].x);
|
|
82
87
|
|
|
83
|
-
// wanted
|
|
84
|
-
let
|
|
85
|
-
let storage = vec3<u32>(probe_records[slot].cell) & vec3<u32>(resolution - 1u);
|
|
86
|
-
let key = probe_clipmap_key(probe_records[slot].cascade, storage, resolution);
|
|
87
|
-
let wanted = (probe_wanted_bits[key >> 5u] & (1u << (key & 31u))) != 0u;
|
|
88
|
+
// wanted since its last update
|
|
89
|
+
let waiting = probe_records[slot].wanted_frame > probe_records[slot].traced_frame;
|
|
88
90
|
|
|
89
91
|
let period = max(probe_counters[PROBE_COUNTER_PERIOD], 1u);
|
|
90
92
|
let turn = settings.frame + hash_lowbias32(slot);
|
|
91
93
|
|
|
92
94
|
if (settings.new_only != 0u) {
|
|
93
|
-
due =
|
|
95
|
+
due = kind == PROBE_STATE_NEW;
|
|
94
96
|
} else {
|
|
95
|
-
due =
|
|
96
|
-
(kind == PROBE_STATE_ALIVE && turn % period == 0u)
|
|
97
|
-
|| (kind == PROBE_STATE_DEAD && turn % (${PROBE_DEAD_PERIODS}u * period) == 0u)
|
|
98
|
-
);
|
|
97
|
+
due = waiting && (kind == PROBE_STATE_ALIVE || kind == PROBE_STATE_DEAD) && turn % period == 0u;
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {WebGPUStruct}
|
|
3
|
+
*/
|
|
4
|
+
export const PROBE_GUIDE_SETTINGS: WebGPUStruct;
|
|
5
|
+
/**
|
|
6
|
+
* The guide, rows (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.6): a thread a row of each listed probe's
|
|
7
|
+
* radiance map, dispatched through `PROBE_DISPATCH_ROWS`. It sums the luminance of the row's history
|
|
8
|
+
* texels, which the weights' pass totals.
|
|
9
|
+
*
|
|
10
|
+
* The guide is built for every update. A guided update's trace casts its rays by it, and accumulation
|
|
11
|
+
* takes each texel's share of the guided updates' rays from it, uniform update or not.
|
|
12
|
+
*
|
|
13
|
+
* @type {ComputeShader}
|
|
14
|
+
*/
|
|
15
|
+
export const shader_probe_clipmap_guide_rows: ComputeShader;
|
|
16
|
+
/**
|
|
17
|
+
* The guide, weights (§8.6): a thread a row of each listed probe's radiance map, dispatched through
|
|
18
|
+
* `PROBE_DISPATCH_ROWS`. It totals the rows' luminance, then weighs each of the row's texels by its share
|
|
19
|
+
* (`probe_clipmap_guide_weight`) and sums the row's weights, which the starts' pass totals.
|
|
20
|
+
*
|
|
21
|
+
* @type {ComputeShader}
|
|
22
|
+
*/
|
|
23
|
+
export const shader_probe_clipmap_guide_weights: ComputeShader;
|
|
24
|
+
/**
|
|
25
|
+
* The guide, starts (§8.6): a thread a row of the walk of each listed probe's radiance map, dispatched
|
|
26
|
+
* through `PROBE_DISPATCH_ROWS`. It totals the weights and spreads what they leave of
|
|
27
|
+
* `PROBE_GUIDE_SCALE` evenly. It takes the weight the walk covers before its row from the row weights,
|
|
28
|
+
* then writes the first ray of each of its walk positions. The walk's first row writes the total and the
|
|
29
|
+
* even share as well.
|
|
30
|
+
*
|
|
31
|
+
* @type {ComputeShader}
|
|
32
|
+
*/
|
|
33
|
+
export const shader_probe_clipmap_guide_starts: ComputeShader;
|
|
34
|
+
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
35
|
+
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
36
|
+
//# sourceMappingURL=shader_probe_clipmap_guide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_guide.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH,mCAFU,YAAY,CAWG;AAkEzB;;;;;;;;;GASG;AACH,8CAFU,aAAa,CAgCpB;AAEH;;;;;;GAMG;AACH,iDAFU,aAAa,CA4CpB;AAEH;;;;;;;;GAQG;AACH,gDAFU,aAAa,CA2DpB;6BA1P0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_guide.js
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
2
|
+
import { chunk_index_to_grid2d } from "../../../shader/chunk/grid/chunk_index_to_grid2d.js";
|
|
3
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
4
|
+
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
5
|
+
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
6
|
+
import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
7
|
+
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
8
|
+
import {
|
|
9
|
+
chunk_probe_clipmap,
|
|
10
|
+
chunk_probe_clipmap_guide,
|
|
11
|
+
chunk_probe_clipmap_ray_layout,
|
|
12
|
+
PROBE_GUIDE_WRITE_RESOURCE,
|
|
13
|
+
PROBE_RADIANCE_HISTORY_RESOURCE,
|
|
14
|
+
PROBE_RAY_SUMS_READ_RESOURCE,
|
|
15
|
+
PROBE_STATES_READ_RESOURCE,
|
|
16
|
+
PROBE_TRACE_READ_RESOURCE
|
|
17
|
+
} from "./chunk_probe_clipmap.js";
|
|
18
|
+
import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @type {WebGPUStruct}
|
|
22
|
+
*/
|
|
23
|
+
export const PROBE_GUIDE_SETTINGS = WebGPUStruct.from({
|
|
24
|
+
/** probes a frame updates at most: the trace list's bound */
|
|
25
|
+
trace_capacity: u32,
|
|
26
|
+
/** rays a uniform update casts, R; the guide walks its probe's own (`probe_ray_sums`) */
|
|
27
|
+
rays_per_probe: u32,
|
|
28
|
+
/** octahedral radiance texels a side, n_r */
|
|
29
|
+
radiance_resolution: u32,
|
|
30
|
+
/** tiles a row of the radiance atlas */
|
|
31
|
+
radiance_tiles_per_row: u32,
|
|
32
|
+
}, "ProbeGuideSettings");
|
|
33
|
+
|
|
34
|
+
const resources = new ShaderResourceSetDescriptor();
|
|
35
|
+
|
|
36
|
+
resources.setImmediate("settings", PROBE_GUIDE_SETTINGS);
|
|
37
|
+
|
|
38
|
+
resources.createGroup()
|
|
39
|
+
.add(PROBE_TRACE_READ_RESOURCE)
|
|
40
|
+
.add(PROBE_STATES_READ_RESOURCE)
|
|
41
|
+
.add(PROBE_RADIANCE_HISTORY_RESOURCE)
|
|
42
|
+
.add(PROBE_RAY_SUMS_READ_RESOURCE)
|
|
43
|
+
.add(PROBE_GUIDE_WRITE_RESOURCE);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* What every guide pass opens with: the thread's listed probe `k` and row, the rays its update casts,
|
|
47
|
+
* and where the probe's guide and history tile start. A thread past the list returns.
|
|
48
|
+
*/
|
|
49
|
+
const chunk_probe_clipmap_guide_thread = CodeChunk.from(
|
|
50
|
+
//language=WGSL
|
|
51
|
+
`
|
|
52
|
+
struct ProbeGuideThread {
|
|
53
|
+
valid: bool,
|
|
54
|
+
k: u32,
|
|
55
|
+
row: u32,
|
|
56
|
+
rays: u32,
|
|
57
|
+
slot: u32,
|
|
58
|
+
updates: u32,
|
|
59
|
+
base: u32,
|
|
60
|
+
tile: vec2<u32>,
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
fn probe_guide_thread(workgroup_id: vec3<u32>, lane: u32) -> ProbeGuideThread {
|
|
64
|
+
var out: ProbeGuideThread;
|
|
65
|
+
|
|
66
|
+
let thread = folded_workgroup_index(workgroup_id) * PROBE_THREAD_WORKGROUP_SIZE + lane;
|
|
67
|
+
let n = settings.radiance_resolution;
|
|
68
|
+
|
|
69
|
+
out.valid = thread < min(probe_trace.count, settings.trace_capacity) * n;
|
|
70
|
+
|
|
71
|
+
if (!out.valid) {
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
out.k = thread / n;
|
|
76
|
+
out.row = thread % n;
|
|
77
|
+
out.rays = probe_clipmap_probe_rays(out.k).y;
|
|
78
|
+
out.slot = probe_trace.elements[out.k];
|
|
79
|
+
out.updates = probe_state_updates(probe_states[out.slot].x);
|
|
80
|
+
out.base = out.k * probe_clipmap_guide_words(n);
|
|
81
|
+
out.tile = index_to_grid2d(out.slot, settings.radiance_tiles_per_row) * (n + 2u) + 1u;
|
|
82
|
+
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// the luminance of the history's texel (x, y) in the thread's tile
|
|
87
|
+
fn probe_guide_texel_luminance(thread: ProbeGuideThread, x: u32, y: u32) -> f32 {
|
|
88
|
+
return probe_clipmap_guide_luminance(textureLoad(probe_radiance, thread.tile + vec2<u32>(x, y), 0).rgb);
|
|
89
|
+
}
|
|
90
|
+
`, [
|
|
91
|
+
chunk_probe_clipmap,
|
|
92
|
+
chunk_probe_clipmap_guide,
|
|
93
|
+
chunk_probe_clipmap_ray_layout,
|
|
94
|
+
chunk_folded_workgroup_index,
|
|
95
|
+
chunk_index_to_grid2d,
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The guide, rows (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.6): a thread a row of each listed probe's
|
|
100
|
+
* radiance map, dispatched through `PROBE_DISPATCH_ROWS`. It sums the luminance of the row's history
|
|
101
|
+
* texels, which the weights' pass totals.
|
|
102
|
+
*
|
|
103
|
+
* The guide is built for every update. A guided update's trace casts its rays by it, and accumulation
|
|
104
|
+
* takes each texel's share of the guided updates' rays from it, uniform update or not.
|
|
105
|
+
*
|
|
106
|
+
* @type {ComputeShader}
|
|
107
|
+
*/
|
|
108
|
+
export const shader_probe_clipmap_guide_rows = ComputeShader.from({
|
|
109
|
+
label: "Probe Clipmap Guide Rows",
|
|
110
|
+
resources,
|
|
111
|
+
body: CodeChunk.from(
|
|
112
|
+
//language=WGSL
|
|
113
|
+
`
|
|
114
|
+
@compute @workgroup_size(${PROBE_THREAD_WORKGROUP_SIZE})
|
|
115
|
+
fn main(
|
|
116
|
+
@builtin(workgroup_id) workgroup_id: vec3<u32>,
|
|
117
|
+
@builtin(local_invocation_index) lane: u32,
|
|
118
|
+
) {
|
|
119
|
+
let thread = probe_guide_thread(workgroup_id, lane);
|
|
120
|
+
|
|
121
|
+
if (!thread.valid) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
let n = settings.radiance_resolution;
|
|
126
|
+
|
|
127
|
+
var sum = 0.0;
|
|
128
|
+
|
|
129
|
+
for (var x = 0u; x < n; x++) {
|
|
130
|
+
sum += probe_guide_texel_luminance(thread, x, thread.row);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
probe_guide[thread.base + 2u * n * n + thread.row] = bitcast<u32>(sum);
|
|
134
|
+
}
|
|
135
|
+
`, [
|
|
136
|
+
chunk_probe_clipmap_guide_thread,
|
|
137
|
+
]),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The guide, weights (§8.6): a thread a row of each listed probe's radiance map, dispatched through
|
|
142
|
+
* `PROBE_DISPATCH_ROWS`. It totals the rows' luminance, then weighs each of the row's texels by its share
|
|
143
|
+
* (`probe_clipmap_guide_weight`) and sums the row's weights, which the starts' pass totals.
|
|
144
|
+
*
|
|
145
|
+
* @type {ComputeShader}
|
|
146
|
+
*/
|
|
147
|
+
export const shader_probe_clipmap_guide_weights = ComputeShader.from({
|
|
148
|
+
label: "Probe Clipmap Guide Weights",
|
|
149
|
+
resources,
|
|
150
|
+
body: CodeChunk.from(
|
|
151
|
+
//language=WGSL
|
|
152
|
+
`
|
|
153
|
+
@compute @workgroup_size(${PROBE_THREAD_WORKGROUP_SIZE})
|
|
154
|
+
fn main(
|
|
155
|
+
@builtin(workgroup_id) workgroup_id: vec3<u32>,
|
|
156
|
+
@builtin(local_invocation_index) lane: u32,
|
|
157
|
+
) {
|
|
158
|
+
let thread = probe_guide_thread(workgroup_id, lane);
|
|
159
|
+
|
|
160
|
+
if (!thread.valid) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
let n = settings.radiance_resolution;
|
|
165
|
+
let texels = n * n;
|
|
166
|
+
let rows = thread.base + 2u * texels;
|
|
167
|
+
|
|
168
|
+
var total = 0.0;
|
|
169
|
+
|
|
170
|
+
for (var y = 0u; y < n; y++) {
|
|
171
|
+
total += bitcast<f32>(probe_guide[rows + y]);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
var row_weight = 0u;
|
|
175
|
+
|
|
176
|
+
for (var x = 0u; x < n; x++) {
|
|
177
|
+
let texel = thread.row * n + x;
|
|
178
|
+
let weight = probe_clipmap_guide_weight(probe_guide_texel_luminance(thread, x, thread.row), total, thread.rays, texels);
|
|
179
|
+
|
|
180
|
+
probe_guide[thread.base + texels + texel] = weight;
|
|
181
|
+
row_weight += weight;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
probe_guide[rows + n + thread.row] = row_weight;
|
|
185
|
+
}
|
|
186
|
+
`, [
|
|
187
|
+
chunk_probe_clipmap_guide_thread,
|
|
188
|
+
]),
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The guide, starts (§8.6): a thread a row of the walk of each listed probe's radiance map, dispatched
|
|
193
|
+
* through `PROBE_DISPATCH_ROWS`. It totals the weights and spreads what they leave of
|
|
194
|
+
* `PROBE_GUIDE_SCALE` evenly. It takes the weight the walk covers before its row from the row weights,
|
|
195
|
+
* then writes the first ray of each of its walk positions. The walk's first row writes the total and the
|
|
196
|
+
* even share as well.
|
|
197
|
+
*
|
|
198
|
+
* @type {ComputeShader}
|
|
199
|
+
*/
|
|
200
|
+
export const shader_probe_clipmap_guide_starts = ComputeShader.from({
|
|
201
|
+
label: "Probe Clipmap Guide Starts",
|
|
202
|
+
resources,
|
|
203
|
+
body: CodeChunk.from(
|
|
204
|
+
//language=WGSL
|
|
205
|
+
`
|
|
206
|
+
@compute @workgroup_size(${PROBE_THREAD_WORKGROUP_SIZE})
|
|
207
|
+
fn main(
|
|
208
|
+
@builtin(workgroup_id) workgroup_id: vec3<u32>,
|
|
209
|
+
@builtin(local_invocation_index) lane: u32,
|
|
210
|
+
) {
|
|
211
|
+
let thread = probe_guide_thread(workgroup_id, lane);
|
|
212
|
+
|
|
213
|
+
if (!thread.valid) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
let n = settings.radiance_resolution;
|
|
218
|
+
let texels = n * n;
|
|
219
|
+
let rays = thread.rays;
|
|
220
|
+
let row_weights = thread.base + 2u * texels + n;
|
|
221
|
+
|
|
222
|
+
var weights = 0u;
|
|
223
|
+
|
|
224
|
+
for (var y = 0u; y < n; y++) {
|
|
225
|
+
weights += probe_guide[row_weights + y];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// the shares, each rounded to f32, may sum a few units past the scale
|
|
229
|
+
let share = select(0u, (PROBE_GUIDE_SCALE - weights) / texels, weights < PROBE_GUIDE_SCALE);
|
|
230
|
+
let total = weights + share * texels;
|
|
231
|
+
|
|
232
|
+
// the walk's rows before this one, each a row of the map
|
|
233
|
+
var before = 0u;
|
|
234
|
+
|
|
235
|
+
for (var r = 0u; r < thread.row; r++) {
|
|
236
|
+
before += probe_guide[row_weights + probe_clipmap_guide_texel(r * n, thread.updates, n) / n] + share * n;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
let phase = probe_clipmap_guide_phase(thread.slot, thread.updates);
|
|
240
|
+
|
|
241
|
+
for (var c = 0u; c < n; c++) {
|
|
242
|
+
let position = thread.row * n + c;
|
|
243
|
+
|
|
244
|
+
probe_guide[thread.base + position] = probe_clipmap_guide_start(before, total, rays, phase);
|
|
245
|
+
|
|
246
|
+
before += probe_guide[thread.base + texels + probe_clipmap_guide_texel(position, thread.updates, n)] + share;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (thread.row == 0u) {
|
|
250
|
+
probe_guide[row_weights + n] = total;
|
|
251
|
+
probe_guide[row_weights + n + 1u] = share;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
`, [
|
|
255
|
+
chunk_probe_clipmap_guide_thread,
|
|
256
|
+
]),
|
|
257
|
+
});
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The light a front-face hit takes from beyond the trace (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7): a
|
|
3
|
-
* thread a ray, after shade through the same launch, `PROBE_DISPATCH_RAYS
|
|
4
|
-
* to the radiance shade left, ρ_d being the albedo shade
|
|
3
|
+
* thread a ray, after shade through the same launch, `PROBE_DISPATCH_RAYS`, its probe the one trace wrote
|
|
4
|
+
* into its flags. It adds ρ_d·(E_loc + E_ind)/π to the radiance shade left, ρ_d being the albedo shade
|
|
5
|
+
* left in the ray's \`row\`.
|
|
5
6
|
*
|
|
6
|
-
* - **E_loc, the local lights**: the point and spot lights of the hit's cell of the world light
|
|
7
|
-
* built over the bricks' cascades so that every hit has one, at most
|
|
8
|
-
* each; past them lights are dropped. Each
|
|
9
|
-
* the
|
|
10
|
-
*
|
|
7
|
+
* - **E_loc, the local lights**: one of the point and spot lights of the hit's cell of the world light
|
|
8
|
+
* clusters, built over the bricks' cascades so that every hit has one, at most
|
|
9
|
+
* `IRRADIANCE_CLIPMAP_LIGHT_BUDGET` of each; past them lights are dropped. Each light's unshadowed
|
|
10
|
+
* irradiance is the irradiance clipmap's, at the footprint of a voxel of the hit's cascade, by its
|
|
11
|
+
* cosine at the hit's normal.
|
|
12
|
+
* - One is picked by weighted reservoir sampling over the cell's lights, its weight the luminance of
|
|
13
|
+
* that irradiance, with one number stretched over the candidates as `sample_discrete_wrs` does; it
|
|
14
|
+
* lights the hit by its irradiance over the chance of its pick, w/W. The probe's blend of its rays
|
|
15
|
+
* averages the picks to the cell's sum.
|
|
16
|
+
* - The picked light's shadow is a ray traced through the brick clipmap, as the hit's own ray was:
|
|
17
|
+
* from a voxel off the surface, past the field's half-voxel expand, toward a point of the light's
|
|
18
|
+
* sphere drawn as the path tracer draws it, stopping short of that point by the light's near clip or
|
|
19
|
+
* a voxel, whichever is more, for the expand at that end. It sees the light if it misses; a hit, or a
|
|
20
|
+
* march that spends its steps, is no light. A light that casts no shadow traces none.
|
|
21
|
+
* - The pick and the point are drawn from the ray's slot and direction, fresh every update.
|
|
11
22
|
* - **E_ind, the next bounce**: this mode's own diffuse at the hit, `probe_clipmap_sample_sh` from the
|
|
12
23
|
* hit along its normal, the view back along the ray, with the ray's own jitter as the pick's noise.
|
|
13
24
|
* The projection writes the records later in the frame, so they hold last frame's SH: each frame takes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_light.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_light.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js"],"names":[],"mappings":"AA8FA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,yCAFU,aAAa,CA6LpB;8BApS2B,kCAAkC"}
|