@woosh/meep-engine 3.58.0 → 3.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor/particles/effect/ParticleEffectDocument.d.ts +162 -43
- package/editor/particles/effect/ParticleEffectDocument.d.ts.map +1 -1
- package/editor/particles/effect/ParticleEffectDocument.js +450 -43
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts +12 -3
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.js +78 -23
- package/editor/particles/effect/make_starter_particle_effect.js +17 -17
- package/editor/view/particles/effect/ParticleEmitterInspectorView.d.ts +3 -3
- package/editor/view/particles/effect/ParticleEmitterInspectorView.d.ts.map +1 -1
- package/editor/view/particles/effect/ParticleEmitterInspectorView.js +224 -67
- package/editor/view/particles/effect/ParticleGraphEditorView.d.ts.map +1 -1
- package/editor/view/particles/effect/ParticleGraphEditorView.js +44 -11
- package/editor/view/particles/effect/ParticleNodeParametersView.d.ts +2 -1
- package/editor/view/particles/effect/ParticleNodeParametersView.d.ts.map +1 -1
- package/editor/view/particles/effect/ParticleNodeParametersView.js +46 -16
- package/editor/view/particles/effect/ParticlePreviewView.js +2 -2
- package/editor/view/particles/effect/particle-editor.css +77 -68
- package/package.json +1 -1
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +2 -2
- package/src/engine/ecs/EntityManager.d.ts +29 -5
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +37 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +4 -0
- package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts +74 -17
- package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts.map +1 -1
- package/src/engine/graphics/ecs/particles/ParticleEffect.js +156 -25
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts +13 -3
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.js +59 -13
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts +3 -3
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.js +9 -9
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_2_3.d.ts +15 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_2_3.d.ts.map +1 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_2_3.js +78 -0
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +2 -0
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.js +2 -0
- package/src/engine/graphics/ecs/trail3d/seed_trail_stroke.js +1 -1
- package/src/engine/graphics/ecs/trail3d/seed_trail_tube.js +1 -1
- package/src/engine/graphics/trail/tube/TubeX.d.ts +5 -3
- package/src/engine/graphics/trail/tube/TubeX.d.ts.map +1 -1
- package/src/engine/graphics/trail/tube/TubeX.js +5 -3
- package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts +3 -2
- package/src/engine/graphics/trail/tube/tube_attributes_spec.d.ts.map +1 -1
- package/src/engine/graphics/trail/tube/tube_attributes_spec.js +9 -8
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +65 -4
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +1351 -904
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +1 -1
- package/src/engine/graphics3/trail/trail_tube_write_geometry.js +13 -13
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/generation/foliage/FOLIAGE_DESIGN.md +26 -5
- package/src/generation/foliage/LOD_REWORK_BRIEF_2026_10_27.md +35 -0
- package/src/generation/foliage/SELF_ORGANIZING_FRAMEWORK_BRIEF_2026_10_26.md +2 -1
- package/src/generation/foliage/TWO_FRONT_ENDS_BRIEF_2026_10_28.md +552 -0
- package/src/generation/foliage/analysis/tree_crown_opacity.d.ts.map +1 -1
- package/src/generation/foliage/analysis/tree_crown_opacity.js +2 -1
- package/src/generation/foliage/analysis/tree_render_cost.d.ts +5 -3
- package/src/generation/foliage/analysis/tree_render_cost.d.ts.map +1 -1
- package/src/generation/foliage/analysis/tree_render_cost.js +8 -7
- package/src/generation/foliage/asset/TreeAsset.d.ts +17 -0
- package/src/generation/foliage/asset/TreeAsset.d.ts.map +1 -1
- package/src/generation/foliage/asset/TreeAsset.js +20 -0
- package/src/generation/foliage/asset/TreeSpeciesCache.d.ts +69 -0
- package/src/generation/foliage/asset/TreeSpeciesCache.d.ts.map +1 -0
- package/src/generation/foliage/asset/TreeSpeciesCache.js +147 -0
- package/src/generation/foliage/asset/generate_tree.d.ts +10 -0
- package/src/generation/foliage/asset/generate_tree.d.ts.map +1 -1
- package/src/generation/foliage/asset/generate_tree.js +57 -29
- package/src/generation/foliage/asset/place_tree.d.ts +2 -1
- package/src/generation/foliage/asset/place_tree.d.ts.map +1 -1
- package/src/generation/foliage/asset/place_tree.js +2 -1
- package/src/generation/foliage/asset/tree_lod_plan.d.ts +4 -2
- package/src/generation/foliage/asset/tree_lod_plan.d.ts.map +1 -1
- package/src/generation/foliage/asset/tree_lod_plan.js +12 -14
- package/src/generation/foliage/asset/tree_shoot_instances.d.ts +119 -0
- package/src/generation/foliage/asset/tree_shoot_instances.d.ts.map +1 -0
- package/src/generation/foliage/asset/tree_shoot_instances.js +410 -0
- package/src/generation/foliage/asset/tree_shoot_prototypes.d.ts +155 -0
- package/src/generation/foliage/asset/tree_shoot_prototypes.d.ts.map +1 -0
- package/src/generation/foliage/asset/tree_shoot_prototypes.js +251 -0
- package/src/generation/foliage/config/TreeGrowth.d.ts +10 -0
- package/src/generation/foliage/config/TreeGrowth.d.ts.map +1 -0
- package/src/generation/foliage/config/TreeGrowth.js +18 -0
- package/src/generation/foliage/config/TreeLODConfig.d.ts +6 -0
- package/src/generation/foliage/config/TreeLODConfig.d.ts.map +1 -1
- package/src/generation/foliage/config/TreeLODConfig.js +7 -0
- package/src/generation/foliage/index.d.ts +3 -0
- package/src/generation/foliage/index.js +3 -0
- package/src/generation/foliage/material/foliage_tile.d.ts +6 -6
- package/src/generation/foliage/material/foliage_tile.js +3 -3
- package/src/generation/foliage/material/tree_cluster_atlas.d.ts +44 -0
- package/src/generation/foliage/material/tree_cluster_atlas.d.ts.map +1 -0
- package/src/generation/foliage/material/tree_cluster_atlas.js +37 -0
- package/src/generation/foliage/mesh/foliage_collect_attachments.js +2 -2
- package/src/generation/foliage/mesh/foliage_scale_spread.d.ts +14 -0
- package/src/generation/foliage/mesh/foliage_scale_spread.d.ts.map +1 -0
- package/src/generation/foliage/mesh/foliage_scale_spread.js +15 -0
- package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts +8 -7
- package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts.map +1 -1
- package/src/generation/foliage/mesh/tree_cluster_representatives.js +85 -40
- package/src/generation/foliage/mesh/tree_clusters.d.ts +26 -5
- package/src/generation/foliage/mesh/tree_clusters.d.ts.map +1 -1
- package/src/generation/foliage/mesh/tree_clusters.js +52 -39
- package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts.map +1 -1
- package/src/generation/foliage/mesh/tree_mesh_build_bark.js +32 -54
- package/src/generation/foliage/presets/make_tree_species_preset.d.ts +6 -1
- package/src/generation/foliage/presets/make_tree_species_preset.d.ts.map +1 -1
- package/src/generation/foliage/presets/make_tree_species_preset.js +157 -3
- package/src/generation/foliage/skeleton/TreeSkeleton.d.ts +19 -0
- package/src/generation/foliage/skeleton/TreeSkeleton.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/TreeSkeleton.js +41 -0
- package/src/generation/foliage/skeleton/tree_skeleton_compute_joint_mechanics.d.ts +5 -0
- package/src/generation/foliage/skeleton/tree_skeleton_compute_joint_mechanics.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/tree_skeleton_compute_joint_mechanics.js +8 -1
- package/src/generation/foliage/skeleton/tree_skeleton_copy_branches.d.ts +70 -0
- package/src/generation/foliage/skeleton/tree_skeleton_copy_branches.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_copy_branches.js +171 -0
- package/src/generation/foliage/skeleton/tree_skeleton_extend_branch.d.ts +17 -0
- package/src/generation/foliage/skeleton/tree_skeleton_extend_branch.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_extend_branch.js +79 -0
- package/src/generation/foliage/skeleton/tree_skeleton_fit_crown_frame.d.ts +12 -0
- package/src/generation/foliage/skeleton/tree_skeleton_fit_crown_frame.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_fit_crown_frame.js +56 -0
- package/src/generation/foliage/skeleton/tree_skeleton_floor_girth.d.ts +11 -0
- package/src/generation/foliage/skeleton/tree_skeleton_floor_girth.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_floor_girth.js +38 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow.d.ts +4 -11
- package/src/generation/foliage/skeleton/tree_skeleton_grow.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/tree_skeleton_grow.js +8 -2034
- package/src/generation/foliage/skeleton/tree_skeleton_grow_framework.d.ts +22 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow_framework.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow_framework.js +2050 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow_shoots.d.ts +10 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow_shoots.d.ts.map +1 -1
- package/src/generation/foliage/skeleton/tree_skeleton_grow_shoots.js +27 -56
- package/src/shade/descriptor/pipeline/render/DepthStencilState.d.ts +4 -0
- package/src/shade/descriptor/pipeline/render/DepthStencilState.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/DepthStencilState.js +170 -144
- package/src/shade/descriptor/pipeline/render/MultisampleState.d.ts +4 -0
- package/src/shade/descriptor/pipeline/render/MultisampleState.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/MultisampleState.js +78 -65
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/RenderPipelineDescriptor.js +176 -172
- package/src/shade/descriptor/pipeline/render/StencilFaceState.d.ts +4 -0
- package/src/shade/descriptor/pipeline/render/StencilFaceState.d.ts.map +1 -1
- package/src/shade/descriptor/pipeline/render/StencilFaceState.js +107 -88
- package/src/shade/playground/particle_ecs/README.md +9 -8
- package/src/shade/playground/particle_ecs/bonfire_editor.js +3 -3
- package/src/shade/playground/particle_ecs/bonfire_effects.d.ts +6 -6
- package/src/shade/playground/particle_ecs/bonfire_effects.js +6 -6
- package/src/shade/playground/particle_editor/README.md +14 -11
- package/src/shade/playground/particle_system/particle_prototype.js +18 -18
- package/src/shade/playground/particle_system/particle_scene.js +13 -13
- package/src/shade/playground/probe_clipmap/README.md +42 -0
- package/src/shade/playground/probe_clipmap/index.html +190 -0
- package/src/shade/playground/probe_clipmap/main.d.ts +8 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -0
- package/src/shade/playground/probe_clipmap/main.js +365 -0
- package/src/shade/renderer/Renderer.d.ts +3 -1
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +97 -43
- package/src/shade/renderer/extension/ViewTextures.d.ts +2 -1
- package/src/shade/renderer/extension/ViewTextures.d.ts.map +1 -1
- package/src/shade/renderer/extension/ViewTextures.js +2 -1
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- 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/runtime/GPUVirtualGeometryRuntime.d.ts +34 -12
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +56 -15
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +13 -26
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts +25 -2
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoViewCut.js +54 -32
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/VGEO_CUT_VERDICT.js +37 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.js +16 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +2 -6
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_descent.d.ts +131 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_descent.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_descent.js +467 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +24 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +111 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_rule.d.ts +42 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_rule.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_rule.js +404 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_stat.d.ts +16 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_stat.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_stat.js +23 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_want.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_want.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_want.js +65 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +14 -70
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +13 -773
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_cut_descent.d.ts +55 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_cut_descent.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_cut_descent.js +248 -0
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/graph_vgeo_expand_instances_to_meshlets.js +15 -174
- 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/brick4/gpu/draw/chunk_brick4_probe_meta_pick2.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_probe_meta_pick2.js +8 -24
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_forward_indirect.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_sample_forward_indirect.js +1 -25
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.js +5 -23
- 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 +20 -5
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +111 -11
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +1596 -52
- 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 +18 -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 +21 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +9 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +8 -1
- 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/chunk_mesh_brick_object.d.ts → chunk_brick_object.d.ts} +8 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_object.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_object.js +42 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_provider.d.ts +45 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_provider.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_provider.js +93 -0
- 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 -15
- 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 -17
- 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 +3 -4
- 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 +6 -8
- 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 +32 -15
- 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 +380 -57
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +156 -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 +189 -13
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +193 -9
- 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 +458 -32
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts +19 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_cage.js +40 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +72 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +343 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts +29 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +189 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts +26 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_want.js +132 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +40 -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 +244 -32
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +8 -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 +29 -12
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts +12 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.js +101 -0
- 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_indirect_lighting.d.ts +15 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +175 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts +37 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_light.js +316 -0
- 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 +15 -2
- 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 +54 -9
- 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 +6 -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 +26 -37
- 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 +101 -38
- 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.d.ts +5 -9
- 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 +9 -110
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts +28 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_want_hits.js +110 -0
- 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/light/world_cluster/chunk_world_light_cluster_lookup.d.ts +13 -0
- package/src/shade/renderer/light/world_cluster/chunk_world_light_cluster_lookup.d.ts.map +1 -1
- package/src/shade/renderer/light/world_cluster/chunk_world_light_cluster_lookup.js +40 -0
- package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts +11 -6
- package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.d.ts.map +1 -1
- package/src/shade/renderer/light/world_cluster/graph_build_world_light_clusters.js +15 -8
- package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.d.ts +9 -2
- package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.d.ts.map +1 -1
- package/src/shade/renderer/light/world_cluster/shader_world_cluster_assign_lights.js +25 -11
- 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/loader/gltf/tiny-gltf.d.ts +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/particles/DESIGN.md +151 -42
- package/src/shade/renderer/particles/EMITTER_GLOBAL_STATE_PLAN_2026_10_29.md +283 -0
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +10 -2
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +46 -8
- package/src/shade/renderer/particles/ParticleConstants.d.ts +23 -6
- package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
- package/src/shade/renderer/particles/ParticleConstants.js +25 -6
- package/src/shade/renderer/particles/bounds/chunk_particle_bounds.js +5 -5
- package/src/shade/renderer/particles/bounds/shader_particle_bounds.js +187 -187
- package/src/shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.d.ts +20 -9
- package/src/shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_DATABASE_SPEC.js +36 -10
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts +8 -7
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +25 -16
- package/src/shade/renderer/particles/data/PARTICLE_FIELD_BINDING.d.ts +51 -0
- package/src/shade/renderer/particles/data/PARTICLE_FIELD_BINDING.d.ts.map +1 -0
- package/src/shade/renderer/particles/data/PARTICLE_FIELD_BINDING.js +56 -0
- package/src/shade/renderer/particles/data/particle_emitter_record.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/particle_emitter_record.js +2 -0
- package/src/shade/renderer/particles/graph/ParticleGroupBuilder.d.ts +1 -1
- package/src/shade/renderer/particles/graph/ParticleGroupBuilder.js +1 -1
- package/src/shade/renderer/particles/graph/ParticleNodeDescription.d.ts +22 -11
- package/src/shade/renderer/particles/graph/ParticleNodeDescription.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/ParticleNodeDescription.js +14 -11
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts +4 -4
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.js +59 -24
- package/src/shade/renderer/particles/graph/ParticleValueType.d.ts +3 -3
- package/src/shade/renderer/particles/graph/ParticleValueType.js +287 -287
- package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts +13 -6
- package/src/shade/renderer/particles/graph/compile_particle_graph.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/compile_particle_graph.js +46 -27
- package/src/shade/renderer/particles/graph/infer_particle_graph_types.d.ts +8 -2
- package/src/shade/renderer/particles/graph/infer_particle_graph_types.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/infer_particle_graph_types.js +240 -234
- package/src/shade/renderer/particles/graph/make_particle_group.d.ts +1 -1
- package/src/shade/renderer/particles/graph/make_particle_group.js +1 -1
- package/src/shade/renderer/particles/graph/particle_graph_authoring.d.ts +3 -2
- package/src/shade/renderer/particles/graph/particle_graph_authoring.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_graph_authoring.js +3 -2
- package/src/shade/renderer/particles/graph/particle_graph_distributions.js +170 -170
- package/src/shade/renderer/particles/graph/particle_graph_json.d.ts +25 -16
- package/src/shade/renderer/particles/graph/particle_graph_json.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_graph_json.js +16 -2
- package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts +29 -15
- package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_node_parameters.js +54 -22
- package/src/shade/renderer/particles/graph/particle_node_presentation.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_node_presentation.js +18 -8
- package/src/shade/renderer/particles/graph/validate_particle_graph.d.ts +9 -2
- package/src/shade/renderer/particles/graph/validate_particle_graph.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/validate_particle_graph.js +70 -32
- package/src/shade/renderer/particles/graph_particles.d.ts +9 -4
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +27 -4
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts +7 -6
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/InstructionStream.js +17 -16
- package/src/shade/renderer/particles/isa/ParticleAssembler.d.ts +17 -0
- package/src/shade/renderer/particles/isa/ParticleAssembler.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/ParticleAssembler.js +35 -0
- package/src/shade/renderer/particles/isa/ParticleProgram.d.ts +26 -6
- package/src/shade/renderer/particles/isa/ParticleProgram.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/ParticleProgram.js +61 -9
- package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts +55 -4
- package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/ParticleVMISA.js +79 -10
- package/src/shade/renderer/particles/isa/particle_assembly.d.ts +20 -6
- package/src/shade/renderer/particles/isa/particle_assembly.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/particle_assembly.js +136 -25
- package/src/shade/renderer/particles/isa/particle_link_global_fields.d.ts +20 -0
- package/src/shade/renderer/particles/isa/particle_link_global_fields.d.ts.map +1 -0
- package/src/shade/renderer/particles/isa/particle_link_global_fields.js +46 -0
- package/src/shade/renderer/particles/isa/validate_particle_program.js +8 -8
- package/src/shade/renderer/particles/layout/ParticleLayout.d.ts +62 -28
- package/src/shade/renderer/particles/layout/ParticleLayout.d.ts.map +1 -1
- package/src/shade/renderer/particles/layout/ParticleLayout.js +102 -62
- package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/dag/optimize_particle_program_vector.js +2 -0
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_groups.js +1 -1
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_lift.js +4 -3
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_lower.js +2 -2
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.d.ts +3 -3
- package/src/shade/renderer/particles/optimizer/dag/particle_vector_pack.js +11 -11
- package/src/shade/renderer/particles/optimizer/optimize_particle_program.d.ts +4 -4
- package/src/shade/renderer/particles/optimizer/optimize_particle_program.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/optimize_particle_program.js +5 -4
- package/src/shade/renderer/particles/optimizer/particle_integer_bounds.d.ts +1 -1
- package/src/shade/renderer/particles/optimizer/particle_integer_bounds.js +1 -1
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts +4 -4
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.js +13 -11
- package/src/shade/renderer/particles/optimizer/particle_program_fuzz.js +7 -7
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts +3 -2
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +5 -4
- package/src/shade/renderer/particles/optimizer/pass_allocate_registers.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_dedup_constants.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_eliminate_dead_code.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_eliminate_dead_code.js +51 -51
- package/src/shade/renderer/particles/optimizer/pass_fold_constants.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_fold_constants.js +5 -5
- package/src/shade/renderer/particles/optimizer/pass_inline_constants.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_narrow_widths.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_pack_registers.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_peephole.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_propagate_copies.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_schedule.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_schedule.js +2 -2
- package/src/shade/renderer/particles/optimizer/pass_share_subexpressions.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/pass_share_subexpressions.js +5 -4
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +93 -22
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/EmitterRegistry.js +336 -29
- package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts +43 -3
- package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/GPUParticleEmitterContext.js +43 -3
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +56 -26
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ParticleEmitter.js +89 -33
- package/src/shade/renderer/particles/runtime/ParticleGlobalFields.d.ts +85 -0
- package/src/shade/renderer/particles/runtime/ParticleGlobalFields.d.ts.map +1 -0
- package/src/shade/renderer/particles/runtime/ParticleGlobalFields.js +221 -0
- package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts +143 -18
- package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ProgramHeap.js +378 -28
- package/src/shade/renderer/particles/runtime/create_particle_effect.d.ts +19 -7
- package/src/shade/renderer/particles/runtime/create_particle_effect.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/create_particle_effect.js +22 -9
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +8 -8
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_setup_context.d.ts +3 -0
- package/src/shade/renderer/particles/shaders/chunk_particle_setup_context.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_setup_context.js +4 -0
- package/src/shade/renderer/particles/shaders/shader_particle_field_bind.d.ts +30 -0
- package/src/shade/renderer/particles/shaders/shader_particle_field_bind.d.ts.map +1 -0
- package/src/shade/renderer/particles/shaders/shader_particle_field_bind.js +121 -0
- package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/PARTICLE_VM_CONTEXT_STRUCT.js +3 -1
- package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +12 -4
- package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/ParticleVMReference.js +48 -11
- package/src/shade/renderer/particles/vm/chunk_particle_vm.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/chunk_particle_vm.js +36 -14
- 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/postprocess/PostProcess.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/PostProcess.js +2 -1
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +31 -19
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/GTAO.js +44 -30
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +16 -2
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.js +4 -3
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +7 -1
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +16 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts +20 -2
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +53 -3
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +10 -2
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +31 -3
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +17 -11
- package/src/shade/renderer/postprocess/taa/TAA.d.ts +4 -2
- package/src/shade/renderer/postprocess/taa/TAA.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/TAA.js +6 -1
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +10 -5
- package/src/shade/renderer/postprocess/taa/shader_taa.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/shader_taa.js +15 -12
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +26 -17
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts +4 -3
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +6 -4
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts +12 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.js +57 -0
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +4 -2
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +4 -2
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +8 -2
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +28 -15
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.d.ts +2 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.js +19 -3
- package/src/shade/renderer/rasterize/native/graph_rasterize_meshes_alpha_tested.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/graph_rasterize_meshes_alpha_tested.js +4 -2
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +3 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +27 -14
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts +2 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.js +19 -3
- 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/geometry/meshlet/chunk_read_meshlet_triangle_bounds.d.ts +2 -8
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_bounds.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_bounds.js +25 -52
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_positions.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_positions.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_triangle_positions.js +52 -0
- package/src/shade/renderer/shader/chunk/geometry/triangle/TRIANGLE_POSITIONS_STRUCT.d.ts +7 -0
- package/src/shade/renderer/shader/chunk/geometry/triangle/TRIANGLE_POSITIONS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/triangle/TRIANGLE_POSITIONS_STRUCT.js +12 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_index_to_grid2d_reciprocal.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_index_to_grid2d_reciprocal.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_index_to_grid2d_reciprocal.js +37 -0
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.js +26 -60
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.d.ts +23 -0
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.js +54 -0
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.js +43 -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/random/chunk_jitter_from_vectors.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/random/chunk_jitter_from_vectors.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/random/chunk_jitter_from_vectors.js +37 -0
- package/src/shade/renderer/shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.d.ts +27 -0
- package/src/shade/renderer/shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/random/reservoir/chunk_pick2_wrs_mat2x4.js +61 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.d.ts +21 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/l1i/chunk_resolve_irradiance_sh_to_specular.js +41 -0
- 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/texture/util/texture_fill_rectangle.d.ts.map +1 -1
- package/src/shade/renderer/texture/util/texture_fill_rectangle.js +282 -267
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +8 -4
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +36 -36
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +6 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +498 -484
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +15 -2
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +57 -3
- package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.js +197 -191
- package/src/shade/renderer/volumetrics/taa/shader_volumetrics_taa.js +4 -4
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts +2 -1
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
- package/src/shade/renderer/water/GPUWaterRenderer.js +5 -1
- package/src/shade/renderer/water/chunk_water_gi.d.ts +13 -3
- package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_gi.js +47 -5
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/water/shader_water.d.ts +3 -2
- package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water.js +9 -3
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts +19 -0
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/CPUBitmapData.js +27 -0
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +39 -18
- package/src/view/elements/progress/segmented/GhostTrail.d.ts +56 -0
- package/src/view/elements/progress/segmented/GhostTrail.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/GhostTrail.js +98 -0
- package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.d.ts +3 -1
- package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/RESOURCE_BAR_SEGMENTS.js +3 -1
- package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.d.ts +11 -0
- package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/SEGMENT_TIERS_DEFAULT.js +15 -0
- package/src/view/elements/progress/segmented/SegmentDefinition.d.ts +3 -0
- package/src/view/elements/progress/segmented/SegmentDefinition.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentDefinition.js +3 -0
- package/src/view/elements/progress/segmented/SegmentTier.d.ts +38 -0
- package/src/view/elements/progress/segmented/SegmentTier.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/SegmentTier.js +50 -0
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +155 -10
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +427 -101
- package/src/view/elements/progress/segmented/playground/index.html +78 -0
- package/src/view/elements/progress/segmented/playground/main.d.ts +2 -0
- package/src/view/elements/progress/segmented/playground/main.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/playground/main.js +173 -0
- package/src/view/elements/progress/segmented/segment_cell_layout.d.ts +48 -0
- package/src/view/elements/progress/segmented/segment_cell_layout.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/segment_cell_layout.js +75 -0
- package/src/view/elements/progress/segmented/segment_notch_place.d.ts +18 -0
- package/src/view/elements/progress/segmented/segment_notch_place.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/segment_notch_place.js +28 -0
- package/src/view/elements/progress/segmented/segment_tick_positions.d.ts +32 -0
- package/src/view/elements/progress/segmented/segment_tick_positions.d.ts.map +1 -0
- package/src/view/elements/progress/segmented/segment_tick_positions.js +103 -0
- package/src/view/elements/progress/segmented/segmented-resource-bar.css +142 -0
- package/src/shade/renderer/geometry/sdf/SDF_BUILD_SETTINGS_STRUCT.d.ts +0 -3
- package/src/shade/renderer/geometry/sdf/SDF_BUILD_SETTINGS_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/SFD_BUILD_WORKGROUP_SIZE.d.ts +0 -2
- package/src/shade/renderer/geometry/sdf/SFD_BUILD_WORKGROUP_SIZE.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_sdf.d.ts +0 -8
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_sdf.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_volume_sign.d.ts +0 -3
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_volume_sign.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts +0 -3
- package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_object.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_object.js +0 -42
- 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 -247
- package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.d.ts +0 -31
- package/src/shade/renderer/particles/shaders/shader_particle_init_free_list.d.ts.map +0 -1
- package/src/shade/renderer/shadow/vsm/VSMMoverTracker.d.ts +0 -42
- package/src/shade/renderer/shadow/vsm/VSMMoverTracker.d.ts.map +0 -1
- package/src/shade/renderer/shadow/vsm/VSM_MOVER_LAYOUT.d.ts +0 -54
- package/src/shade/renderer/shadow/vsm/VSM_MOVER_LAYOUT.d.ts.map +0 -1
- package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.d.ts +0 -14
- package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.d.ts.map +0 -1
- package/src/shade/renderer/shadow/vsm/shader/shader_vsm_movers.d.ts +0 -30
- package/src/shade/renderer/shadow/vsm/shader/shader_vsm_movers.d.ts.map +0 -1
- package/src/shade/renderer/shadow/vsm/shader/shader_vsm_skinned_movers.d.ts +0 -23
- package/src/shade/renderer/shadow/vsm/shader/shader_vsm_skinned_movers.d.ts.map +0 -1
|
@@ -2,7 +2,13 @@ import { assert } from "../../../../../core/assert.js";
|
|
|
2
2
|
import { ClipmapCascadePlacement } from "../../../../../core/geom/clipmap/ClipmapCascadePlacement.js";
|
|
3
3
|
import { BufferDescriptor } from "../../../../descriptor/buffer/BufferDescriptor.js";
|
|
4
4
|
import { graph_read_buffer } from "../../../buffer/graph_read_buffer.js";
|
|
5
|
+
import { graph_build_world_light_clusters } from "../../../light/world_cluster/graph_build_world_light_clusters.js";
|
|
5
6
|
import { WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION } from "../../../gpu_primitive/indirect/WEBGPU_GUARANTEED_MAX_COMPUTE_WORKGROUPS_PER_DIMENSION.js";
|
|
7
|
+
import {
|
|
8
|
+
PREFIX_SCAN_CSDLDF_PARTITION_SIZE,
|
|
9
|
+
shader_prefix_scan_csdldf,
|
|
10
|
+
shader_prefix_scan_csdldf_prepare
|
|
11
|
+
} from "../../../gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js";
|
|
6
12
|
import { shader_slot_stack_fill, SLOT_STACK_FILL_WORKGROUP_SIZE } from "../../../gpu_primitive/slot_stack/shader_slot_stack_fill.js";
|
|
7
13
|
import {
|
|
8
14
|
shader_slot_stack_push_range,
|
|
@@ -17,7 +23,8 @@ import {
|
|
|
17
23
|
PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MAX,
|
|
18
24
|
PROBE_CLIPMAP_OCTAHEDRAL_RESOLUTION_MIN
|
|
19
25
|
} from "../ProbeClipmapSettings.js";
|
|
20
|
-
import { PROBE_PROJECTION_ROW_STRUCT, PROBE_RAY_STRUCT, PROBE_RECORD_STRUCT } from "./chunk_probe_clipmap.js";
|
|
26
|
+
import { PROBE_EVICTION_STRUCT, PROBE_PROJECTION_ROW_STRUCT, PROBE_RAY_STRUCT, PROBE_RECORD_STRUCT, PROBE_REQUEST_STRUCT } from "./chunk_probe_clipmap.js";
|
|
27
|
+
import { PROBE_SAMPLING_STRUCT } from "./chunk_probe_clipmap_pick.js";
|
|
21
28
|
import {
|
|
22
29
|
PROBE_COUNTER_FREE,
|
|
23
30
|
PROBE_COUNTER_STARVED,
|
|
@@ -28,25 +35,45 @@ import {
|
|
|
28
35
|
PROBE_DISPATCH_RAYS,
|
|
29
36
|
PROBE_DISPATCH_ROWS,
|
|
30
37
|
PROBE_DISPATCH_TEXELS,
|
|
38
|
+
PROBE_DISPATCH_ORDER,
|
|
31
39
|
PROBE_DISPATCH_TRACED,
|
|
32
40
|
PROBE_DISPATCH_WORDS,
|
|
41
|
+
PROBE_FREE_SLACK,
|
|
42
|
+
PROBE_RAYS_PER_TEXEL_MAX,
|
|
43
|
+
PROBE_RAYS_PER_TEXEL_MIN,
|
|
44
|
+
PROBE_THREAD_WORKGROUP_SIZE,
|
|
33
45
|
PROBE_WANT_TILE,
|
|
34
46
|
PROBE_WANT_WORKGROUP_TILES,
|
|
47
|
+
PROBE_UNIFORM_PERIOD,
|
|
48
|
+
probe_clipmap_guide_words,
|
|
35
49
|
probe_clipmap_maps_words
|
|
36
50
|
} from "./PROBE_CLIPMAP.js";
|
|
37
51
|
import { shader_probe_clipmap_accumulate } from "./shader_probe_clipmap_accumulate.js";
|
|
38
52
|
import { shader_probe_clipmap_admit, shader_probe_clipmap_admit_command } from "./shader_probe_clipmap_admit.js";
|
|
39
53
|
import { shader_probe_clipmap_due } from "./shader_probe_clipmap_due.js";
|
|
40
54
|
import { shader_probe_clipmap_fill } from "./shader_probe_clipmap_fill.js";
|
|
55
|
+
import {
|
|
56
|
+
shader_probe_clipmap_guide_rows,
|
|
57
|
+
shader_probe_clipmap_guide_starts,
|
|
58
|
+
shader_probe_clipmap_guide_weights
|
|
59
|
+
} from "./shader_probe_clipmap_guide.js";
|
|
41
60
|
import { shader_probe_clipmap_project, shader_probe_clipmap_project_rows } from "./shader_probe_clipmap_project.js";
|
|
42
61
|
import { shader_probe_clipmap_publish } from "./shader_probe_clipmap_publish.js";
|
|
43
62
|
import { shader_probe_clipmap_relocate } from "./shader_probe_clipmap_relocate.js";
|
|
44
63
|
import { shader_probe_clipmap_retire } from "./shader_probe_clipmap_retire.js";
|
|
45
64
|
import { shader_probe_clipmap_schedule } from "./shader_probe_clipmap_schedule.js";
|
|
65
|
+
import { shader_probe_clipmap_light } from "./shader_probe_clipmap_light.js";
|
|
66
|
+
import {
|
|
67
|
+
shader_probe_clipmap_ray_command,
|
|
68
|
+
shader_probe_clipmap_ray_counts,
|
|
69
|
+
shader_probe_clipmap_ray_layout
|
|
70
|
+
} from "./shader_probe_clipmap_ray_layout.js";
|
|
46
71
|
import { shader_probe_clipmap_shade } from "./shader_probe_clipmap_shade.js";
|
|
47
72
|
import { shader_probe_clipmap_trace } from "./shader_probe_clipmap_trace.js";
|
|
73
|
+
import { shader_probe_clipmap_order } from "./shader_probe_clipmap_order.js";
|
|
48
74
|
import { shader_probe_clipmap_trace_command } from "./shader_probe_clipmap_trace_command.js";
|
|
49
75
|
import { shader_probe_clipmap_want } from "./shader_probe_clipmap_want.js";
|
|
76
|
+
import { shader_probe_clipmap_want_hits } from "./shader_probe_clipmap_want_hits.js";
|
|
50
77
|
|
|
51
78
|
/**
|
|
52
79
|
* @typedef {import("../ProbeClipmapSettings.js").ProbeClipmapSettings} ProbeClipmapSettings
|
|
@@ -78,18 +105,25 @@ const PROBE_CASCADE_NEST_MARGIN = 1;
|
|
|
78
105
|
*/
|
|
79
106
|
const LIST_HEADER_BYTES = 16;
|
|
80
107
|
|
|
108
|
+
// word offsets of the radiance atlas's shape in PROBE_SAMPLING_STRUCT
|
|
109
|
+
const SAMPLING_RADIANCE_RESOLUTION = PROBE_SAMPLING_STRUCT.get("radiance_resolution").offset >>> 2;
|
|
110
|
+
const SAMPLING_RADIANCE_TILES_PER_ROW = PROBE_SAMPLING_STRUCT.get("radiance_tiles_per_row").offset >>> 2;
|
|
111
|
+
const SAMPLING_RADIANCE_TEXEL = PROBE_SAMPLING_STRUCT.get("radiance_texel").offset >>> 2;
|
|
112
|
+
const SAMPLING_RADIANCE_TILES_PER_ROW_RECIPROCAL = PROBE_SAMPLING_STRUCT.get("radiance_tiles_per_row_reciprocal").offset >>> 2;
|
|
113
|
+
|
|
81
114
|
/**
|
|
82
115
|
* What shading samples (PROBE_CLIPMAP_PROPOSAL_2026_10_27.md §8): {@link cascade_count} cascades of
|
|
83
116
|
* {@link resolution}³ lattice points around the view, {@link spacing} metres apart in the finest
|
|
84
|
-
* cascade and twice as far apart in each one around it. A point
|
|
85
|
-
*
|
|
117
|
+
* cascade and twice as far apart in each one around it. A point gets a probe when a pixel wants it, or
|
|
118
|
+
* a hit of a probe a pixel wants, and keeps it until its window leaves it or the slots are wanted for
|
|
119
|
+
* others, so probes are a sparse cache over the lattice.
|
|
86
120
|
*
|
|
87
121
|
* **Storage** (§8.2):
|
|
88
122
|
* - {@link indirection}, `r32uint`, a texel a lattice point in storage that wraps, the cascades
|
|
89
123
|
* stacked along z: the slot of the point's probe, or none. Allocated whole, since the lattice follows
|
|
90
124
|
* from the structure alone.
|
|
91
125
|
* - a slot each: a state of two words, the kind and updates and then where relocation moved it
|
|
92
|
-
* (`PROBE_CLIPMAP.js`), a
|
|
126
|
+
* (`PROBE_CLIPMAP.js`), a 48-byte record (`PROBE_RECORD_STRUCT`), an octahedral radiance tile of
|
|
93
127
|
* {@link radiance_resolution}² texels and a depth-moment tile of {@link depth_resolution}², each with
|
|
94
128
|
* a one-texel skirt, in two 2-D tile atlases. The slots are handed out by a free list on the device.
|
|
95
129
|
* - the active lists, double-buffered: each frame's retire reads the last frame's and writes the
|
|
@@ -98,12 +132,22 @@ const LIST_HEADER_BYTES = 16;
|
|
|
98
132
|
*
|
|
99
133
|
* **A frame's lifetime** ({@link graph_update}, §8.3, §8.5): the windows are placed around the anchor,
|
|
100
134
|
* coarsest first, each a parent cell inside its parent. Retire frees the probes whose points left
|
|
101
|
-
* their windows
|
|
102
|
-
* screen tile reads,
|
|
103
|
-
*
|
|
135
|
+
* their windows and those the last frame's schedule evicted, want marks the cages one pixel of each
|
|
136
|
+
* screen tile reads, the hits' wants the cages the last frame's hits read their bounce from, admit
|
|
137
|
+
* gives each wanted point without a probe a NEW one, schedule sets the period T from the probes waiting
|
|
138
|
+
* for an update and the next frame's eviction from the pressure on the slots (`PROBE_FREE_SLACK`), and
|
|
139
|
+
* the due passes list the frame's updates, NEW probes first.
|
|
104
140
|
*
|
|
105
|
-
* **The frame's
|
|
106
|
-
*
|
|
141
|
+
* **The frame's rays** (§8.6): the lifetime's last passes lay them out. Each listed probe's rays this update
|
|
142
|
+
* are a count the budget does not scale (a uniform update's R, a DEAD probe's fewest) and a request it
|
|
143
|
+
* does (a guided update's, `probe_requests`, which projection sets after each update). Both are scanned
|
|
144
|
+
* (`graph_prefix_scan_csdldf`'s shaders), the requests are scaled into what the budget leaves, and the
|
|
145
|
+
* sums of the two are `probe_ray_sums`: a probe's rays follow one another in the trace list's order, and
|
|
146
|
+
* the last sum is the frame's count, which the rays' command dispatches.
|
|
147
|
+
*
|
|
148
|
+
* **The frame's update** (§8.4, §8.6), once the brick clipmap is built: relocate; then the guide, the
|
|
149
|
+
* CDF over each listed probe's history that its guided updates' rays follow (`PROBE_UNIFORM_PERIOD`);
|
|
150
|
+
* then trace, a ray a thread, each with its hit and the suns' shadow rays from there.
|
|
107
151
|
*
|
|
108
152
|
* Retire, admit, due and the update run through commands written on the device, want over the screen's
|
|
109
153
|
* tiles: nothing is sized by the capacity.
|
|
@@ -178,6 +222,9 @@ export class GPUProbeClipmap {
|
|
|
178
222
|
/** What the one-thread passes write for the passes after them to dispatch through. @type {GPUBuffer} */
|
|
179
223
|
#dispatch;
|
|
180
224
|
|
|
225
|
+
/** What the next frame's retire evicts, `PROBE_EVICTION_STRUCT`, as schedule writes it. @type {GPUBuffer} */
|
|
226
|
+
#eviction;
|
|
227
|
+
|
|
181
228
|
/** The two active lists; the frame reads `#active[#parity]` and writes the other. @type {GPUBuffer[]} */
|
|
182
229
|
#active = [];
|
|
183
230
|
|
|
@@ -201,18 +248,46 @@ export class GPUProbeClipmap {
|
|
|
201
248
|
/** The listed probes' maps, as accumulation writes them, as many as the trace list holds. @type {GPUBuffer|null} */
|
|
202
249
|
#maps = null;
|
|
203
250
|
|
|
251
|
+
/** The listed probes' guides, as the guide passes write them, as many as the trace list holds. @type {GPUBuffer|null} */
|
|
252
|
+
#guide = null;
|
|
253
|
+
|
|
204
254
|
/** The listed probes' projected rows, n_r a probe, as many as the trace list holds. @type {GPUBuffer|null} */
|
|
205
255
|
#projection = null;
|
|
206
256
|
|
|
207
|
-
/** The frame's rays,
|
|
257
|
+
/** The frame's rays, laid out by listed probe (`#ray_sums`). @type {GPUBuffer|null} */
|
|
208
258
|
#rays = null;
|
|
209
259
|
|
|
210
|
-
/** Rays the rays buffer holds: U·R as it last grew. */
|
|
260
|
+
/** Rays the rays buffer holds: U·R, to the next whole workgroup, as it last grew. */
|
|
211
261
|
#ray_capacity = 0;
|
|
212
262
|
|
|
263
|
+
/** Each listed probe's rays this update that the budget does not scale, `{count, elements}`, as many as the trace list holds. @type {GPUBuffer|null} */
|
|
264
|
+
#ray_counts = null;
|
|
265
|
+
|
|
266
|
+
/** Each listed probe's rays this update that the budget scales: a guided update's request. @type {GPUBuffer|null} */
|
|
267
|
+
#ray_requests = null;
|
|
268
|
+
|
|
269
|
+
/** The scans' outputs, the inclusive sums of the counts and of the requests. @type {GPUBuffer|null} */
|
|
270
|
+
#ray_count_sums = null;
|
|
271
|
+
/** @type {GPUBuffer|null} */
|
|
272
|
+
#ray_request_sums = null;
|
|
273
|
+
|
|
274
|
+
/** The rays' layout, inclusive sums of each listed probe's rays. @type {GPUBuffer|null} */
|
|
275
|
+
#ray_sums = null;
|
|
276
|
+
|
|
277
|
+
/** The ray counts' scan's spine, cleared before each scan, and its command. @type {GPUBuffer|null} */
|
|
278
|
+
#ray_scan_spine = null;
|
|
279
|
+
/** @type {GPUBuffer|null} */
|
|
280
|
+
#ray_scan_command = null;
|
|
281
|
+
|
|
213
282
|
/** @type {GPUTileAtlas2D} */
|
|
214
283
|
#radiance;
|
|
215
284
|
|
|
285
|
+
/** Each slot's radiance estimators, `vec4<u32>` a texel, n_r² a slot: the atlas's mean's multi-scale state. @type {GPUBuffer} */
|
|
286
|
+
#estimators;
|
|
287
|
+
|
|
288
|
+
/** Each slot's ray request, `PROBE_REQUEST_STRUCT`: the rays its next guided update asks for. @type {GPUBuffer} */
|
|
289
|
+
#requests;
|
|
290
|
+
|
|
216
291
|
/** @type {GPUTileAtlas2D} */
|
|
217
292
|
#depth;
|
|
218
293
|
|
|
@@ -232,36 +307,53 @@ export class GPUProbeClipmap {
|
|
|
232
307
|
#starved = 0;
|
|
233
308
|
#grow_pending = false;
|
|
234
309
|
|
|
235
|
-
/** Frames recorded
|
|
310
|
+
/** Frames recorded: the clock the records keep. */
|
|
236
311
|
#frame = 0;
|
|
237
|
-
#time_origin = 0;
|
|
238
312
|
|
|
239
313
|
#destroyed = false;
|
|
240
314
|
|
|
315
|
+
/** The probes' shape for their readers, `PROBE_SAMPLING_STRUCT`. @type {GPUBuffer} */
|
|
316
|
+
#sampling;
|
|
317
|
+
|
|
318
|
+
#sampling_data = new ArrayBuffer(PROBE_SAMPLING_STRUCT.size);
|
|
319
|
+
#sampling_u32 = new Uint32Array(this.#sampling_data);
|
|
320
|
+
#sampling_f32 = new Float32Array(this.#sampling_data);
|
|
321
|
+
|
|
241
322
|
#levels_data = new ArrayBuffer(CLIPMAP_LEVEL_ARRAY.size);
|
|
242
323
|
#levels_i32 = new Int32Array(this.#levels_data);
|
|
243
324
|
#levels_f32 = new Float32Array(this.#levels_data);
|
|
244
325
|
|
|
245
|
-
#retire_settings = { capacity: 0, resolution: 0,
|
|
326
|
+
#retire_settings = { capacity: 0, resolution: 0, frame: 0 };
|
|
246
327
|
#want_settings = { cascade_count: 0, resolution: 0, frame: 0, key_count: 0 };
|
|
328
|
+
#want_hits_settings = { cascade_count: 0, resolution: 0, key_count: 0 };
|
|
247
329
|
#admit_command_settings = { key_count: 0 };
|
|
248
|
-
#admit_settings = { capacity: 0, resolution: 0, key_count: 0,
|
|
249
|
-
#schedule_settings = { capacity: 0, key_count: 0, trace_capacity: 0 };
|
|
250
|
-
#due_settings = { capacity: 0,
|
|
251
|
-
#trace_command_settings = { trace_capacity: 0,
|
|
330
|
+
#admit_settings = { capacity: 0, resolution: 0, key_count: 0, frame: 0 };
|
|
331
|
+
#schedule_settings = { capacity: 0, key_count: 0, trace_capacity: 0, slack: 0 };
|
|
332
|
+
#due_settings = { capacity: 0, trace_capacity: 0, frame: 0, new_only: 0 };
|
|
333
|
+
#trace_command_settings = { trace_capacity: 0, radiance_resolution: 0, depth_resolution: 0 };
|
|
334
|
+
#order_settings = { trace_capacity: 0, resolution: 0, axis_bits: 0 };
|
|
335
|
+
#ray_counts_settings = { trace_capacity: 0, rays_per_probe: 0, rays_min: 0, radiance_resolution: 0, uniform_period: PROBE_UNIFORM_PERIOD };
|
|
336
|
+
#ray_layout_settings = { trace_capacity: 0, ray_budget: 0 };
|
|
252
337
|
#relocate_settings = { trace_capacity: 0, brick_cascade_count: 0 };
|
|
253
|
-
#
|
|
254
|
-
#
|
|
255
|
-
#accumulate_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, depth_resolution: 0, radiance_tiles_per_row: 0, depth_tiles_per_row: 0,
|
|
256
|
-
#project_settings = { trace_capacity: 0, radiance_resolution: 0, depth_resolution: 0,
|
|
338
|
+
#guide_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, radiance_tiles_per_row: 0 };
|
|
339
|
+
#trace_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, brick_cascade_count: 0, t_max: 0, uniform_period: PROBE_UNIFORM_PERIOD };
|
|
340
|
+
#accumulate_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, depth_resolution: 0, radiance_tiles_per_row: 0, depth_tiles_per_row: 0, frame: 0, response_frames: 0, uniform_period: PROBE_UNIFORM_PERIOD };
|
|
341
|
+
#project_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, depth_resolution: 0, frame: 0, uniform_period: PROBE_UNIFORM_PERIOD, rays_min: 0, rays_max: 0, response_frames: 0 };
|
|
257
342
|
#publish_settings = { trace_capacity: 0, radiance_resolution: 0, depth_resolution: 0, radiance_tiles_per_row: 0, depth_tiles_per_row: 0 };
|
|
258
343
|
#push_settings = { first: 0, count: 0, counter: PROBE_COUNTER_FREE };
|
|
259
344
|
|
|
260
345
|
#bindings = {};
|
|
261
346
|
|
|
347
|
+
/** The ray counts' scan's, which names its buffers its own way. */
|
|
348
|
+
#ray_scan_bindings = { scan_in: null, scan_out: null, spine: null, command: null };
|
|
349
|
+
|
|
262
350
|
#lifetime_data = { counters: -1, depth: -1, normal: -1, stbn: -1 };
|
|
263
351
|
|
|
264
|
-
#update_data = { counters: -1, bricks: -1 };
|
|
352
|
+
#update_data = { counters: -1, bricks: -1, world_cluster_lookup: -1, world_cluster_data: -1 };
|
|
353
|
+
|
|
354
|
+
/** The coarsest brick window's box, metres, which the world light clusters cull lights against. */
|
|
355
|
+
#clusters_min = [0, 0, 0];
|
|
356
|
+
#clusters_max = [0, 0, 0];
|
|
265
357
|
|
|
266
358
|
/** The frame's brick clipmap, which the update's rays read. @type {import("../brick/GPUBrickClipmap.js").GPUBrickClipmap|null} */
|
|
267
359
|
#brick_clipmap = null;
|
|
@@ -357,6 +449,8 @@ export class GPUProbeClipmap {
|
|
|
357
449
|
|
|
358
450
|
// two words a slot: the state, then the relocation offset
|
|
359
451
|
this.#states = this.#create_buffer('probe states', 8 * capacity, GPUBufferUsage.COPY_SRC);
|
|
452
|
+
this.#estimators = this.#create_buffer('probe estimators', 16 * radiance_resolution * radiance_resolution * capacity, GPUBufferUsage.COPY_SRC);
|
|
453
|
+
this.#requests = this.#create_buffer('probe requests', PROBE_REQUEST_STRUCT.size * capacity, GPUBufferUsage.COPY_SRC);
|
|
360
454
|
this.#records = this.#create_buffer('probe records', PROBE_RECORD_STRUCT.size * capacity, GPUBufferUsage.COPY_SRC);
|
|
361
455
|
this.#free = this.#create_buffer('probe free list', 4 * capacity, GPUBufferUsage.COPY_SRC);
|
|
362
456
|
this.#active.push(
|
|
@@ -368,6 +462,8 @@ export class GPUProbeClipmap {
|
|
|
368
462
|
this.#counters = this.#create_buffer('probe counters', 4 * PROBE_COUNTER_WORDS, GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST);
|
|
369
463
|
// zero: the first frame's retire dispatches nothing
|
|
370
464
|
this.#dispatch = this.#create_buffer('probe dispatch', 4 * PROBE_DISPATCH_WORDS, GPUBufferUsage.INDIRECT);
|
|
465
|
+
// zero: the first frame's retire evicts nothing
|
|
466
|
+
this.#eviction = this.#create_buffer('probe eviction', PROBE_EVICTION_STRUCT.size, GPUBufferUsage.COPY_SRC);
|
|
371
467
|
|
|
372
468
|
// every slot free, once the first frame has filled the list
|
|
373
469
|
const counters = new Uint32Array(PROBE_COUNTER_WORDS);
|
|
@@ -381,6 +477,33 @@ export class GPUProbeClipmap {
|
|
|
381
477
|
size: CLIPMAP_LEVEL_ARRAY.size,
|
|
382
478
|
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
|
|
383
479
|
}));
|
|
480
|
+
|
|
481
|
+
this.#sampling = device.createBuffer(BufferDescriptor.fromJSON({
|
|
482
|
+
label: 'Probe clipmap / probe sampling',
|
|
483
|
+
size: PROBE_SAMPLING_STRUCT.size,
|
|
484
|
+
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST,
|
|
485
|
+
}));
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Put what the probes' readers bind into `bindings`, under the names `chunk_probe_clipmap_pick` reads
|
|
490
|
+
* them by: the levels and the sampling uniforms, the indirection, the states and records, the depth
|
|
491
|
+
* atlas. As the last {@link graph_update} left them; take them each frame, since a growth replaces
|
|
492
|
+
* the per-slot buffers.
|
|
493
|
+
*
|
|
494
|
+
* @param {Object} bindings
|
|
495
|
+
* @returns {Object} bindings
|
|
496
|
+
*/
|
|
497
|
+
write_sampling_bindings(bindings) {
|
|
498
|
+
bindings.probe_levels = this.#levels;
|
|
499
|
+
bindings.probe_sampling = this.#sampling;
|
|
500
|
+
bindings.probe_indirection = this.#indirection_view;
|
|
501
|
+
bindings.probe_states = this.#states;
|
|
502
|
+
bindings.probe_records = this.#records;
|
|
503
|
+
bindings.probe_depth = this.#depth.texture_at(0).obtainView();
|
|
504
|
+
bindings.probe_radiance = this.#radiance.texture_at(0).obtainView();
|
|
505
|
+
|
|
506
|
+
return bindings;
|
|
384
507
|
}
|
|
385
508
|
|
|
386
509
|
/**
|
|
@@ -452,9 +575,7 @@ export class GPUProbeClipmap {
|
|
|
452
575
|
* @param {GPUBuffer} options.camera the view's camera uniform
|
|
453
576
|
* @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
|
|
454
577
|
* @param {ArrayLike<number>} options.resolution the frame's pixels, x and y
|
|
455
|
-
* @param {number} options.
|
|
456
|
-
* @param {number} options.retention_time seconds an unwanted probe keeps its slot
|
|
457
|
-
* @param {number} options.response_time seconds of the blend's response, τ (§8.8)
|
|
578
|
+
* @param {number} options.response_frames frames of the blend's response, τ (§8.8)
|
|
458
579
|
* @param {number} options.ray_budget rays a frame
|
|
459
580
|
* @param {number} options.rays_per_probe rays an update, R: the frame updates ⌊ray_budget / R⌋ probes at most
|
|
460
581
|
* @param {import("../brick/GPUBrickClipmap.js").GPUBrickClipmap} options.brick_clipmap the world the
|
|
@@ -467,15 +588,12 @@ export class GPUProbeClipmap {
|
|
|
467
588
|
* the resident materials, updated this frame: what a hit no card sees takes
|
|
468
589
|
* @param {GPUBuffer} options.card_rows the row → card set table, a word a `meshes` row
|
|
469
590
|
*/
|
|
470
|
-
graph_update({ graph, x, y, z, depth, normal, camera, stbn, resolution,
|
|
591
|
+
graph_update({ graph, x, y, z, depth, normal, camera, stbn, resolution, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, materials, card_rows }) {
|
|
471
592
|
assert.defined(graph, 'graph');
|
|
472
593
|
assert.defined(camera, 'camera');
|
|
473
594
|
assert.defined(stbn, 'stbn');
|
|
474
|
-
assert.isFinite(
|
|
475
|
-
assert.
|
|
476
|
-
assert.greaterThan(retention_time, 0, 'retention_time');
|
|
477
|
-
assert.isFinite(response_time, 'response_time');
|
|
478
|
-
assert.greaterThan(response_time, 0, 'response_time');
|
|
595
|
+
assert.isFinite(response_frames, 'response_frames');
|
|
596
|
+
assert.greaterThan(response_frames, 0, 'response_frames');
|
|
479
597
|
assert.isPositiveInteger(rays_per_probe, 'rays_per_probe');
|
|
480
598
|
assert.greaterThanOrEqual(ray_budget, rays_per_probe, 'ray_budget');
|
|
481
599
|
assert.defined(brick_clipmap, 'brick_clipmap');
|
|
@@ -491,51 +609,98 @@ export class GPUProbeClipmap {
|
|
|
491
609
|
}
|
|
492
610
|
|
|
493
611
|
const trace_capacity = Math.floor(ray_budget / rays_per_probe);
|
|
612
|
+
const texels = this.radiance_resolution * this.radiance_resolution;
|
|
613
|
+
const rays_min = PROBE_RAYS_PER_TEXEL_MIN * texels;
|
|
614
|
+
const rays_max = PROBE_RAYS_PER_TEXEL_MAX * texels;
|
|
494
615
|
|
|
495
616
|
this.#ensure_trace(trace_capacity);
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
if (this.#frame === 0) {
|
|
499
|
-
this.#time_origin = time;
|
|
500
|
-
}
|
|
617
|
+
// the requests share what the counts leave of the budget, so the frame's rays are at most it
|
|
618
|
+
this.#ensure_rays(ray_budget);
|
|
501
619
|
|
|
502
620
|
this.#place(x, y, z);
|
|
503
621
|
|
|
504
622
|
this.#device.queue.writeBuffer(this.#levels, 0, this.#levels_data);
|
|
505
623
|
|
|
506
|
-
|
|
624
|
+
// the readers' view of the clipmap: its shape, and the depth and radiance atlases', which grow by rows
|
|
625
|
+
const depth_texture = this.#depth.texture_at(0);
|
|
626
|
+
const radiance_texture = this.#radiance.texture_at(0);
|
|
627
|
+
|
|
628
|
+
this.#sampling_u32[0] = this.cascade_count;
|
|
629
|
+
this.#sampling_u32[1] = this.resolution;
|
|
630
|
+
this.#sampling_u32[2] = this.depth_resolution;
|
|
631
|
+
this.#sampling_u32[3] = this.#depth.tiles_per_row;
|
|
632
|
+
this.#sampling_f32[4] = 1 / depth_texture.width;
|
|
633
|
+
this.#sampling_f32[5] = 1 / depth_texture.height;
|
|
634
|
+
// rounded to f32 as it is stored, which index_to_grid2d_reciprocal asks for
|
|
635
|
+
this.#sampling_f32[6] = 1 / this.#depth.tiles_per_row;
|
|
636
|
+
this.#sampling_u32[SAMPLING_RADIANCE_RESOLUTION] = this.radiance_resolution;
|
|
637
|
+
this.#sampling_u32[SAMPLING_RADIANCE_TILES_PER_ROW] = this.#radiance.tiles_per_row;
|
|
638
|
+
this.#sampling_f32[SAMPLING_RADIANCE_TEXEL] = 1 / radiance_texture.width;
|
|
639
|
+
this.#sampling_f32[SAMPLING_RADIANCE_TEXEL + 1] = 1 / radiance_texture.height;
|
|
640
|
+
this.#sampling_f32[SAMPLING_RADIANCE_TILES_PER_ROW_RECIPROCAL] = 1 / this.#radiance.tiles_per_row;
|
|
641
|
+
|
|
642
|
+
this.#device.queue.writeBuffer(this.#sampling, 0, this.#sampling_data);
|
|
507
643
|
|
|
508
644
|
this.#retire_settings.capacity = this.#capacity;
|
|
509
645
|
this.#retire_settings.resolution = this.resolution;
|
|
510
|
-
this.#retire_settings.
|
|
511
|
-
this.#retire_settings.retention_time = retention_time;
|
|
646
|
+
this.#retire_settings.frame = this.#frame;
|
|
512
647
|
|
|
513
648
|
this.#want_settings.cascade_count = this.cascade_count;
|
|
514
649
|
this.#want_settings.resolution = this.resolution;
|
|
515
650
|
this.#want_settings.frame = this.#frame;
|
|
516
651
|
this.#want_settings.key_count = this.#key_count;
|
|
517
652
|
|
|
653
|
+
// the hits' wants read the last frame's rays, each naming its probe
|
|
654
|
+
const want_hits = this.#want_hits_settings;
|
|
655
|
+
|
|
656
|
+
want_hits.cascade_count = this.cascade_count;
|
|
657
|
+
want_hits.resolution = this.resolution;
|
|
658
|
+
want_hits.key_count = this.#key_count;
|
|
659
|
+
|
|
518
660
|
this.#admit_command_settings.key_count = this.#key_count;
|
|
519
661
|
|
|
520
662
|
this.#admit_settings.capacity = this.#capacity;
|
|
521
663
|
this.#admit_settings.resolution = this.resolution;
|
|
522
664
|
this.#admit_settings.key_count = this.#key_count;
|
|
523
|
-
this.#admit_settings.
|
|
665
|
+
this.#admit_settings.frame = this.#frame;
|
|
524
666
|
|
|
525
667
|
this.#schedule_settings.capacity = this.#capacity;
|
|
526
668
|
this.#schedule_settings.key_count = this.#key_count;
|
|
527
669
|
this.#schedule_settings.trace_capacity = trace_capacity;
|
|
670
|
+
this.#schedule_settings.slack = Math.ceil(this.#capacity * PROBE_FREE_SLACK);
|
|
528
671
|
|
|
529
672
|
this.#due_settings.capacity = this.#capacity;
|
|
530
|
-
this.#due_settings.resolution = this.resolution;
|
|
531
673
|
this.#due_settings.trace_capacity = trace_capacity;
|
|
532
674
|
this.#due_settings.frame = this.#frame;
|
|
533
675
|
|
|
534
676
|
this.#trace_command_settings.trace_capacity = trace_capacity;
|
|
535
|
-
this.#trace_command_settings.rays_per_probe = rays_per_probe;
|
|
536
677
|
this.#trace_command_settings.radiance_resolution = this.radiance_resolution;
|
|
537
678
|
this.#trace_command_settings.depth_resolution = this.depth_resolution;
|
|
538
679
|
|
|
680
|
+
const order = this.#order_settings;
|
|
681
|
+
|
|
682
|
+
order.trace_capacity = trace_capacity;
|
|
683
|
+
order.resolution = this.resolution;
|
|
684
|
+
order.axis_bits = Math.ceil(Math.log2(this.resolution));
|
|
685
|
+
|
|
686
|
+
// the order's key: the cascade above the Morton code of a lattice point in its window
|
|
687
|
+
assert.lessThanOrEqual(3 * order.axis_bits + Math.ceil(Math.log2(this.cascade_count)), 32, 'the order key fits a word');
|
|
688
|
+
|
|
689
|
+
this.#ray_counts_settings.trace_capacity = trace_capacity;
|
|
690
|
+
this.#ray_counts_settings.rays_per_probe = rays_per_probe;
|
|
691
|
+
this.#ray_counts_settings.rays_min = rays_min;
|
|
692
|
+
this.#ray_counts_settings.radiance_resolution = this.radiance_resolution;
|
|
693
|
+
|
|
694
|
+
this.#ray_layout_settings.trace_capacity = trace_capacity;
|
|
695
|
+
this.#ray_layout_settings.ray_budget = ray_budget;
|
|
696
|
+
|
|
697
|
+
const guide = this.#guide_settings;
|
|
698
|
+
|
|
699
|
+
guide.trace_capacity = trace_capacity;
|
|
700
|
+
guide.rays_per_probe = rays_per_probe;
|
|
701
|
+
guide.radiance_resolution = this.radiance_resolution;
|
|
702
|
+
guide.radiance_tiles_per_row = this.#radiance.tiles_per_row;
|
|
703
|
+
|
|
539
704
|
// past the coarsest window's far corner every ray has left the clipmap
|
|
540
705
|
const coarsest = brick_clipmap.cascade_count - 1;
|
|
541
706
|
|
|
@@ -548,9 +713,6 @@ export class GPUProbeClipmap {
|
|
|
548
713
|
this.#relocate_settings.trace_capacity = trace_capacity;
|
|
549
714
|
this.#relocate_settings.brick_cascade_count = brick_clipmap.cascade_count;
|
|
550
715
|
|
|
551
|
-
this.#shade_settings.trace_capacity = trace_capacity;
|
|
552
|
-
this.#shade_settings.rays_per_probe = rays_per_probe;
|
|
553
|
-
|
|
554
716
|
const accumulate = this.#accumulate_settings;
|
|
555
717
|
|
|
556
718
|
accumulate.trace_capacity = trace_capacity;
|
|
@@ -559,13 +721,17 @@ export class GPUProbeClipmap {
|
|
|
559
721
|
accumulate.depth_resolution = this.depth_resolution;
|
|
560
722
|
accumulate.radiance_tiles_per_row = this.#radiance.tiles_per_row;
|
|
561
723
|
accumulate.depth_tiles_per_row = this.#depth.tiles_per_row;
|
|
562
|
-
accumulate.
|
|
563
|
-
accumulate.
|
|
724
|
+
accumulate.frame = this.#frame;
|
|
725
|
+
accumulate.response_frames = response_frames;
|
|
564
726
|
|
|
565
727
|
this.#project_settings.trace_capacity = trace_capacity;
|
|
728
|
+
this.#project_settings.rays_per_probe = rays_per_probe;
|
|
566
729
|
this.#project_settings.radiance_resolution = this.radiance_resolution;
|
|
567
730
|
this.#project_settings.depth_resolution = this.depth_resolution;
|
|
568
|
-
this.#project_settings.
|
|
731
|
+
this.#project_settings.frame = this.#frame;
|
|
732
|
+
this.#project_settings.rays_min = rays_min;
|
|
733
|
+
this.#project_settings.rays_max = rays_max;
|
|
734
|
+
this.#project_settings.response_frames = response_frames;
|
|
569
735
|
|
|
570
736
|
const publish = this.#publish_settings;
|
|
571
737
|
|
|
@@ -598,12 +764,34 @@ export class GPUProbeClipmap {
|
|
|
598
764
|
|
|
599
765
|
pass.make_side_effect();
|
|
600
766
|
|
|
767
|
+
// the local lights the rays' hits take, clustered over the bricks' cascades, where every hit is (§8.7)
|
|
768
|
+
const coarsest_cell = brick_clipmap.cell_size(coarsest);
|
|
769
|
+
|
|
770
|
+
for (let axis = 0; axis < 3; axis++) {
|
|
771
|
+
const corner = brick_clipmap.corner(coarsest, axis);
|
|
772
|
+
|
|
773
|
+
this.#clusters_min[axis] = corner * coarsest_cell;
|
|
774
|
+
this.#clusters_max[axis] = (corner + brick_clipmap.resolution) * coarsest_cell;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
const clusters = graph_build_world_light_clusters({
|
|
778
|
+
graph,
|
|
779
|
+
lights: scene.lights,
|
|
780
|
+
levels: graph_import_buffer(graph, brick_clipmap.levels, "probe_brick_levels"),
|
|
781
|
+
cascade_count: brick_clipmap.cascade_count,
|
|
782
|
+
border: 0,
|
|
783
|
+
coarsest_min: this.#clusters_min,
|
|
784
|
+
coarsest_max: this.#clusters_max,
|
|
785
|
+
});
|
|
786
|
+
|
|
601
787
|
// the frame's updates, once its bricks are built
|
|
602
788
|
const update_data = this.#update_data;
|
|
603
789
|
const update = graph.add("Probe Clipmap Update", update_data, this.#execute_update);
|
|
604
790
|
|
|
605
791
|
update_data.counters = update.write(data.counters);
|
|
606
792
|
update_data.bricks = update.read(bricks);
|
|
793
|
+
update_data.world_cluster_lookup = update.read(clusters.lookup);
|
|
794
|
+
update_data.world_cluster_data = update.read(clusters.data);
|
|
607
795
|
|
|
608
796
|
update.make_side_effect();
|
|
609
797
|
|
|
@@ -620,6 +808,9 @@ export class GPUProbeClipmap {
|
|
|
620
808
|
} finally {
|
|
621
809
|
reference.release();
|
|
622
810
|
}
|
|
811
|
+
})
|
|
812
|
+
.catch(() => {
|
|
813
|
+
// a reading lost to a timeout or a lost device: the count runs on, and a later reading carries it
|
|
623
814
|
});
|
|
624
815
|
|
|
625
816
|
this.#frame++;
|
|
@@ -667,6 +858,8 @@ export class GPUProbeClipmap {
|
|
|
667
858
|
this.#depth.ensure_capacity(capacity);
|
|
668
859
|
|
|
669
860
|
this.#states = this.#regrow(this.#states, 'probe states', 8 * capacity);
|
|
861
|
+
this.#estimators = this.#regrow(this.#estimators, 'probe estimators', 16 * this.radiance_resolution * this.radiance_resolution * capacity);
|
|
862
|
+
this.#requests = this.#regrow(this.#requests, 'probe requests', PROBE_REQUEST_STRUCT.size * capacity);
|
|
670
863
|
this.#records = this.#regrow(this.#records, 'probe records', PROBE_RECORD_STRUCT.size * capacity);
|
|
671
864
|
this.#free = this.#regrow(this.#free, 'probe free list', 4 * capacity);
|
|
672
865
|
this.#active[0] = this.#regrow(this.#active[0], 'probe active 0', LIST_HEADER_BYTES + 4 * capacity);
|
|
@@ -688,25 +881,46 @@ export class GPUProbeClipmap {
|
|
|
688
881
|
this.#trace?.destroy();
|
|
689
882
|
this.#origins?.destroy();
|
|
690
883
|
this.#maps?.destroy();
|
|
884
|
+
this.#guide?.destroy();
|
|
691
885
|
this.#projection?.destroy();
|
|
886
|
+
this.#ray_counts?.destroy();
|
|
887
|
+
this.#ray_requests?.destroy();
|
|
888
|
+
this.#ray_count_sums?.destroy();
|
|
889
|
+
this.#ray_request_sums?.destroy();
|
|
890
|
+
this.#ray_sums?.destroy();
|
|
891
|
+
this.#ray_scan_spine?.destroy();
|
|
892
|
+
this.#ray_scan_command?.destroy();
|
|
692
893
|
this.#trace_capacity = trace_capacity;
|
|
693
894
|
this.#trace = this.#create_buffer('probe trace', LIST_HEADER_BYTES + 4 * trace_capacity, GPUBufferUsage.COPY_DST);
|
|
895
|
+
// the scan reads and writes whole blocks of four
|
|
896
|
+
const counts_size = LIST_HEADER_BYTES + 16 * Math.max(1, Math.ceil(trace_capacity / 4));
|
|
897
|
+
this.#ray_counts = this.#create_buffer('probe ray counts', counts_size, 0);
|
|
898
|
+
this.#ray_requests = this.#create_buffer('probe ray requests', counts_size, 0);
|
|
899
|
+
this.#ray_count_sums = this.#create_buffer('probe ray count sums', counts_size, 0);
|
|
900
|
+
this.#ray_request_sums = this.#create_buffer('probe ray request sums', counts_size, 0);
|
|
901
|
+
this.#ray_sums = this.#create_buffer('probe ray sums', counts_size, 0);
|
|
902
|
+
this.#ray_scan_spine = this.#create_buffer('probe ray scan spine', 8 * Math.ceil(trace_capacity / PREFIX_SCAN_CSDLDF_PARTITION_SIZE), GPUBufferUsage.COPY_DST);
|
|
903
|
+
this.#ray_scan_command = this.#create_buffer('probe ray scan command', 12, GPUBufferUsage.INDIRECT);
|
|
694
904
|
this.#origins = this.#create_buffer('probe origins', 16 * trace_capacity, 0);
|
|
695
905
|
this.#maps = this.#create_buffer('probe maps', 4 * probe_clipmap_maps_words(this.radiance_resolution, this.depth_resolution) * trace_capacity, 0);
|
|
906
|
+
this.#guide = this.#create_buffer('probe guide', 4 * probe_clipmap_guide_words(this.radiance_resolution) * trace_capacity, 0);
|
|
696
907
|
this.#projection = this.#create_buffer('probe projection', PROBE_PROJECTION_ROW_STRUCT.size * this.radiance_resolution * trace_capacity, 0);
|
|
697
908
|
}
|
|
698
909
|
|
|
699
910
|
/**
|
|
700
|
-
* Room for `ray_count` rays, U·R
|
|
911
|
+
* Room for `ray_count` rays, U·R, which the ray settings size, to the next whole workgroup: the last
|
|
912
|
+
* workgroup's threads past the frame's last ray write a record of no ray.
|
|
701
913
|
*/
|
|
702
914
|
#ensure_rays(ray_count) {
|
|
703
|
-
|
|
915
|
+
const room = Math.ceil(ray_count / PROBE_THREAD_WORKGROUP_SIZE) * PROBE_THREAD_WORKGROUP_SIZE;
|
|
916
|
+
|
|
917
|
+
if (this.#rays !== null && this.#ray_capacity >= room) {
|
|
704
918
|
return;
|
|
705
919
|
}
|
|
706
920
|
|
|
707
921
|
this.#rays?.destroy();
|
|
708
|
-
this.#ray_capacity =
|
|
709
|
-
this.#rays = this.#create_buffer('probe rays', PROBE_RAY_STRUCT.size *
|
|
922
|
+
this.#ray_capacity = room;
|
|
923
|
+
this.#rays = this.#create_buffer('probe rays', PROBE_RAY_STRUCT.size * room, 0);
|
|
710
924
|
}
|
|
711
925
|
|
|
712
926
|
#execute_lifetime = (data, resources, context) => {
|
|
@@ -753,10 +967,10 @@ export class GPUProbeClipmap {
|
|
|
753
967
|
|
|
754
968
|
this.#parity = 1 - this.#parity;
|
|
755
969
|
|
|
756
|
-
// the frame's lists start empty, and no point is wanted yet
|
|
970
|
+
// the frame's lists start empty, and no point is wanted yet; the trace list holds the last frame's
|
|
971
|
+
// updates until the hits' wants have read their rays
|
|
757
972
|
encoder.clearBuffer(active_write, 0, 4);
|
|
758
973
|
encoder.clearBuffer(this.#wanted, 0, 4);
|
|
759
|
-
encoder.clearBuffer(this.#trace, 0, 4);
|
|
760
974
|
encoder.clearBuffer(this.#wanted_bits);
|
|
761
975
|
|
|
762
976
|
b.probe_levels = this.#levels;
|
|
@@ -771,6 +985,7 @@ export class GPUProbeClipmap {
|
|
|
771
985
|
b.probe_wanted_bits = this.#wanted_bits;
|
|
772
986
|
b.probe_trace = this.#trace;
|
|
773
987
|
b.probe_dispatch = this.#dispatch;
|
|
988
|
+
b.probe_eviction = this.#eviction;
|
|
774
989
|
|
|
775
990
|
b.settings = this.#retire_settings;
|
|
776
991
|
|
|
@@ -794,6 +1009,21 @@ export class GPUProbeClipmap {
|
|
|
794
1009
|
bindings: b,
|
|
795
1010
|
});
|
|
796
1011
|
|
|
1012
|
+
// the last frame's hits want the probes their bounce reads, through the launch their rays had,
|
|
1013
|
+
// before the frame's trace command writes it over
|
|
1014
|
+
b.probe_origins = this.#origins;
|
|
1015
|
+
b.probe_rays = this.#rays;
|
|
1016
|
+
b.settings = this.#want_hits_settings;
|
|
1017
|
+
|
|
1018
|
+
shader_probe_clipmap_want_hits.dispatchIndirect({
|
|
1019
|
+
encoder,
|
|
1020
|
+
bindings: b,
|
|
1021
|
+
command: this.#dispatch,
|
|
1022
|
+
command_offset: 4 * PROBE_DISPATCH_RAYS,
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
encoder.clearBuffer(this.#trace, 0, 4);
|
|
1026
|
+
|
|
797
1027
|
b.settings = this.#admit_command_settings;
|
|
798
1028
|
|
|
799
1029
|
shader_probe_clipmap_admit_command.dispatch({ encoder, bindings: b });
|
|
@@ -827,11 +1057,74 @@ export class GPUProbeClipmap {
|
|
|
827
1057
|
});
|
|
828
1058
|
}
|
|
829
1059
|
|
|
1060
|
+
b.probe_ray_counts = this.#ray_counts;
|
|
1061
|
+
b.probe_ray_requests = this.#ray_requests;
|
|
1062
|
+
b.probe_ray_sums = this.#ray_sums;
|
|
830
1063
|
b.settings = this.#trace_command_settings;
|
|
831
1064
|
|
|
832
1065
|
shader_probe_clipmap_trace_command.dispatch({ encoder, bindings: b });
|
|
1066
|
+
|
|
1067
|
+
// the list in its probes' order, before anything reads a probe's place in it
|
|
1068
|
+
b.settings = this.#order_settings;
|
|
1069
|
+
|
|
1070
|
+
shader_probe_clipmap_order.dispatchIndirect({
|
|
1071
|
+
encoder,
|
|
1072
|
+
bindings: b,
|
|
1073
|
+
command: this.#dispatch,
|
|
1074
|
+
command_offset: 4 * PROBE_DISPATCH_ORDER,
|
|
1075
|
+
});
|
|
1076
|
+
|
|
1077
|
+
// the frame's rays: each listed probe's count and request, their scans, the layout that scales the
|
|
1078
|
+
// requests into the budget, and the command over its last sum
|
|
1079
|
+
b.probe_requests = this.#requests;
|
|
1080
|
+
b.settings = this.#ray_counts_settings;
|
|
1081
|
+
|
|
1082
|
+
shader_probe_clipmap_ray_counts.dispatchIndirect({
|
|
1083
|
+
encoder,
|
|
1084
|
+
bindings: b,
|
|
1085
|
+
command: this.#dispatch,
|
|
1086
|
+
command_offset: 4 * PROBE_DISPATCH_TRACED,
|
|
1087
|
+
});
|
|
1088
|
+
|
|
1089
|
+
this.#scan(encoder, this.#ray_counts, this.#ray_count_sums);
|
|
1090
|
+
this.#scan(encoder, this.#ray_requests, this.#ray_request_sums);
|
|
1091
|
+
|
|
1092
|
+
b.probe_ray_count_sums = this.#ray_count_sums;
|
|
1093
|
+
b.probe_ray_request_sums = this.#ray_request_sums;
|
|
1094
|
+
b.settings = this.#ray_layout_settings;
|
|
1095
|
+
|
|
1096
|
+
shader_probe_clipmap_ray_layout.dispatchIndirect({
|
|
1097
|
+
encoder,
|
|
1098
|
+
bindings: b,
|
|
1099
|
+
command: this.#dispatch,
|
|
1100
|
+
command_offset: 4 * PROBE_DISPATCH_TRACED,
|
|
1101
|
+
});
|
|
1102
|
+
|
|
1103
|
+
shader_probe_clipmap_ray_command.dispatch({ encoder, bindings: b });
|
|
833
1104
|
};
|
|
834
1105
|
|
|
1106
|
+
/**
|
|
1107
|
+
* Inclusive sums of a listed probe's counts, `{count, elements}`, into `output`: the CSDLDF scan's
|
|
1108
|
+
* shaders, its spine cleared first, since its flags are read across workgroups.
|
|
1109
|
+
*
|
|
1110
|
+
* @param {GPUCommandEncoder} encoder
|
|
1111
|
+
* @param {GPUBuffer} input
|
|
1112
|
+
* @param {GPUBuffer} output
|
|
1113
|
+
*/
|
|
1114
|
+
#scan(encoder, input, output) {
|
|
1115
|
+
const scan = this.#ray_scan_bindings;
|
|
1116
|
+
|
|
1117
|
+
scan.scan_in = input;
|
|
1118
|
+
scan.scan_out = output;
|
|
1119
|
+
scan.spine = this.#ray_scan_spine;
|
|
1120
|
+
scan.command = this.#ray_scan_command;
|
|
1121
|
+
|
|
1122
|
+
encoder.clearBuffer(this.#ray_scan_spine);
|
|
1123
|
+
|
|
1124
|
+
shader_prefix_scan_csdldf_prepare.dispatch({ encoder, bindings: scan });
|
|
1125
|
+
shader_prefix_scan_csdldf.dispatchIndirect({ encoder, bindings: scan, command: this.#ray_scan_command });
|
|
1126
|
+
}
|
|
1127
|
+
|
|
835
1128
|
#execute_update = (data, resources, context) => {
|
|
836
1129
|
const encoder = context.encoder;
|
|
837
1130
|
const b = this.#bindings;
|
|
@@ -840,6 +1133,7 @@ export class GPUProbeClipmap {
|
|
|
840
1133
|
|
|
841
1134
|
b.probe_counters = resources.get(data.counters);
|
|
842
1135
|
b.probe_origins = this.#origins;
|
|
1136
|
+
b.probe_ray_sums = this.#ray_sums;
|
|
843
1137
|
b.settings = this.#relocate_settings;
|
|
844
1138
|
|
|
845
1139
|
shader_probe_clipmap_relocate.dispatchIndirect({
|
|
@@ -849,6 +1143,20 @@ export class GPUProbeClipmap {
|
|
|
849
1143
|
command_offset: 4 * PROBE_DISPATCH_TRACED,
|
|
850
1144
|
});
|
|
851
1145
|
|
|
1146
|
+
// the guide each probe's rays follow, from its history as the atlas holds it
|
|
1147
|
+
b.probe_radiance = this.#radiance.texture_at(0).obtainView();
|
|
1148
|
+
b.probe_guide = this.#guide;
|
|
1149
|
+
b.settings = this.#guide_settings;
|
|
1150
|
+
|
|
1151
|
+
for (const shader of [shader_probe_clipmap_guide_rows, shader_probe_clipmap_guide_weights, shader_probe_clipmap_guide_starts]) {
|
|
1152
|
+
shader.dispatchIndirect({
|
|
1153
|
+
encoder,
|
|
1154
|
+
bindings: b,
|
|
1155
|
+
command: this.#dispatch,
|
|
1156
|
+
command_offset: 4 * PROBE_DISPATCH_ROWS,
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
|
|
852
1160
|
const scene = this.#scene;
|
|
853
1161
|
const lights = scene.lights;
|
|
854
1162
|
|
|
@@ -877,7 +1185,6 @@ export class GPUProbeClipmap {
|
|
|
877
1185
|
b.materials = this.#materials.buffer_materials;
|
|
878
1186
|
b.texture_means = this.#materials.buffer_texture_means;
|
|
879
1187
|
b.tEnvironment = lights.environment.obtainView();
|
|
880
|
-
b.settings = this.#shade_settings;
|
|
881
1188
|
|
|
882
1189
|
shader_probe_clipmap_shade.dispatchIndirect({
|
|
883
1190
|
encoder,
|
|
@@ -886,12 +1193,28 @@ export class GPUProbeClipmap {
|
|
|
886
1193
|
command_offset: 4 * PROBE_DISPATCH_RAYS,
|
|
887
1194
|
});
|
|
888
1195
|
|
|
1196
|
+
// the light each hit takes from beyond the trace: one of its cell's local lights through the bricks, and
|
|
1197
|
+
// the next bounce from last frame's probes
|
|
1198
|
+
this.write_sampling_bindings(b);
|
|
1199
|
+
b.world_cluster_lookup = resources.get(data.world_cluster_lookup);
|
|
1200
|
+
b.world_cluster_data = resources.get(data.world_cluster_data);
|
|
1201
|
+
b.settings = this.#trace_settings;
|
|
1202
|
+
|
|
1203
|
+
shader_probe_clipmap_light.dispatchIndirect({
|
|
1204
|
+
encoder,
|
|
1205
|
+
bindings: b,
|
|
1206
|
+
command: this.#dispatch,
|
|
1207
|
+
command_offset: 4 * PROBE_DISPATCH_RAYS,
|
|
1208
|
+
});
|
|
1209
|
+
|
|
889
1210
|
// the probes' maps from their rays, against the atlases as they were; their SH and kind from the
|
|
890
1211
|
// maps; then the atlases from the maps
|
|
891
1212
|
b.probe_maps = this.#maps;
|
|
892
1213
|
b.probe_projection = this.#projection;
|
|
1214
|
+
b.probe_requests = this.#requests;
|
|
893
1215
|
b.probe_radiance = this.#radiance.texture_at(0).obtainView();
|
|
894
1216
|
b.probe_depth = this.#depth.texture_at(0).obtainView();
|
|
1217
|
+
b.probe_estimators = this.#estimators;
|
|
895
1218
|
b.settings = this.#accumulate_settings;
|
|
896
1219
|
|
|
897
1220
|
shader_probe_clipmap_accumulate.dispatchIndirect({
|
|
@@ -975,7 +1298,7 @@ export class GPUProbeClipmap {
|
|
|
975
1298
|
this.#radiance.destroy();
|
|
976
1299
|
this.#depth.destroy();
|
|
977
1300
|
|
|
978
|
-
for (const buffer of [this.#levels, this.#states, this.#records, this.#free, this.#counters, this.#dispatch, ...this.#active, this.#wanted, this.#wanted_bits, this.#trace, this.#origins, this.#maps, this.#projection, this.#rays]) {
|
|
1301
|
+
for (const buffer of [this.#levels, this.#states, this.#estimators, this.#records, this.#free, this.#counters, this.#dispatch, this.#eviction, ...this.#active, this.#wanted, this.#wanted_bits, this.#trace, this.#origins, this.#maps, this.#guide, this.#projection, this.#requests, this.#ray_counts, this.#ray_requests, this.#ray_count_sums, this.#ray_request_sums, this.#ray_sums, this.#ray_scan_spine, this.#ray_scan_command, this.#rays, this.#sampling]) {
|
|
979
1302
|
buffer?.destroy();
|
|
980
1303
|
}
|
|
981
1304
|
}
|