@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_light.js
CHANGED
|
@@ -1,34 +1,50 @@
|
|
|
1
1
|
import { MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
2
2
|
import { chunk_light_cluster_counts } from "../../../light/cluster/chunk_light_cluster_counts.js";
|
|
3
3
|
import { LIGHT_DATA_RESOURCE } from "../../../light/LIGHT_DATA_RESOURCE.js";
|
|
4
|
+
import { LIGHT_DATABASE_SPEC } from "../../../light/LIGHT_DATABASE_SPEC.js";
|
|
5
|
+
import { LIGHT_FLAGS } from "../../../light/model/io/LIGHT_FLAGS.js";
|
|
4
6
|
import {
|
|
5
7
|
chunk_world_light_cluster_lookup_at,
|
|
6
8
|
WORLD_CLUSTER_DATA_RESOURCE,
|
|
7
9
|
WORLD_CLUSTER_LOOKUP_RESOURCE
|
|
8
10
|
} from "../../../light/world_cluster/chunk_world_light_cluster_lookup.js";
|
|
11
|
+
import { chunk_rgb_to_luminance } from "../../../shader/chunk/color/chunk_rgb_to_luminance.js";
|
|
12
|
+
import { chunk_rgbe9995_decode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.js";
|
|
13
|
+
import { chunk_rgbe9995_encode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_encode.js";
|
|
9
14
|
import { chunk_uv_octahedral_unit_decode } from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
|
|
15
|
+
import { chunk_sphere_sample_volume } from "../../../shader/chunk/geometry/sphere/chunk_sphere_sample_volume.js";
|
|
10
16
|
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
11
17
|
import { RECIPROCAL_PI_DECLARATION } from "../../../shader/chunk/math/RECIPROCAL_PI_DECLARATION.js";
|
|
18
|
+
import { chunk_hash_to_float01 } from "../../../shader/chunk/random/chunk_hash_to_float01.js";
|
|
19
|
+
import { chunk_pcg4d } from "../../../shader/chunk/random/pcg/chunk_pcg4d.js";
|
|
12
20
|
import {
|
|
13
21
|
chunk_resolve_irradiance_sh_to_diffuse
|
|
14
22
|
} from "../../../shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_diffuse.js";
|
|
15
23
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
16
24
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
17
25
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
18
|
-
import { SHADOWMAP_ATLAS_RESOURCE } from "../../../shadow/map/SHADOWMAP_RESOURCES.js";
|
|
19
26
|
import { STBN_VEC2_RESOURCE } from "../../../STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js";
|
|
20
|
-
import { chunk_volumetrics_local_light_shadow } from "../../../volumetrics/chunk_volumetrics_local_light_shadow.js";
|
|
21
27
|
import { chunk_irradiance_clipmap_local_light } from "../../../volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_local_light.js";
|
|
22
28
|
import { IRRADIANCE_CLIPMAP_LIGHT_BUDGET } from "../../../volumetrics/irradiance_clipmap/IRRADIANCE_CLIPMAP.js";
|
|
23
29
|
import { BRICK_TRACE_HIT } from "../brick/BRICK_CLIPMAP.js";
|
|
24
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
BRICK_ATLAS_TEXTURE_RESOURCE,
|
|
32
|
+
BRICK_LEVELS_RESOURCE,
|
|
33
|
+
BRICK_MAP_TEXTURE_RESOURCE,
|
|
34
|
+
BRICK_OCCUPANCY_TEXTURE_RESOURCE,
|
|
35
|
+
BRICK_SAMPLER_RESOURCE,
|
|
36
|
+
chunk_brick_clipmap_trace
|
|
37
|
+
} from "../brick/chunk_brick_clipmap_trace.js";
|
|
25
38
|
import {
|
|
26
39
|
chunk_probe_clipmap,
|
|
27
40
|
chunk_probe_clipmap_ray_jitter,
|
|
41
|
+
chunk_probe_clipmap_ray_layout,
|
|
42
|
+
chunk_probe_clipmap_ray_origin,
|
|
28
43
|
chunk_probe_clipmap_ray_texel,
|
|
29
44
|
PROBE_DEPTH_HISTORY_RESOURCE,
|
|
30
45
|
PROBE_LEVELS_RESOURCE,
|
|
31
46
|
PROBE_ORIGINS_READ_RESOURCE,
|
|
47
|
+
PROBE_RAY_SUMS_READ_RESOURCE,
|
|
32
48
|
PROBE_RAYS_WRITE_RESOURCE,
|
|
33
49
|
PROBE_RECORDS_READ_RESOURCE,
|
|
34
50
|
PROBE_STATES_READ_RESOURCE,
|
|
@@ -43,7 +59,8 @@ import {
|
|
|
43
59
|
import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
|
|
44
60
|
import { PROBE_TRACE_SETTINGS } from "./shader_probe_clipmap_trace.js";
|
|
45
61
|
|
|
46
|
-
const
|
|
62
|
+
const POINT = LIGHT_DATABASE_SPEC.get('light_point');
|
|
63
|
+
const SPOT = LIGHT_DATABASE_SPEC.get('light_spot');
|
|
47
64
|
|
|
48
65
|
const resources = new ShaderResourceSetDescriptor();
|
|
49
66
|
|
|
@@ -53,6 +70,7 @@ resources.createGroup()
|
|
|
53
70
|
.add(PROBE_TRACE_READ_RESOURCE)
|
|
54
71
|
.add(PROBE_ORIGINS_READ_RESOURCE)
|
|
55
72
|
.add(PROBE_RAYS_WRITE_RESOURCE)
|
|
73
|
+
.add(PROBE_RAY_SUMS_READ_RESOURCE)
|
|
56
74
|
.add(PROBE_STATES_READ_RESOURCE)
|
|
57
75
|
.add(STBN_VEC2_RESOURCE);
|
|
58
76
|
|
|
@@ -66,21 +84,35 @@ resources.createGroup()
|
|
|
66
84
|
|
|
67
85
|
resources.createGroup()
|
|
68
86
|
.add(BRICK_LEVELS_RESOURCE)
|
|
87
|
+
.add(BRICK_MAP_TEXTURE_RESOURCE)
|
|
88
|
+
.add(BRICK_OCCUPANCY_TEXTURE_RESOURCE)
|
|
89
|
+
.add(BRICK_ATLAS_TEXTURE_RESOURCE)
|
|
90
|
+
.add(BRICK_SAMPLER_RESOURCE)
|
|
69
91
|
.add(LIGHT_DATA_RESOURCE)
|
|
70
92
|
.add(WORLD_CLUSTER_LOOKUP_RESOURCE)
|
|
71
|
-
.add(WORLD_CLUSTER_DATA_RESOURCE)
|
|
72
|
-
.add(SHADOWMAP_ATLAS_RESOURCE);
|
|
93
|
+
.add(WORLD_CLUSTER_DATA_RESOURCE);
|
|
73
94
|
|
|
74
95
|
/**
|
|
75
96
|
* The light a front-face hit takes from beyond the trace (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7): a
|
|
76
|
-
* thread a ray, after shade through the same launch, `PROBE_DISPATCH_RAYS
|
|
77
|
-
* to the radiance shade left, ρ_d being the albedo shade
|
|
97
|
+
* thread a ray, after shade through the same launch, `PROBE_DISPATCH_RAYS`, its probe the one trace wrote
|
|
98
|
+
* into its flags. It adds ρ_d·(E_loc + E_ind)/π to the radiance shade left, ρ_d being the albedo shade
|
|
99
|
+
* left in the ray's \`row\`.
|
|
78
100
|
*
|
|
79
|
-
* - **E_loc, the local lights**: the point and spot lights of the hit's cell of the world light
|
|
80
|
-
* built over the bricks' cascades so that every hit has one, at most
|
|
81
|
-
* each; past them lights are dropped. Each
|
|
82
|
-
* the
|
|
83
|
-
*
|
|
101
|
+
* - **E_loc, the local lights**: one of the point and spot lights of the hit's cell of the world light
|
|
102
|
+
* clusters, built over the bricks' cascades so that every hit has one, at most
|
|
103
|
+
* `IRRADIANCE_CLIPMAP_LIGHT_BUDGET` of each; past them lights are dropped. Each light's unshadowed
|
|
104
|
+
* irradiance is the irradiance clipmap's, at the footprint of a voxel of the hit's cascade, by its
|
|
105
|
+
* cosine at the hit's normal.
|
|
106
|
+
* - One is picked by weighted reservoir sampling over the cell's lights, its weight the luminance of
|
|
107
|
+
* that irradiance, with one number stretched over the candidates as `sample_discrete_wrs` does; it
|
|
108
|
+
* lights the hit by its irradiance over the chance of its pick, w/W. The probe's blend of its rays
|
|
109
|
+
* averages the picks to the cell's sum.
|
|
110
|
+
* - The picked light's shadow is a ray traced through the brick clipmap, as the hit's own ray was:
|
|
111
|
+
* from a voxel off the surface, past the field's half-voxel expand, toward a point of the light's
|
|
112
|
+
* sphere drawn as the path tracer draws it, stopping short of that point by the light's near clip or
|
|
113
|
+
* a voxel, whichever is more, for the expand at that end. It sees the light if it misses; a hit, or a
|
|
114
|
+
* march that spends its steps, is no light. A light that casts no shadow traces none.
|
|
115
|
+
* - The pick and the point are drawn from the ray's slot and direction, fresh every update.
|
|
84
116
|
* - **E_ind, the next bounce**: this mode's own diffuse at the hit, `probe_clipmap_sample_sh` from the
|
|
85
117
|
* hit along its normal, the view back along the ray, with the ray's own jitter as the pick's noise.
|
|
86
118
|
* The projection writes the records later in the frame, so they hold last frame's SH: each frame takes
|
|
@@ -100,47 +132,112 @@ export const shader_probe_clipmap_light = ComputeShader.from({
|
|
|
100
132
|
body: CodeChunk.from(
|
|
101
133
|
//language=WGSL
|
|
102
134
|
`
|
|
103
|
-
// E_loc at a front-face hit in brick cascade \`cascade\`: its world cluster cell's point and spot lights
|
|
104
|
-
|
|
135
|
+
// E_loc at a front-face hit in brick cascade \`cascade\`: one of its world cluster cell's point and spot lights,
|
|
136
|
+
// picked by \`random.x\` in proportion to its light at the hit and over the chance of its pick, shadowed by a ray
|
|
137
|
+
// toward the point of the light's sphere \`random.yzw\` draws
|
|
138
|
+
fn probe_clipmap_local_irradiance(cascade: u32, position: vec3<f32>, normal: vec3<f32>, random: vec4<f32>) -> vec3<f32> {
|
|
105
139
|
let level = brick_levels[cascade];
|
|
106
140
|
let voxel = level.cell_size / ${MESH_SDF_BRICK_VOXELS}.0;
|
|
107
141
|
let cell = world_light_cluster_metadata_at(cascade, level, 0.0, position);
|
|
108
142
|
let point_count = min(light_cluster_count_point(cell.counts), ${IRRADIANCE_CLIPMAP_LIGHT_BUDGET}u);
|
|
109
143
|
let spot_count = min(light_cluster_count_spot(cell.counts), ${IRRADIANCE_CLIPMAP_LIGHT_BUDGET}u);
|
|
110
144
|
|
|
111
|
-
// the
|
|
112
|
-
let
|
|
145
|
+
// the cell's spot lights follow its point lights
|
|
146
|
+
let spots = cell.offset + light_cluster_count_point(cell.counts);
|
|
147
|
+
|
|
148
|
+
// the reservoir: the weights so far, and the light it holds
|
|
149
|
+
var u = random.x;
|
|
150
|
+
var total = 0.0;
|
|
151
|
+
var picked = vec3<f32>(0.0);
|
|
152
|
+
var picked_weight = 0.0;
|
|
153
|
+
var picked_index = 0u;
|
|
154
|
+
var picked_spot = false;
|
|
113
155
|
|
|
114
|
-
var
|
|
156
|
+
for (var j = 0u; j < point_count + spot_count; j++) {
|
|
157
|
+
let spot = j >= point_count;
|
|
158
|
+
let index = world_cluster_data[select(cell.offset + j, spots + (j - point_count), spot)];
|
|
115
159
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
160
|
+
var irradiance: vec3<f32>;
|
|
161
|
+
|
|
162
|
+
if (spot) {
|
|
163
|
+
let light = irradiance_clipmap_get_spot_light_info_by_index(&light_data, index, position, voxel);
|
|
164
|
+
|
|
165
|
+
irradiance = light.color * max(dot(normal, light.direction), 0.0);
|
|
166
|
+
} else {
|
|
167
|
+
let light = irradiance_clipmap_get_point_light_info_by_index(&light_data, index, position, voxel);
|
|
168
|
+
|
|
169
|
+
irradiance = light.color * max(dot(normal, light.direction), 0.0);
|
|
170
|
+
}
|
|
120
171
|
|
|
121
|
-
|
|
172
|
+
let weight = rgb_to_luminance(irradiance);
|
|
173
|
+
|
|
174
|
+
if (weight <= 0.0) {
|
|
122
175
|
continue;
|
|
123
176
|
}
|
|
124
177
|
|
|
125
|
-
|
|
178
|
+
// the light takes the reservoir by its share of the weights so far, and the number is stretched back
|
|
179
|
+
// over [0, 1) from whichever side of the share it fell
|
|
180
|
+
total += weight;
|
|
181
|
+
|
|
182
|
+
let share = weight / total;
|
|
183
|
+
|
|
184
|
+
if (u < share) {
|
|
185
|
+
u = u / share;
|
|
186
|
+
picked = irradiance;
|
|
187
|
+
picked_weight = weight;
|
|
188
|
+
picked_index = index;
|
|
189
|
+
picked_spot = spot;
|
|
190
|
+
} else {
|
|
191
|
+
u = (u - share) / (1.0 - share);
|
|
192
|
+
}
|
|
126
193
|
}
|
|
127
194
|
|
|
128
|
-
|
|
129
|
-
|
|
195
|
+
if (total <= 0.0) {
|
|
196
|
+
return vec3<f32>(0.0);
|
|
197
|
+
}
|
|
130
198
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
let light = irradiance_clipmap_get_spot_light_info_by_index(&light_data, index, position, voxel);
|
|
134
|
-
let cosine = max(dot(normal, light.direction), 0.0);
|
|
199
|
+
// the pick's light over the chance of the pick, w / W
|
|
200
|
+
let estimate = picked * (total / picked_weight);
|
|
135
201
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
202
|
+
var source: vec3<f32>;
|
|
203
|
+
var radius: f32;
|
|
204
|
+
var near_clip: f32;
|
|
205
|
+
var flags: u32;
|
|
206
|
+
|
|
207
|
+
if (picked_spot) {
|
|
208
|
+
let light = ${SPOT.marshalling_method_read}(&light_data, picked_index);
|
|
209
|
+
|
|
210
|
+
source = light.position;
|
|
211
|
+
radius = light.radius;
|
|
212
|
+
near_clip = light.near_clip_distance;
|
|
213
|
+
flags = light.flags;
|
|
214
|
+
} else {
|
|
215
|
+
let light = ${POINT.marshalling_method_read}(&light_data, picked_index);
|
|
216
|
+
|
|
217
|
+
source = light.position.xyz;
|
|
218
|
+
radius = light.radius;
|
|
219
|
+
near_clip = light.near_clip_distance;
|
|
220
|
+
flags = light.flags;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if ((flags & ${LIGHT_FLAGS.CASTS_SHADOW_BIT}u) == 0u) {
|
|
224
|
+
return estimate;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// from a voxel off the surface, past the half voxel the field's surface may sit off it, to a point of the
|
|
228
|
+
// light, short of it by the light's near clip or by a voxel for the expand at that end
|
|
229
|
+
let lifted = position + normal * voxel;
|
|
230
|
+
let to_light = source + radius * sphere_sample_volume(random.yzw) - lifted;
|
|
231
|
+
let span = length(to_light);
|
|
232
|
+
let reach = span - max(near_clip, voxel);
|
|
139
233
|
|
|
140
|
-
|
|
234
|
+
if (reach <= 0.0) {
|
|
235
|
+
return estimate;
|
|
141
236
|
}
|
|
142
237
|
|
|
143
|
-
|
|
238
|
+
let shadow = brick_clipmap_trace(lifted, to_light / span, 0.0, reach, settings.brick_cascade_count);
|
|
239
|
+
|
|
240
|
+
return select(vec3<f32>(0.0), estimate, shadow.kind == BRICK_TRACE_MISS);
|
|
144
241
|
}
|
|
145
242
|
|
|
146
243
|
@compute @workgroup_size(${PROBE_THREAD_WORKGROUP_SIZE})
|
|
@@ -149,12 +246,6 @@ fn main(
|
|
|
149
246
|
@builtin(local_invocation_index) lane: u32,
|
|
150
247
|
) {
|
|
151
248
|
let ray = folded_workgroup_index(workgroup_id) * PROBE_THREAD_WORKGROUP_SIZE + lane;
|
|
152
|
-
let rays = settings.rays_per_probe;
|
|
153
|
-
|
|
154
|
-
if (ray >= min(probe_trace.count, settings.trace_capacity) * rays) {
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
249
|
let record = probe_rays[ray];
|
|
159
250
|
let albedo = unpack4x8unorm(record.row).rgb;
|
|
160
251
|
let front_hit = (record.flags & PROBE_RAY_KIND_MASK) == ${BRICK_TRACE_HIT}u && (record.flags & PROBE_RAY_BACK_FACE) == 0u;
|
|
@@ -164,18 +255,27 @@ fn main(
|
|
|
164
255
|
return;
|
|
165
256
|
}
|
|
166
257
|
|
|
167
|
-
|
|
168
|
-
let
|
|
258
|
+
// the probe's update's rays, and this one's place among them
|
|
259
|
+
let k = record.flags >> PROBE_RAY_PROBE_SHIFT;
|
|
260
|
+
let span = probe_clipmap_probe_rays(k);
|
|
261
|
+
let rays = span.y;
|
|
262
|
+
let i = ray - span.x;
|
|
263
|
+
|
|
264
|
+
let slot = probe_trace.elements[k];
|
|
169
265
|
let n = settings.radiance_resolution;
|
|
170
266
|
let updates = probe_state_updates(probe_states[slot].x);
|
|
171
267
|
let texel = probe_clipmap_ray_texel(i, updates, rays, n * n);
|
|
172
268
|
|
|
173
269
|
let direction = uv_octahedral_unit_decode(unpack2x16unorm(record.direction));
|
|
174
|
-
let position = probe_origins[
|
|
270
|
+
let position = probe_clipmap_ray_origin(probe_origins[k], slot, record.direction) + record.t * direction;
|
|
175
271
|
let normal = uv_octahedral_unit_decode(unpack2x16unorm(record.normal));
|
|
176
272
|
|
|
273
|
+
// the local lights' pick and their shadow ray's point, apart from the origin's draw
|
|
274
|
+
let hash = pcg4d(vec4<u32>(slot, record.direction, 0xA54FF53Au, 0u));
|
|
275
|
+
let random = vec4<f32>(hash_to_float01(hash.x), hash_to_float01(hash.y), hash_to_float01(hash.z), hash_to_float01(hash.w));
|
|
276
|
+
|
|
177
277
|
// E/π: the local lights', then the next bounce's, which the resolve gives as E/π
|
|
178
|
-
var e = probe_clipmap_local_irradiance(record.flags >> PROBE_RAY_CASCADE_SHIFT, position, normal) * RECIPROCAL_PI;
|
|
278
|
+
var e = probe_clipmap_local_irradiance((record.flags >> PROBE_RAY_CASCADE_SHIFT) & PROBE_RAY_CASCADE_MASK, position, normal, random) * RECIPROCAL_PI;
|
|
179
279
|
|
|
180
280
|
let probes = probe_clipmap_sample_sh(position, normal, -direction, probe_clipmap_ray_jitter(slot, texel, i, updates, rays, n));
|
|
181
281
|
|
|
@@ -187,16 +287,14 @@ fn main(
|
|
|
187
287
|
return;
|
|
188
288
|
}
|
|
189
289
|
|
|
190
|
-
|
|
191
|
-
let held = min(light, vec3<f32>(${HALF_MAX}.0));
|
|
192
|
-
|
|
193
|
-
probe_rays[ray].light_rg = pack2x16float(held.rg);
|
|
194
|
-
probe_rays[ray].light_b = pack2x16float(vec2<f32>(held.b, 0.0));
|
|
290
|
+
probe_rays[ray].light = rgbe9995_encode(rgbe9995_decode(record.light) + albedo * e);
|
|
195
291
|
}
|
|
196
292
|
`, [
|
|
197
293
|
chunk_probe_clipmap,
|
|
294
|
+
chunk_probe_clipmap_ray_layout,
|
|
198
295
|
chunk_probe_clipmap_ray_texel,
|
|
199
296
|
chunk_probe_clipmap_ray_jitter,
|
|
297
|
+
chunk_probe_clipmap_ray_origin,
|
|
200
298
|
chunk_folded_workgroup_index,
|
|
201
299
|
chunk_uv_octahedral_unit_decode,
|
|
202
300
|
chunk_probe_clipmap_pick,
|
|
@@ -205,6 +303,14 @@ fn main(
|
|
|
205
303
|
chunk_world_light_cluster_lookup_at,
|
|
206
304
|
chunk_light_cluster_counts,
|
|
207
305
|
chunk_irradiance_clipmap_local_light,
|
|
208
|
-
|
|
306
|
+
chunk_rgb_to_luminance,
|
|
307
|
+
chunk_brick_clipmap_trace,
|
|
308
|
+
chunk_pcg4d,
|
|
309
|
+
chunk_hash_to_float01,
|
|
310
|
+
chunk_sphere_sample_volume,
|
|
311
|
+
POINT.chunk_read,
|
|
312
|
+
SPOT.chunk_read,
|
|
313
|
+
chunk_rgbe9995_decode,
|
|
314
|
+
chunk_rgbe9995_encode,
|
|
209
315
|
]),
|
|
210
316
|
});
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {WebGPUStruct}
|
|
3
|
+
*/
|
|
4
|
+
export const PROBE_ORDER_SETTINGS: WebGPUStruct;
|
|
5
|
+
/**
|
|
6
|
+
* The trace list in the probes' order (§8.6): a workgroup a run of `PROBE_ORDER_RUN` listed
|
|
7
|
+
* probes, dispatched through `PROBE_DISPATCH_ORDER` once the due passes have listed the frame's updates,
|
|
8
|
+
* sorts its run in place by each probe's cascade and the Morton code of its lattice point in the
|
|
9
|
+
* cascade's window, the cascade above. Every pass after it reads a probe's place in the list from the
|
|
10
|
+
* sorted list, the rays' layout among them, so the rays of neighbouring probes run in neighbouring
|
|
11
|
+
* waves. Past one run the list is ordered within each run, not across them.
|
|
12
|
+
*
|
|
13
|
+
* Measured (PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md): the rays' stretch 1–4% shorter on
|
|
14
|
+
* the iGPU at 131k rays a frame, level on the 4090. The order is the only one of the rays' orders
|
|
15
|
+
* measured that pays: every sort of the rays themselves, global or within chunks, by direction, by
|
|
16
|
+
* place or by both, costs more than it buys, because the rays of one probe already share their waves.
|
|
17
|
+
*
|
|
18
|
+
* @type {ComputeShader}
|
|
19
|
+
*/
|
|
20
|
+
export const shader_probe_clipmap_order: ComputeShader;
|
|
21
|
+
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
22
|
+
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
23
|
+
//# sourceMappingURL=shader_probe_clipmap_order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_order.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.js"],"names":[],"mappings":"AAeA;;GAEG;AACH,mCAFU,YAAY,CASG;AAWzB;;;;;;;;;;;;;;GAcG;AACH,yCAFU,aAAa,CA4DpB;6BArG0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_order.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { chunk_sort_bitonic_workgroup } from "../../../gpu_primitive/sort/chunk_sort_bitonic_workgroup.js";
|
|
2
|
+
import { SORT_KEYS_PER_THREAD, SORT_TILE_SIZE, SORT_WORKGROUP_SIZE } from "../../../gpu_primitive/sort/defs.js";
|
|
3
|
+
import { chunk_v3_morton_encode } from "../../../shader/chunk/bvh/morton/chunk_v3_morton_encode.js";
|
|
4
|
+
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
5
|
+
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
6
|
+
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
7
|
+
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
8
|
+
import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
9
|
+
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
10
|
+
import { assert } from "../../../../../core/assert.js";
|
|
11
|
+
import { chunk_probe_clipmap, PROBE_LEVELS_RESOURCE, PROBE_RECORDS_READ_RESOURCE, PROBE_TRACE_ORDER_RESOURCE } from "./chunk_probe_clipmap.js";
|
|
12
|
+
import { PROBE_ORDER_RUN } from "./PROBE_CLIPMAP.js";
|
|
13
|
+
|
|
14
|
+
assert.equal(PROBE_ORDER_RUN, SORT_TILE_SIZE, 'PROBE_ORDER_RUN is a tile of the bitonic sort');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @type {WebGPUStruct}
|
|
18
|
+
*/
|
|
19
|
+
export const PROBE_ORDER_SETTINGS = WebGPUStruct.from({
|
|
20
|
+
/** probes a frame updates at most: the trace list's bound */
|
|
21
|
+
trace_capacity: u32,
|
|
22
|
+
/** lattice points a side of a cascade's window */
|
|
23
|
+
resolution: u32,
|
|
24
|
+
/** bits an axis of the Morton code, ⌈log2 resolution⌉ */
|
|
25
|
+
axis_bits: u32,
|
|
26
|
+
}, "ProbeOrderSettings");
|
|
27
|
+
|
|
28
|
+
const resources = new ShaderResourceSetDescriptor();
|
|
29
|
+
|
|
30
|
+
resources.setImmediate("settings", PROBE_ORDER_SETTINGS);
|
|
31
|
+
|
|
32
|
+
resources.createGroup()
|
|
33
|
+
.add(PROBE_TRACE_ORDER_RESOURCE)
|
|
34
|
+
.add(PROBE_RECORDS_READ_RESOURCE)
|
|
35
|
+
.add(PROBE_LEVELS_RESOURCE);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The trace list in the probes' order (§8.6): a workgroup a run of `PROBE_ORDER_RUN` listed
|
|
39
|
+
* probes, dispatched through `PROBE_DISPATCH_ORDER` once the due passes have listed the frame's updates,
|
|
40
|
+
* sorts its run in place by each probe's cascade and the Morton code of its lattice point in the
|
|
41
|
+
* cascade's window, the cascade above. Every pass after it reads a probe's place in the list from the
|
|
42
|
+
* sorted list, the rays' layout among them, so the rays of neighbouring probes run in neighbouring
|
|
43
|
+
* waves. Past one run the list is ordered within each run, not across them.
|
|
44
|
+
*
|
|
45
|
+
* Measured (PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md): the rays' stretch 1–4% shorter on
|
|
46
|
+
* the iGPU at 131k rays a frame, level on the 4090. The order is the only one of the rays' orders
|
|
47
|
+
* measured that pays: every sort of the rays themselves, global or within chunks, by direction, by
|
|
48
|
+
* place or by both, costs more than it buys, because the rays of one probe already share their waves.
|
|
49
|
+
*
|
|
50
|
+
* @type {ComputeShader}
|
|
51
|
+
*/
|
|
52
|
+
export const shader_probe_clipmap_order = ComputeShader.from({
|
|
53
|
+
label: "Probe Clipmap Order",
|
|
54
|
+
resources,
|
|
55
|
+
body: CodeChunk.from(
|
|
56
|
+
//language=WGSL
|
|
57
|
+
`
|
|
58
|
+
// the run's keys and the slots they carry, which the bitonic sort orders by name
|
|
59
|
+
var<workgroup> keys: array<u32, ${SORT_TILE_SIZE}>;
|
|
60
|
+
var<workgroup> values: array<u32, ${SORT_TILE_SIZE}>;
|
|
61
|
+
|
|
62
|
+
var<workgroup> wg_count: u32;
|
|
63
|
+
|
|
64
|
+
@compute @workgroup_size(${SORT_WORKGROUP_SIZE}, 1, 1)
|
|
65
|
+
fn main(
|
|
66
|
+
@builtin(workgroup_id) workgroup_id: vec3<u32>,
|
|
67
|
+
@builtin(local_invocation_index) thread_id: u32,
|
|
68
|
+
) {
|
|
69
|
+
let base = folded_workgroup_index(workgroup_id) * ${SORT_TILE_SIZE}u;
|
|
70
|
+
|
|
71
|
+
if (thread_id == 0u) {
|
|
72
|
+
let listed = min(probe_trace.count, settings.trace_capacity);
|
|
73
|
+
|
|
74
|
+
wg_count = min(select(0u, listed - base, listed > base), ${SORT_TILE_SIZE}u);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// the sort's barriers sit under loops its count bounds, so the count is the workgroup's
|
|
78
|
+
let count = workgroupUniformLoad(&wg_count);
|
|
79
|
+
let last = i32(settings.resolution) - 1;
|
|
80
|
+
|
|
81
|
+
for (var k = 0u; k < ${SORT_KEYS_PER_THREAD}u; k++) {
|
|
82
|
+
let at = k * ${SORT_WORKGROUP_SIZE}u + thread_id;
|
|
83
|
+
|
|
84
|
+
if (at < count) {
|
|
85
|
+
let slot = probe_trace.elements[base + at];
|
|
86
|
+
let cascade = probe_record_cascade(probe_records[slot].flags);
|
|
87
|
+
let local = vec3<u32>(clamp(probe_records[slot].cell - probe_levels[cascade].corner, vec3<i32>(0), vec3<i32>(last)));
|
|
88
|
+
|
|
89
|
+
keys[at] = (cascade << (3u * settings.axis_bits)) | v3_morton_encode(local.x, local.y, local.z);
|
|
90
|
+
values[at] = slot;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
sort_bitonic_workgroup(thread_id, count);
|
|
95
|
+
|
|
96
|
+
for (var k = 0u; k < ${SORT_KEYS_PER_THREAD}u; k++) {
|
|
97
|
+
let at = k * ${SORT_WORKGROUP_SIZE}u + thread_id;
|
|
98
|
+
|
|
99
|
+
if (at < count) {
|
|
100
|
+
probe_trace.elements[base + at] = values[at];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`, [
|
|
105
|
+
chunk_probe_clipmap,
|
|
106
|
+
chunk_folded_workgroup_index,
|
|
107
|
+
chunk_v3_morton_encode,
|
|
108
|
+
chunk_sort_bitonic_workgroup,
|
|
109
|
+
]),
|
|
110
|
+
});
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts
CHANGED
|
@@ -6,8 +6,9 @@ export const PROBE_PROJECT_SETTINGS: WebGPUStruct;
|
|
|
6
6
|
* Projection, rows (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.8): a thread a row of each listed probe's
|
|
7
7
|
* radiance map, dispatched through `PROBE_DISPATCH_ROWS`. It sums the row's texels, new and kept, as
|
|
8
8
|
* irradiance SH, `convert_to_irradiance_sh(L, ω)·dω/(2π)` over each texel's solid angle, so that the
|
|
9
|
-
* resolve gives E/π;
|
|
10
|
-
*
|
|
9
|
+
* resolve gives E/π; the row's rays this update, resolved and back faces; and how far the update's
|
|
10
|
+
* samples fell from their means, with that sum's variance. One row of the probe's projection each, which
|
|
11
|
+
* the probe's pass sums.
|
|
11
12
|
*
|
|
12
13
|
* @type {ComputeShader}
|
|
13
14
|
*/
|
|
@@ -18,6 +19,27 @@ export const shader_probe_clipmap_project_rows: ComputeShader;
|
|
|
18
19
|
* by the update's resolved rays: dead past a quarter of back faces, else alive, its update counted and
|
|
19
20
|
* its time the frame's. An update with no resolved ray keeps the probe's kind.
|
|
20
21
|
*
|
|
22
|
+
* Only uniform rays classify. Those are a uniform update's, and a guided update's whose guide weighs
|
|
23
|
+
* nothing (a dark history), which spreads its rays evenly. A guided update's rays shun back faces, whose
|
|
24
|
+
* radiance is nothing, so their share would read a probe inside a solid as alive. Such an update keeps
|
|
25
|
+
* the probe's kind and its back-face share.
|
|
26
|
+
*
|
|
27
|
+
* **The probe's ray request** (§8.6): the rays its next guided update asks for, in `probe_requests`.
|
|
28
|
+
* - After a probe's first update, the most: Enshrouded's new probe that asks for all it can have.
|
|
29
|
+
* - When its light has moved, the most again. The update's change score sums its blended texels' falls
|
|
30
|
+
* from their means, luminance, each in its own deviation and held to `PROBE_CHANGE_SIGNIFICANCE` by
|
|
31
|
+
* accumulation, over the root of their count. A test texel by texel sees no change under a one-ray
|
|
32
|
+
* texel's own noise (measured: the estimator's inconsistency barely moves on a doubling); a sum of the
|
|
33
|
+
* falls unbounded is one bright sample's.
|
|
34
|
+
* - The score is held to the probe's own: moved means past `PROBE_CHANGE_SIGNIFICANCE` of its running
|
|
35
|
+
* deviation, at least one, from its running mean, both over the estimator's variance window (2τ). A
|
|
36
|
+
* probe whose means sit off its samples (the estimator's own bias on texels lit by few rays) scores
|
|
37
|
+
* steadily off zero.
|
|
38
|
+
* - Measured, Sponza on the 4090, the camera and the light still, 3,600 frames settled: of the probes
|
|
39
|
+
* past 64 updates, 4.2% asked for the most against a sum of the raw falls held to zero, 3.2% with each
|
|
40
|
+
* texel's fall bounded, and 1.1–1.3% held to their own statistics.
|
|
41
|
+
* - Otherwise half what it asked for last, down to the fewest: a converged probe sips.
|
|
42
|
+
*
|
|
21
43
|
* @type {ComputeShader}
|
|
22
44
|
*/
|
|
23
45
|
export const shader_probe_clipmap_project: ComputeShader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_project.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_project.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js"],"names":[],"mappings":"AAyBA;;GAEG;AACH,qCAFU,YAAY,CAqBK;AAW3B;;;;;;;;;GASG;AACH,gDAFU,aAAa,CAuDpB;AAcH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,2CAFU,aAAa,CA8FpB;6BAxP0B,sCAAsC;8BAHrC,kCAAkC"}
|