@woosh/meep-engine 3.61.2 → 3.61.3
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/CHANGELOG.md +111 -0
- package/package.json +1 -1
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/playground/probe_clipmap/README.md +3 -4
- package/src/shade/playground/probe_clipmap/index.html +5 -13
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +0 -5
- package/src/shade/playground/probe_clipmap_box/README.md +1 -1
- package/src/shade/playground/probe_clipmap_box/index.html +1 -1
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +50 -11
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts +10 -0
- package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.d.ts.map +1 -0
- package/src/shade/renderer/geometry/meshlet/meshlet_batch_colored.js +54 -0
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +85 -36
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +813 -412
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +7 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF.js +8 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts +14 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_BRICK_KEY.js +35 -0
- package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF_STRUCT.js +0 -4
- package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts +55 -10
- package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/MESH_SDF_BAKE.js +86 -16
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts +2 -2
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_bake.js +28 -2
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts +54 -0
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/chunk_mesh_sdf_contents.js +146 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +2 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts +18 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_content_rehash.js +66 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts +17 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_count.js +66 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +5 -3
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +15 -14
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts +2 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_free.js +12 -3
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts +21 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_key.js +84 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts +53 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_resolve.js +343 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts +3 -3
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_store.js +9 -5
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts +2 -2
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_take.js +3 -2
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts +69 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_upload.js +294 -0
- package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts +16 -0
- package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/MODEL_CACHE_BUNDLE.js +36 -0
- package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts +126 -0
- package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/ModelCacheBundle.js +148 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts +10 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_read.js +140 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts +8 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/bundle/model_cache_bundle_write.js +76 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts +9 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf.js +23 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts +13 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/chunk_mesh_sdf_brick_key.js +23 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +262 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +1819 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +118 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +204 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts +66 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BLOCK.js +103 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts +19 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_RESOURCES.js +23 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts +15 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_STRUCT.js +70 -0
- package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts +13 -0
- package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/SURFACE_MATERIAL.js +35 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts +32 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_block.js +111 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts +17 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_listed.js +49 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts +13 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_run_find.js +35 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts +24 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_sample.js +169 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts +19 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_mesh_surface_texel_ray.js +49 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts +19 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_fit.js +67 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts +78 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_read.js +320 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts +15 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/chunk_surface_material_store.js +48 -0
- package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts +51 -0
- package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/mesh_surface_channels.js +109 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts +11 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_command.js +51 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts +26 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_encode.js +453 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts +12 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_list.js +99 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts +22 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_survey.js +140 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts +32 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts.map +1 -0
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.js +261 -0
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/VirtualGeometry.js +2 -2
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.d.ts +6 -6
- package/src/shade/renderer/geometry/virtual/sdf/VGeoSDFProxies.js +7 -7
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +15 -7
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +82 -17
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts +26 -19
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSceneHolds.js +226 -148
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +25 -52
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +29 -69
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +19 -16
- 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 +24 -21
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +46 -22
- 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 +49 -36
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap.d.ts +3 -2
- 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 +7 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +8 -22
- 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 +15 -51
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +1 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +6 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +0 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts +4 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_batch.js +9 -34
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_resolve.js +15 -39
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_clear.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts +1 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_store.js +2 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/shader_brick_clipmap_take.js +5 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.d.ts +5 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/ProbeClipmapDebugView.js +16 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts +45 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_brick_material.js +208 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts +24 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_indirect.js +40 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts +34 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/{graph_probe_clipmap_debug_mesh_cards.js → graph_probe_clipmap_debug_mesh_surfaces.js} +38 -57
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +61 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +193 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts +67 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material.js +142 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts +32 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_cell.js +70 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts +30 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/chunk_brick_material_store.js +71 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts +26 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/material/shader_brick_material_gather.js +176 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +18 -9
- 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 +63 -44
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +21 -1
- 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 +24 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts +10 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_INDIRECT_LOBE.js +11 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts +11 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapIndirectLobe.js +15 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +44 -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 +88 -11
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts +43 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_material.js +138 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts +21 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_indirect_lobe.js +49 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +2 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +10 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts +22 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_select.js +50 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +4 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +8 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +3 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +5 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts +2 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +5 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +7 -4
- 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 +30 -26
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +6 -5
- 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 +22 -16
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js +6 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +6 -6
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts +14 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js +22 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts +37 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.js +122 -0
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_get.js +1 -11
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts +8 -0
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/hash_table/cpu_build_hash_table.js +6 -4
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.d.ts.map +1 -1
- package/src/shade/renderer/material/resident/GPUResidentMaterialContext.js +2 -18
- package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts +17 -0
- package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.d.ts.map +1 -0
- package/src/shade/renderer/material/resident/NEUTRAL_SURFACE.js +16 -0
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.d.ts +1 -1
- package/src/shade/renderer/path_tracer/shader/INDIRECT_TEXTURE_FILTER.js +1 -1
- package/src/shade/renderer/path_tracer/shader/IndirectTextureFilter.js +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts +20 -0
- package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.d.ts.map +1 -0
- package/src/shade/renderer/path_tracer/shader/chunk_beam_texture_level.js +65 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +1 -1
- package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts +12 -0
- package/src/shade/renderer/shader/chunk/material/albedo_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/albedo_compress.js +26 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_compress.js +22 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_albedo_uncompress.js +23 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_compress.js +25 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_metal_rough_uncompress.js +36 -0
- package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/material/metal_rough_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/metal_rough_compress.js +38 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot.js +35 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts +28 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_compress.js +79 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_fit.js +89 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts +31 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/pivot/chunk_sh2_color_pivot_uncompress.js +66 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.js +2 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_load.js +34 -0
- package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts +18 -0
- package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_frustum_unit_box_coverage_multisample.js +31 -23
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +5 -6
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts +0 -213
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/GPUMeshCardSets.js +0 -1468
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts +0 -82
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARDS.js +0 -127
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts +0 -24
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_RESOURCES.js +0 -29
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts +0 -12
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MESH_CARD_SET_STRUCT.js +0 -31
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts +0 -11
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/MeshCardCaptureMode.js +0 -21
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts +0 -29
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_card_surface.js +0 -179
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts +0 -17
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/chunk_mesh_cards.js +0 -107
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts +0 -65
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +0 -376
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts +0 -40
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_capture.js +0 -301
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts +0 -19
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_compact.js +0 -61
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +0 -18
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +0 -102
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts +0 -15
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_log.js +0 -65
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts +0 -22
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_merge.js +0 -136
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts +0 -20
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_pages.js +0 -104
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts +0 -20
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_args.js +0 -80
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts +0 -18
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_raster_scatter.js +0 -113
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts +0 -30
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_split.js +0 -146
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts +0 -34
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_cards.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts +0 -31
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_hit_surface.js +0 -82
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The next bounce a front-face hit takes, E_ind (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7;
|
|
3
3
|
* WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.4): a thread a ray, after the light pass through the same launch,
|
|
4
|
-
* `PROBE_DISPATCH_RAYS`. It adds ρ_d·E_ind/π to the ray's light, ρ_d the albedo shade left in its `
|
|
4
|
+
* `PROBE_DISPATCH_RAYS`. It adds ρ_d·E_ind/π to the ray's light, ρ_d the albedo shade left in its `albedo`.
|
|
5
5
|
*
|
|
6
6
|
* - **The first clipmap**: the frustum's probes, picked at the hit along its normal, the view back along
|
|
7
7
|
* the ray, with the ray's own pick noise (`probe_clipmap_ray_noise`, `PROBE_RAY_NOISE_PICK`), drawn
|
|
8
8
|
* apart from the jitter that placed the hit (`probe_clipmap_pick_in`).
|
|
9
|
-
* - **Where it has probes**, their SH is the bounce, and the ray's `
|
|
9
|
+
* - **Where it has probes**, their SH is the bounce, and the ray's `albedo` is cleared: a hit the first clipmap
|
|
10
10
|
* serves wants nothing of the fallback (`shader_probe_clipmap_want_hits`).
|
|
11
11
|
* - **Where it has none**, the fallback's, the world cache's: the same pick there, at its own spacing.
|
|
12
12
|
* - **Where neither has**, the bounce is **zero**, not the environment: a hit behind the camera in a cave
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* none. The records hold the SH their projection last wrote, at most a frame old, so each frame takes one more
|
|
18
18
|
* bounce. LPV's 0.97 a bounce is dropped: an albedo under one bounds the series already.
|
|
19
19
|
*
|
|
20
|
-
* Every probe ray takes it, of either clipmap; only the frustum's rays'
|
|
20
|
+
* Every probe ray takes it, of either clipmap; only the frustum's rays' albedos are read after, by the world
|
|
21
21
|
* cache's wants.
|
|
22
22
|
*
|
|
23
23
|
* @type {ComputeShader}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js
CHANGED
|
@@ -70,12 +70,12 @@ resources.createGroup()
|
|
|
70
70
|
/**
|
|
71
71
|
* The next bounce a front-face hit takes, E_ind (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7;
|
|
72
72
|
* WORLD_PROBE_CACHE_SCOPE_2026_11_01.md §1.4): a thread a ray, after the light pass through the same launch,
|
|
73
|
-
* `PROBE_DISPATCH_RAYS`. It adds ρ_d·E_ind/π to the ray's light, ρ_d the albedo shade left in its `
|
|
73
|
+
* `PROBE_DISPATCH_RAYS`. It adds ρ_d·E_ind/π to the ray's light, ρ_d the albedo shade left in its `albedo`.
|
|
74
74
|
*
|
|
75
75
|
* - **The first clipmap**: the frustum's probes, picked at the hit along its normal, the view back along
|
|
76
76
|
* the ray, with the ray's own pick noise (`probe_clipmap_ray_noise`, `PROBE_RAY_NOISE_PICK`), drawn
|
|
77
77
|
* apart from the jitter that placed the hit (`probe_clipmap_pick_in`).
|
|
78
|
-
* - **Where it has probes**, their SH is the bounce, and the ray's `
|
|
78
|
+
* - **Where it has probes**, their SH is the bounce, and the ray's `albedo` is cleared: a hit the first clipmap
|
|
79
79
|
* serves wants nothing of the fallback (`shader_probe_clipmap_want_hits`).
|
|
80
80
|
* - **Where it has none**, the fallback's, the world cache's: the same pick there, at its own spacing.
|
|
81
81
|
* - **Where neither has**, the bounce is **zero**, not the environment: a hit behind the camera in a cave
|
|
@@ -86,7 +86,7 @@ resources.createGroup()
|
|
|
86
86
|
* none. The records hold the SH their projection last wrote, at most a frame old, so each frame takes one more
|
|
87
87
|
* bounce. LPV's 0.97 a bounce is dropped: an albedo under one bounds the series already.
|
|
88
88
|
*
|
|
89
|
-
* Every probe ray takes it, of either clipmap; only the frustum's rays'
|
|
89
|
+
* Every probe ray takes it, of either clipmap; only the frustum's rays' albedos are read after, by the world
|
|
90
90
|
* cache's wants.
|
|
91
91
|
*
|
|
92
92
|
* @type {ComputeShader}
|
|
@@ -104,7 +104,7 @@ fn main(
|
|
|
104
104
|
) {
|
|
105
105
|
let ray = folded_workgroup_index(workgroup_id) * PROBE_THREAD_WORKGROUP_SIZE + lane;
|
|
106
106
|
let record = probe_rays[ray];
|
|
107
|
-
let albedo = unpack4x8unorm(record.
|
|
107
|
+
let albedo = unpack4x8unorm(record.albedo).rgb;
|
|
108
108
|
let front_hit = (record.flags & PROBE_RAY_KIND_MASK) == ${BRICK_TRACE_HIT}u && (record.flags & PROBE_RAY_BACK_FACE) == 0u;
|
|
109
109
|
|
|
110
110
|
// only a front-face hit that bounces anything takes more light
|
|
@@ -131,7 +131,7 @@ fn main(
|
|
|
131
131
|
|
|
132
132
|
if (probes.found) {
|
|
133
133
|
// served: nothing of the fallback is wanted here
|
|
134
|
-
probe_rays[ray].
|
|
134
|
+
probe_rays[ray].albedo = 0u;
|
|
135
135
|
} else {
|
|
136
136
|
probes = probe_clipmap_sh_in(
|
|
137
137
|
&bounce_fallback_records,
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* - A pixel no probe weighs anything for takes the environment's for both.
|
|
8
8
|
* - The two are resolved as `shader_resolve_indirect_lighting` resolves the IBL pair: AO multiplies the
|
|
9
9
|
* diffuse, the specular is occluded along its lobe, and the result is added to the scene's colour.
|
|
10
|
+
* - `PROBE_CLIPMAP_INDIRECT_LOBE` decides what is added: both lobes by default; for the mode's indirect debug
|
|
11
|
+
* views, one lobe's light alone, as sampled, before the surface's material and occlusion.
|
|
10
12
|
*
|
|
11
13
|
* @type {ImageShader}
|
|
12
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_indirect_lighting.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js"],"names":[],"mappings":"AAyIA;;;;;;;;;;;;;GAaG;AACH,qDAFU,WAAW,CA0BlB;4BA1JyB,gCAAgC"}
|
|
@@ -25,6 +25,7 @@ import { ShaderDescriptor } from "../../../shader/ShaderDescriptor.js";
|
|
|
25
25
|
import { STBN_VEC2_RESOURCE } from "../../../STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js";
|
|
26
26
|
import { SAMPLER_LINEAR_UPSCALE } from "../../../texture/SAMPLER_LINEAR_UPSCALE.js";
|
|
27
27
|
import { VIEW_UNIFORM_STRUCT } from "../../../view/VIEW_UNIFORM_STRUCT.js";
|
|
28
|
+
import { chunk_probe_clipmap_indirect_lobe } from "./chunk_probe_clipmap_indirect_lobe.js";
|
|
28
29
|
import { chunk_probe_clipmap_pick, PROBE_CLIPMAP_SAMPLING_GROUP } from "./chunk_probe_clipmap_pick.js";
|
|
29
30
|
import { chunk_probe_clipmap_sample_radiance } from "./chunk_probe_clipmap_sample_radiance.js";
|
|
30
31
|
|
|
@@ -113,7 +114,7 @@ fn main(
|
|
|
113
114
|
let spec_direction = normalize(mix(reflect(-view_direction, normal), normal, alpha));
|
|
114
115
|
let specular_occlusion = compute_specular_occlusion_bn(spec_direction, bent_normal, occlusion, roughness);
|
|
115
116
|
|
|
116
|
-
return vec4(indirect[0] * specular_occlusion
|
|
117
|
+
return vec4(probe_clipmap_indirect_lobe(indirect[0] * specular_occlusion, indirect[1], radiance, irradiance), 1.0);
|
|
117
118
|
}
|
|
118
119
|
`, [
|
|
119
120
|
chunk_project_position_from_depth,
|
|
@@ -131,6 +132,7 @@ fn main(
|
|
|
131
132
|
chunk_get_ibl_radiance,
|
|
132
133
|
chunk_compute_indirect_specular,
|
|
133
134
|
chunk_compute_specular_occlusion_bn,
|
|
135
|
+
chunk_probe_clipmap_indirect_lobe,
|
|
134
136
|
]);
|
|
135
137
|
|
|
136
138
|
/**
|
|
@@ -142,6 +144,8 @@ fn main(
|
|
|
142
144
|
* - A pixel no probe weighs anything for takes the environment's for both.
|
|
143
145
|
* - The two are resolved as `shader_resolve_indirect_lighting` resolves the IBL pair: AO multiplies the
|
|
144
146
|
* diffuse, the specular is occluded along its lobe, and the result is added to the scene's colour.
|
|
147
|
+
* - `PROBE_CLIPMAP_INDIRECT_LOBE` decides what is added: both lobes by default; for the mode's indirect debug
|
|
148
|
+
* views, one lobe's light alone, as sampled, before the surface's material and occlusion.
|
|
145
149
|
*
|
|
146
150
|
* @type {ImageShader}
|
|
147
151
|
*/
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The light a front-face hit takes from the local lights (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7): a
|
|
3
3
|
* thread a ray, after shade through the same launch, `PROBE_DISPATCH_RAYS`, its probe the one trace wrote
|
|
4
4
|
* into its flags. It adds ρ_d·E_loc/π to the radiance shade left, ρ_d being the albedo shade left in the
|
|
5
|
-
* ray's \`
|
|
5
|
+
* ray's \`albedo\`; the next bounce, E_ind, is the bounce pass's, after it (`shader_probe_clipmap_bounce`).
|
|
6
6
|
*
|
|
7
7
|
* - **E_loc, the local lights**: one of the point and spot lights of the hit's cell of the world light
|
|
8
8
|
* clusters, built over the bricks' cascades so that every hit has one, at most
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js
CHANGED
|
@@ -71,7 +71,7 @@ resources.createGroup()
|
|
|
71
71
|
* The light a front-face hit takes from the local lights (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7): a
|
|
72
72
|
* thread a ray, after shade through the same launch, `PROBE_DISPATCH_RAYS`, its probe the one trace wrote
|
|
73
73
|
* into its flags. It adds ρ_d·E_loc/π to the radiance shade left, ρ_d being the albedo shade left in the
|
|
74
|
-
* ray's \`
|
|
74
|
+
* ray's \`albedo\`; the next bounce, E_ind, is the bounce pass's, after it (`shader_probe_clipmap_bounce`).
|
|
75
75
|
*
|
|
76
76
|
* - **E_loc, the local lights**: one of the point and spot lights of the hit's cell of the world light
|
|
77
77
|
* clusters, built over the bricks' cascades so that every hit has one, at most
|
|
@@ -216,7 +216,7 @@ fn main(
|
|
|
216
216
|
) {
|
|
217
217
|
let ray = folded_workgroup_index(workgroup_id) * PROBE_THREAD_WORKGROUP_SIZE + lane;
|
|
218
218
|
let record = probe_rays[ray];
|
|
219
|
-
let albedo = unpack4x8unorm(record.
|
|
219
|
+
let albedo = unpack4x8unorm(record.albedo).rgb;
|
|
220
220
|
let front_hit = (record.flags & PROBE_RAY_KIND_MASK) == ${BRICK_TRACE_HIT}u && (record.flags & PROBE_RAY_BACK_FACE) == 0u;
|
|
221
221
|
|
|
222
222
|
// only a front-face hit that bounces anything takes more light
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts
CHANGED
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
* 4πm²·(1 − (1 − e^(−k))/k), k = 2/m²: m = 1/n_r to 0.2% at n_r = 16, so the roughness is 1/√n_r. A sun
|
|
11
11
|
* a few texels wide at level 0 is then a lobe a texel wide, which a texel's jittered rays all see,
|
|
12
12
|
* rather than a point that only some probes' jitter ever lands on;
|
|
13
|
-
* - a **front-face hit** is `emissive + ρ_d·E_dir/π` (D7), its surface from
|
|
14
|
-
* at the hit's position, the probe's origin plus t along the ray,
|
|
15
|
-
*
|
|
13
|
+
* - a **front-face hit** is `emissive + ρ_d·E_dir/π` (D7), its surface from
|
|
14
|
+
* `probe_clipmap_hit_material_pick` at the hit's position, the probe's origin plus t along the ray,
|
|
15
|
+
* with the hit's normal, in its cascade: one texel of the brick material there, drawn from the ray's
|
|
16
|
+
* slot and direction, fresh every update and apart from the light pass's draws, in proportion to its
|
|
17
|
+
* weight in the texels' blend, which the probe's blend of its rays so takes on average; E_dir is what
|
|
18
|
+
* trace left in the light;
|
|
16
19
|
* - an **unresolved** ray and a **back face** bring nothing back: accumulation discards the one and
|
|
17
20
|
* counts the other (§8.4, §8.8).
|
|
18
21
|
*
|
|
19
|
-
* A front-face hit's diffuse albedo goes
|
|
22
|
+
* A front-face hit's diffuse albedo goes into its `albedo`, `pack4x8unorm`, and every other ray's to
|
|
20
23
|
* zero: the light pass adds ρ_d·(E_loc + E_ind)/π after it (S5).
|
|
21
24
|
*
|
|
22
25
|
* @type {ComputeShader}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_shade.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_shade.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js"],"names":[],"mappings":"AAqDA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,yCAFU,aAAa,CA4DpB;8BA7H2B,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MESH_CARD_ALBEDO_RESOURCE,
|
|
3
|
-
MESH_CARD_EMISSIVE_RESOURCE,
|
|
4
|
-
MESH_CARD_ROWS_RESOURCE,
|
|
5
|
-
MESH_CARD_SETS_RESOURCE
|
|
6
|
-
} from "../../../geometry/sdf/cards/MESH_CARD_RESOURCES.js";
|
|
7
|
-
import { MESH_SDF_BRICK_VOXELS } from "../../../geometry/sdf/MESH_SDF.js";
|
|
8
|
-
import { MESH_SDF_HEADERS_RESOURCE, MESH_SDF_INDIRECTION_RESOURCE } from "../../../geometry/sdf/MESH_SDF_RESOURCES.js";
|
|
9
1
|
import { ENVIRONMENT_MAP_SAMPLER_RESOURCE } from "../../../light/environment/ENVIRONMENT_MAP_SAMPLER_RESOURCE.js";
|
|
10
|
-
import { SCENE_DATABASE_RESOURCE } from "../../../scene/SCENE_DATABASE_RESOURCE.js";
|
|
11
2
|
import { chunk_rgbe9995_decode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.js";
|
|
12
3
|
import { chunk_rgbe9995_encode } from "../../../shader/chunk/color/rgbe9995/chunk_rgbe9995_encode.js";
|
|
13
4
|
import {
|
|
@@ -15,12 +6,20 @@ import {
|
|
|
15
6
|
} from "../../../shader/chunk/geometry/octahedron/chunk_uv_octahedral_unit_decode.js";
|
|
16
7
|
import { chunk_folded_workgroup_index } from "../../../shader/chunk/grid/chunk_folded_workgroup_index.js";
|
|
17
8
|
import { RECIPROCAL_PI_DECLARATION } from "../../../shader/chunk/math/RECIPROCAL_PI_DECLARATION.js";
|
|
9
|
+
import { chunk_hash_to_float01 } from "../../../shader/chunk/random/chunk_hash_to_float01.js";
|
|
10
|
+
import { chunk_pcg4d } from "../../../shader/chunk/random/pcg/chunk_pcg4d.js";
|
|
18
11
|
import { chunk_sample_environment_map } from "../../../shader/chunk/texture/sample/chunk_sample_environment_map.js";
|
|
19
12
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
20
13
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
21
14
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
22
15
|
import { BRICK_TRACE_HIT, BRICK_TRACE_MISS } from "../brick/BRICK_CLIPMAP.js";
|
|
23
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
BRICK_ATLAS_TEXTURE_RESOURCE,
|
|
18
|
+
BRICK_LEVELS_RESOURCE,
|
|
19
|
+
BRICK_MAP_TEXTURE_RESOURCE,
|
|
20
|
+
BRICK_SAMPLER_RESOURCE
|
|
21
|
+
} from "../brick/chunk_brick_clipmap_trace.js";
|
|
22
|
+
import { BRICK_MATERIAL_ALBEDO_RESOURCE, BRICK_MATERIAL_EMISSIVE_RESOURCE } from "../material/chunk_brick_material.js";
|
|
24
23
|
import {
|
|
25
24
|
chunk_probe_clipmap,
|
|
26
25
|
chunk_probe_clipmap_ray_origin,
|
|
@@ -28,7 +27,7 @@ import {
|
|
|
28
27
|
PROBE_RAYS_WRITE_RESOURCE,
|
|
29
28
|
PROBE_TRACE_READ_RESOURCE
|
|
30
29
|
} from "./chunk_probe_clipmap.js";
|
|
31
|
-
import {
|
|
30
|
+
import { chunk_probe_clipmap_hit_material_pick } from "./chunk_probe_clipmap_hit_material.js";
|
|
32
31
|
import { PROBE_THREAD_WORKGROUP_SIZE } from "./PROBE_CLIPMAP.js";
|
|
33
32
|
import { PROBE_TRACE_SETTINGS } from "./shader_probe_clipmap_trace.js";
|
|
34
33
|
|
|
@@ -44,14 +43,13 @@ resources.createGroup()
|
|
|
44
43
|
.addTexture("tEnvironment", "float", "2d")
|
|
45
44
|
.add(ENVIRONMENT_MAP_SAMPLER_RESOURCE);
|
|
46
45
|
|
|
46
|
+
// what the brick material's read takes
|
|
47
47
|
resources.createGroup()
|
|
48
|
-
.add(
|
|
49
|
-
.add(
|
|
50
|
-
.add(
|
|
51
|
-
.add(
|
|
52
|
-
.add(
|
|
53
|
-
.add(MESH_CARD_ALBEDO_RESOURCE)
|
|
54
|
-
.add(MESH_CARD_EMISSIVE_RESOURCE);
|
|
48
|
+
.add(BRICK_MAP_TEXTURE_RESOURCE)
|
|
49
|
+
.add(BRICK_ATLAS_TEXTURE_RESOURCE)
|
|
50
|
+
.add(BRICK_SAMPLER_RESOURCE)
|
|
51
|
+
.add(BRICK_MATERIAL_ALBEDO_RESOURCE)
|
|
52
|
+
.add(BRICK_MATERIAL_EMISSIVE_RESOURCE);
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* Shade (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.7): a thread a ray of the frame's updates, dispatched
|
|
@@ -65,13 +63,16 @@ resources.createGroup()
|
|
|
65
63
|
* 4πm²·(1 − (1 − e^(−k))/k), k = 2/m²: m = 1/n_r to 0.2% at n_r = 16, so the roughness is 1/√n_r. A sun
|
|
66
64
|
* a few texels wide at level 0 is then a lobe a texel wide, which a texel's jittered rays all see,
|
|
67
65
|
* rather than a point that only some probes' jitter ever lands on;
|
|
68
|
-
* - a **front-face hit** is `emissive + ρ_d·E_dir/π` (D7), its surface from
|
|
69
|
-
* at the hit's position, the probe's origin plus t along the ray,
|
|
70
|
-
*
|
|
66
|
+
* - a **front-face hit** is `emissive + ρ_d·E_dir/π` (D7), its surface from
|
|
67
|
+
* `probe_clipmap_hit_material_pick` at the hit's position, the probe's origin plus t along the ray,
|
|
68
|
+
* with the hit's normal, in its cascade: one texel of the brick material there, drawn from the ray's
|
|
69
|
+
* slot and direction, fresh every update and apart from the light pass's draws, in proportion to its
|
|
70
|
+
* weight in the texels' blend, which the probe's blend of its rays so takes on average; E_dir is what
|
|
71
|
+
* trace left in the light;
|
|
71
72
|
* - an **unresolved** ray and a **back face** bring nothing back: accumulation discards the one and
|
|
72
73
|
* counts the other (§8.4, §8.8).
|
|
73
74
|
*
|
|
74
|
-
* A front-face hit's diffuse albedo goes
|
|
75
|
+
* A front-face hit's diffuse albedo goes into its `albedo`, `pack4x8unorm`, and every other ray's to
|
|
75
76
|
* zero: the light pass adds ρ_d·(E_loc + E_ind)/π after it (S5).
|
|
76
77
|
*
|
|
77
78
|
* @type {ComputeShader}
|
|
@@ -106,9 +107,10 @@ fn main(
|
|
|
106
107
|
let origin = probe_clipmap_ray_origin(probe_origins[k], probe_trace.elements[k], record.direction);
|
|
107
108
|
let position = origin + record.t * direction;
|
|
108
109
|
let normal = uv_octahedral_unit_decode(unpack2x16unorm(record.normal));
|
|
109
|
-
let
|
|
110
|
+
let cascade = (record.flags >> PROBE_RAY_CASCADE_SHIFT) & PROBE_RAY_CASCADE_MASK;
|
|
110
111
|
|
|
111
|
-
let
|
|
112
|
+
let draw = hash_to_float01(pcg4d(vec4<u32>(probe_trace.elements[k], record.direction, 0x510E527Fu, 0u)).x);
|
|
113
|
+
let surface = probe_clipmap_hit_material_pick(position, normal, cascade, draw);
|
|
112
114
|
let direct = rgbe9995_decode(record.light);
|
|
113
115
|
|
|
114
116
|
radiance = surface.emissive + surface.albedo * direct * RECIPROCAL_PI;
|
|
@@ -118,7 +120,7 @@ fn main(
|
|
|
118
120
|
// held to RGB9E5's largest value, which the half-float atlas also holds: an infinity there times a
|
|
119
121
|
// zero weight would be a NaN in every sum it reaches
|
|
120
122
|
probe_rays[ray].light = rgbe9995_encode(radiance);
|
|
121
|
-
probe_rays[ray].
|
|
123
|
+
probe_rays[ray].albedo = pack4x8unorm(vec4<f32>(albedo, 0.0));
|
|
122
124
|
}
|
|
123
125
|
`, [
|
|
124
126
|
chunk_probe_clipmap,
|
|
@@ -126,7 +128,9 @@ fn main(
|
|
|
126
128
|
chunk_folded_workgroup_index,
|
|
127
129
|
chunk_uv_octahedral_unit_decode,
|
|
128
130
|
chunk_sample_environment_map,
|
|
129
|
-
|
|
131
|
+
chunk_probe_clipmap_hit_material_pick,
|
|
132
|
+
chunk_pcg4d,
|
|
133
|
+
chunk_hash_to_float01,
|
|
130
134
|
chunk_rgbe9995_decode,
|
|
131
135
|
chunk_rgbe9995_encode,
|
|
132
136
|
RECIPROCAL_PI_DECLARATION,
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts
CHANGED
|
@@ -12,9 +12,10 @@ export const PROBE_TRACE_SETTINGS: WebGPUStruct;
|
|
|
12
12
|
* or a spread subset below R = n_r². On a guided one, the walk position whose rays the ray is among
|
|
13
13
|
* in the probe's guide (`chunk_probe_clipmap_guide`), found by bisecting the first rays. A texel's rays
|
|
14
14
|
* then follow one another, in the walk's order.
|
|
15
|
-
* - **Direction**: the texel's octahedral square, jittered by
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* - **Direction**: the texel's octahedral square, jittered by a point of one of the texel's Sobol sequences
|
|
16
|
+
* (`probe_clipmap_ray_jitter`): the sequence of the ray's round among the texel's rays and of the kind of
|
|
17
|
+
* update, at the count of the probe's earlier updates of that kind (`probe_clipmap_ray_visit`). A texel's
|
|
18
|
+
* rays of a round and kind are stratified inside it over the updates of that kind it takes them on.
|
|
18
19
|
* - **Origin**: a point of a small ball around the probe where relocation left it, `probe_origins`, one a
|
|
19
20
|
* ray (`probe_clipmap_ray_origin`); t_min one voxel of the brick cascade there.
|
|
20
21
|
* - **Direct light**: a hit off a front face takes E_dir = Σ colour·max(0, n·l)·visibility over the
|
|
@@ -28,8 +29,8 @@ export const PROBE_TRACE_SETTINGS: WebGPUStruct;
|
|
|
28
29
|
* surface turned from a light traces no ray toward it, since the light gives it nothing.
|
|
29
30
|
* - **Back face**: a hit whose field's gradient is along the ray, so it came from inside a solid.
|
|
30
31
|
*
|
|
31
|
-
* Writes the ray's `PROBE_RAY_STRUCT`, with
|
|
32
|
-
*
|
|
32
|
+
* Writes the ray's `PROBE_RAY_STRUCT`, with E_dir as its light, which shade turns into the ray's
|
|
33
|
+
* radiance, and its probe's place in the list in its flags.
|
|
33
34
|
*
|
|
34
35
|
* @type {ComputeShader}
|
|
35
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_trace.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js"],"names":[],"mappings":"AAkDA;;GAEG;AACH,mCAFU,YAAY,CAeG;AAsBzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,yCAFU,aAAa,CAuJpB;6BAvP0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js
CHANGED
|
@@ -25,18 +25,17 @@ import {
|
|
|
25
25
|
BRICK_ATLAS_TEXTURE_RESOURCE,
|
|
26
26
|
BRICK_LEVELS_RESOURCE,
|
|
27
27
|
BRICK_MAP_TEXTURE_RESOURCE,
|
|
28
|
-
BRICK_OBJECTS_RESOURCE,
|
|
29
28
|
BRICK_OCCUPANCY_TEXTURE_RESOURCE,
|
|
30
29
|
BRICK_SAMPLER_RESOURCE,
|
|
31
|
-
chunk_brick_clipmap_object,
|
|
32
30
|
chunk_brick_clipmap_trace
|
|
33
31
|
} from "../brick/chunk_brick_clipmap_trace.js";
|
|
34
32
|
import {
|
|
35
33
|
chunk_probe_clipmap,
|
|
36
34
|
chunk_probe_clipmap_guide,
|
|
37
35
|
chunk_probe_clipmap_ray_layout,
|
|
38
|
-
|
|
36
|
+
chunk_probe_clipmap_ray_jitter,
|
|
39
37
|
chunk_probe_clipmap_ray_origin,
|
|
38
|
+
chunk_probe_clipmap_ray_visit,
|
|
40
39
|
chunk_probe_clipmap_ray_texel,
|
|
41
40
|
PROBE_GUIDE_READ_RESOURCE,
|
|
42
41
|
PROBE_ORIGINS_READ_RESOURCE,
|
|
@@ -85,8 +84,7 @@ resources.createGroup()
|
|
|
85
84
|
.add(BRICK_MAP_TEXTURE_RESOURCE)
|
|
86
85
|
.add(BRICK_OCCUPANCY_TEXTURE_RESOURCE)
|
|
87
86
|
.add(BRICK_ATLAS_TEXTURE_RESOURCE)
|
|
88
|
-
.add(BRICK_SAMPLER_RESOURCE)
|
|
89
|
-
.add(BRICK_OBJECTS_RESOURCE);
|
|
87
|
+
.add(BRICK_SAMPLER_RESOURCE);
|
|
90
88
|
|
|
91
89
|
/**
|
|
92
90
|
* Trace (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8.6): a thread a ray of the frame's updates, dispatched
|
|
@@ -98,9 +96,10 @@ resources.createGroup()
|
|
|
98
96
|
* or a spread subset below R = n_r². On a guided one, the walk position whose rays the ray is among
|
|
99
97
|
* in the probe's guide (`chunk_probe_clipmap_guide`), found by bisecting the first rays. A texel's rays
|
|
100
98
|
* then follow one another, in the walk's order.
|
|
101
|
-
* - **Direction**: the texel's octahedral square, jittered by
|
|
102
|
-
*
|
|
103
|
-
*
|
|
99
|
+
* - **Direction**: the texel's octahedral square, jittered by a point of one of the texel's Sobol sequences
|
|
100
|
+
* (`probe_clipmap_ray_jitter`): the sequence of the ray's round among the texel's rays and of the kind of
|
|
101
|
+
* update, at the count of the probe's earlier updates of that kind (`probe_clipmap_ray_visit`). A texel's
|
|
102
|
+
* rays of a round and kind are stratified inside it over the updates of that kind it takes them on.
|
|
104
103
|
* - **Origin**: a point of a small ball around the probe where relocation left it, `probe_origins`, one a
|
|
105
104
|
* ray (`probe_clipmap_ray_origin`); t_min one voxel of the brick cascade there.
|
|
106
105
|
* - **Direct light**: a hit off a front face takes E_dir = Σ colour·max(0, n·l)·visibility over the
|
|
@@ -114,8 +113,8 @@ resources.createGroup()
|
|
|
114
113
|
* surface turned from a light traces no ray toward it, since the light gives it nothing.
|
|
115
114
|
* - **Back face**: a hit whose field's gradient is along the ray, so it came from inside a solid.
|
|
116
115
|
*
|
|
117
|
-
* Writes the ray's `PROBE_RAY_STRUCT`, with
|
|
118
|
-
*
|
|
116
|
+
* Writes the ray's `PROBE_RAY_STRUCT`, with E_dir as its light, which shade turns into the ray's
|
|
117
|
+
* radiance, and its probe's place in the list in its flags.
|
|
119
118
|
*
|
|
120
119
|
* @type {ComputeShader}
|
|
121
120
|
*/
|
|
@@ -154,7 +153,7 @@ fn main(
|
|
|
154
153
|
let k = probe_clipmap_ray_probe(ray);
|
|
155
154
|
|
|
156
155
|
if (k >= probe_ray_sums.count) {
|
|
157
|
-
probe_rays[ray].
|
|
156
|
+
probe_rays[ray].albedo = 0u;
|
|
158
157
|
probe_rays[ray].flags = PROBE_RAY_NONE;
|
|
159
158
|
|
|
160
159
|
return;
|
|
@@ -173,16 +172,23 @@ fn main(
|
|
|
173
172
|
let updates = probe_state_updates(state.x);
|
|
174
173
|
|
|
175
174
|
var texel: u32;
|
|
175
|
+
// the ray's place among its texel's rays in the update, as accumulation counts them
|
|
176
|
+
var round: u32;
|
|
176
177
|
|
|
177
178
|
if (probe_clipmap_guided(state.x, settings.uniform_period, settings.rays_per_probe, texels)) {
|
|
178
179
|
let base = k * probe_clipmap_guide_words(n);
|
|
180
|
+
let position = probe_trace_guided_position(base, i, texels);
|
|
179
181
|
|
|
180
|
-
texel = probe_clipmap_guide_texel(
|
|
182
|
+
texel = probe_clipmap_guide_texel(position, updates, n);
|
|
183
|
+
round = i - probe_guide[base + position];
|
|
181
184
|
} else {
|
|
182
185
|
texel = probe_clipmap_ray_texel(i, updates, rays, texels);
|
|
186
|
+
// every texel once, then again: below R = n_r² the update's rays are all its first
|
|
187
|
+
round = i / texels;
|
|
183
188
|
}
|
|
184
189
|
|
|
185
|
-
let
|
|
190
|
+
let visit = probe_clipmap_ray_visit(state.x, round, rays, texels, settings.uniform_period, settings.rays_per_probe);
|
|
191
|
+
let jitter = probe_clipmap_ray_jitter(slot, texel, visit.x, visit.y);
|
|
186
192
|
let direction = uv_octahedral_unit_decode((vec2<f32>(f32(texel % n), f32(texel / n)) + jitter) / f32(n));
|
|
187
193
|
let packed = pack2x16unorm(uv_octahedral_unit_encode(direction));
|
|
188
194
|
|
|
@@ -238,7 +244,7 @@ fn main(
|
|
|
238
244
|
probe_rays[ray].t = hit.t;
|
|
239
245
|
probe_rays[ray].direction = packed;
|
|
240
246
|
probe_rays[ray].normal = select(0u, pack2x16unorm(uv_octahedral_unit_encode(hit.normal)), is_hit);
|
|
241
|
-
probe_rays[ray].
|
|
247
|
+
probe_rays[ray].albedo = 0u;
|
|
242
248
|
probe_rays[ray].flags = hit.kind | select(0u, PROBE_RAY_BACK_FACE, back_face) | (select(0u, hit.cascade, is_hit) << PROBE_RAY_CASCADE_SHIFT) | (k << PROBE_RAY_PROBE_SHIFT);
|
|
243
249
|
probe_rays[ray].light = rgbe9995_encode(direct);
|
|
244
250
|
}
|
|
@@ -246,14 +252,14 @@ fn main(
|
|
|
246
252
|
chunk_probe_clipmap,
|
|
247
253
|
chunk_probe_clipmap_ray_layout,
|
|
248
254
|
chunk_probe_clipmap_ray_texel,
|
|
249
|
-
|
|
255
|
+
chunk_probe_clipmap_ray_jitter,
|
|
256
|
+
chunk_probe_clipmap_ray_visit,
|
|
250
257
|
chunk_probe_clipmap_ray_origin,
|
|
251
258
|
chunk_probe_clipmap_guide,
|
|
252
259
|
chunk_folded_workgroup_index,
|
|
253
260
|
chunk_uv_octahedral_unit_decode,
|
|
254
261
|
chunk_uv_octahedral_unit_encode,
|
|
255
262
|
chunk_brick_clipmap_trace,
|
|
256
|
-
chunk_brick_clipmap_object,
|
|
257
263
|
chunk_cone_sample_direction,
|
|
258
264
|
chunk_pcg3d,
|
|
259
265
|
chunk_hash_to_float01,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_probe_clipmap_want.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js"],"names":[],"mappings":"AAqBA;;GAEG;AACH,kCAFU,YAAY,
|
|
1
|
+
{"version":3,"file":"shader_probe_clipmap_want.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js"],"names":[],"mappings":"AAqBA;;GAEG;AACH,kCAFU,YAAY,CAcE;AAexB;;;;;;;;;;;;;GAaG;AACH,wCAFU,aAAa,CAqCpB;6BA1F0B,sCAAsC;8BAHrC,kCAAkC"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want.js
CHANGED
|
@@ -7,7 +7,7 @@ import { chunk_stbn_sample_vec2 } from "../../../shader/chunk/noise/chunk_stbn_s
|
|
|
7
7
|
import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
|
|
8
8
|
import { ComputeShader } from "../../../shader/ComputeShader.js";
|
|
9
9
|
import { ShaderResourceSetDescriptor } from "../../../shader/resource/ShaderResourceSetDescriptor.js";
|
|
10
|
-
import { u32 } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
10
|
+
import { f32, u32, vec3f } from "../../../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
11
11
|
import { WebGPUStruct } from "../../../shader/type/WebGPUStruct.js";
|
|
12
12
|
import { STBN_VEC2_RESOURCE } from "../../../STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js";
|
|
13
13
|
import {
|
|
@@ -30,6 +30,10 @@ export const PROBE_WANT_SETTINGS = WebGPUStruct.from({
|
|
|
30
30
|
frame: u32,
|
|
31
31
|
/** what the wanted list holds at most: every key, or fewer where the wants cannot want more */
|
|
32
32
|
wanted_capacity: u32,
|
|
33
|
+
/** where the windows were placed around, world metres: the selection boxes' centre, as the pick reads it */
|
|
34
|
+
anchor: vec3f,
|
|
35
|
+
/** a selection box's half side, in its cascade's cells, as the pick reads it */
|
|
36
|
+
select_half: f32,
|
|
33
37
|
}, "ProbeWantSettings");
|
|
34
38
|
|
|
35
39
|
const resources = new ShaderResourceSetDescriptor();
|
|
@@ -83,7 +87,7 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) {
|
|
|
83
87
|
let view_direction = normalize(mat4_extract_position(camera.transform) - position);
|
|
84
88
|
let bias_direction = mix(normal, view_direction, ${PROBE_RECEIVER_BIAS_VIEW});
|
|
85
89
|
|
|
86
|
-
probe_clipmap_want(on_screen && !is_background(depth), position, bias_direction, settings.cascade_count, settings.resolution, settings.wanted_capacity);
|
|
90
|
+
probe_clipmap_want(on_screen && !is_background(depth), position, bias_direction, settings.cascade_count, settings.resolution, settings.anchor, settings.select_half, settings.wanted_capacity);
|
|
87
91
|
}
|
|
88
92
|
`, [
|
|
89
93
|
chunk_probe_clipmap,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* `PROBE_DISPATCH_RAYS` of that clipmap, before its frame's lifetime writes them over. The points go on this
|
|
5
5
|
* clipmap's wanted list, through its levels.
|
|
6
6
|
*
|
|
7
|
-
* A front-face hit whose `
|
|
8
|
-
* the bounce pass clears the
|
|
7
|
+
* A front-face hit whose `albedo` the light passes left non-zero wants the cages its pick reads in this clipmap:
|
|
8
|
+
* the bounce pass clears the albedo of a hit whose first set held probes, so a hit wants only where that set
|
|
9
9
|
* had none, and this clipmap's probes are its fallback (`shader_probe_clipmap_bounce`). So a probe a hit needs
|
|
10
10
|
* is admitted where the first set has none, and kept while hits read it. Until its first update a NEW probe
|
|
11
11
|
* weighs nothing and the hit takes no bounce: light is lost for a frame or two, never invented.
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js
CHANGED
|
@@ -37,8 +37,8 @@ resources.createGroup()
|
|
|
37
37
|
* `PROBE_DISPATCH_RAYS` of that clipmap, before its frame's lifetime writes them over. The points go on this
|
|
38
38
|
* clipmap's wanted list, through its levels.
|
|
39
39
|
*
|
|
40
|
-
* A front-face hit whose `
|
|
41
|
-
* the bounce pass clears the
|
|
40
|
+
* A front-face hit whose `albedo` the light passes left non-zero wants the cages its pick reads in this clipmap:
|
|
41
|
+
* the bounce pass clears the albedo of a hit whose first set held probes, so a hit wants only where that set
|
|
42
42
|
* had none, and this clipmap's probes are its fallback (`shader_probe_clipmap_bounce`). So a probe a hit needs
|
|
43
43
|
* is admitted where the first set has none, and kept while hits read it. Until its first update a NEW probe
|
|
44
44
|
* weighs nothing and the hit takes no bounce: light is lost for a frame or two, never invented.
|
|
@@ -75,10 +75,10 @@ fn main(
|
|
|
75
75
|
let k = record.flags >> PROBE_RAY_PROBE_SHIFT;
|
|
76
76
|
let slot = probe_trace.elements[k];
|
|
77
77
|
|
|
78
|
-
// shade left a front-face hit's albedo
|
|
79
|
-
//
|
|
78
|
+
// shade left a front-face hit's albedo and zero in any other ray's, and the bounce pass cleared the
|
|
79
|
+
// albedo of a hit its first set served: a ray that takes no bounce, a black hit's among them,
|
|
80
80
|
// or that had its probes, wants nothing
|
|
81
|
-
wants = record.
|
|
81
|
+
wants = record.albedo != 0u;
|
|
82
82
|
|
|
83
83
|
let direction = uv_octahedral_unit_decode(unpack2x16unorm(record.direction));
|
|
84
84
|
let normal = uv_octahedral_unit_decode(unpack2x16unorm(record.normal));
|
|
@@ -88,7 +88,7 @@ fn main(
|
|
|
88
88
|
bias_direction = mix(normal, -direction, ${PROBE_RECEIVER_BIAS_VIEW});
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
probe_clipmap_want(wants, position, bias_direction, settings.cascade_count, settings.resolution, settings.wanted_capacity);
|
|
91
|
+
probe_clipmap_want(wants, position, bias_direction, settings.cascade_count, settings.resolution, settings.anchor, settings.select_half, settings.wanted_capacity);
|
|
92
92
|
}
|
|
93
93
|
`, [
|
|
94
94
|
chunk_probe_clipmap,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The step of a hash table's probe sequence: `(5 index + 1) mod 2^K`, which visits every record of a
|
|
3
|
+
* table of 2^K records once before it repeats. The WGSL twin of
|
|
4
|
+
* `core/collection/map/generate_next_linear_congruential_index.js`.
|
|
5
|
+
*
|
|
6
|
+
* ```wgsl
|
|
7
|
+
* fn generate_next_linear_congruential_index(index: u32, mask: u32) -> u32 // mask: 2^K - 1
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @type {CodeChunk}
|
|
11
|
+
*/
|
|
12
|
+
export const chunk_generate_next_linear_congruential_index: CodeChunk;
|
|
13
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
14
|
+
//# sourceMappingURL=chunk_generate_next_linear_congruential_index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_generate_next_linear_congruential_index.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,4DAFU,SAAS,CAUhB;0BArBuB,oCAAoC"}
|
package/src/shade/renderer/gpu_primitive/hash_table/chunk_generate_next_linear_congruential_index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The step of a hash table's probe sequence: `(5 index + 1) mod 2^K`, which visits every record of a
|
|
5
|
+
* table of 2^K records once before it repeats. The WGSL twin of
|
|
6
|
+
* `core/collection/map/generate_next_linear_congruential_index.js`.
|
|
7
|
+
*
|
|
8
|
+
* ```wgsl
|
|
9
|
+
* fn generate_next_linear_congruential_index(index: u32, mask: u32) -> u32 // mask: 2^K - 1
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @type {CodeChunk}
|
|
13
|
+
*/
|
|
14
|
+
export const chunk_generate_next_linear_congruential_index = CodeChunk.from(
|
|
15
|
+
//language=WGSL
|
|
16
|
+
`
|
|
17
|
+
fn generate_next_linear_congruential_index(index: u32, mask: u32) -> u32 {
|
|
18
|
+
let index5 = index * 5u;
|
|
19
|
+
|
|
20
|
+
return (index5 + 1u) & mask;
|
|
21
|
+
}
|
|
22
|
+
`);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The encoded key of a record removed from a table the device keeps ({@link chunk_hash_table_atomic}):
|
|
3
|
+
* a probe passes over it as over another key's record, and an insert may take its place. No key
|
|
4
|
+
* encodes to it, keys staying below `0xFFFFFFFE`.
|
|
5
|
+
* @type {number}
|
|
6
|
+
*/
|
|
7
|
+
export const HASH_TABLE_REMOVED: number;
|
|
8
|
+
/**
|
|
9
|
+
* The table `cpu_build_hash_table` lays out (`[element_count, table_size]`, then `table_size` records
|
|
10
|
+
* of `(key + 1, value)`, an empty record 0) kept on the device: inserted into and removed from by
|
|
11
|
+
* atomics, on `hash_table_get`'s probe sequence and limit. A key may hold several records, which find
|
|
12
|
+
* visits in turn; the caller tells them apart by what their values name. `element_count` counts the
|
|
13
|
+
* records held.
|
|
14
|
+
*
|
|
15
|
+
* ```wgsl
|
|
16
|
+
* fn hash_table_atomic_start(table, offset: u32, key: u32) -> vec2<u32> // a cursor at the key's first record
|
|
17
|
+
* fn hash_table_atomic_find(table, offset: u32, key: u32, cursor: ptr<function, vec2<u32>>) -> u32 // the key's next record, or HASH_TABLE_MISS
|
|
18
|
+
* fn hash_table_atomic_value(table, record: u32) -> u32
|
|
19
|
+
* fn hash_table_atomic_insert(table, offset: u32, key: u32, value: u32) -> bool // false: no record free within the probe limit
|
|
20
|
+
* fn hash_table_atomic_remove(table, offset: u32, record: u32)
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* `table` is a `ptr<storage, array<atomic<u32>>, read_write>`, and a record is named by the word it
|
|
24
|
+
* starts at. Insert claims the first empty or removed record of the key's sequence by
|
|
25
|
+
* compare-exchange on its key and stores the value after it, so a find racing that insert in one
|
|
26
|
+
* dispatch may read the value before it lands: a caller whose inserts share a dispatch with its finds
|
|
27
|
+
* checks what a value names before trusting it. Inserts and removes of different records may share a
|
|
28
|
+
* dispatch. A find ends at the sequence's first empty record or at the probe limit.
|
|
29
|
+
*
|
|
30
|
+
* A table holds at least `HASH_TABLE_PROBE_LIMIT` records, a power of two, so that the probes of a
|
|
31
|
+
* key's sequence meet no record twice.
|
|
32
|
+
*
|
|
33
|
+
* @type {CodeChunk}
|
|
34
|
+
*/
|
|
35
|
+
export const chunk_hash_table_atomic: CodeChunk;
|
|
36
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
37
|
+
//# sourceMappingURL=chunk_hash_table_atomic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_hash_table_atomic.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/hash_table/chunk_hash_table_atomic.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,iCAFU,MAAM,CAE6B;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,sCAFU,SAAS,CAmFZ;0BAxHmB,oCAAoC"}
|