@woosh/meep-engine 3.58.0 → 3.59.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 +178 -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 +360 -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 +94 -38
- 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/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/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_clipmap/GPUProbeClipmapGI.d.ts +25 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +126 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +832 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_CLIPMAP.d.ts +7 -0
- 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 +8 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +16 -0
- 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 +9 -0
- 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_INSTANCE_STRUCT.d.ts +0 -7
- 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 +0 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_instance.d.ts +2 -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 +5 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_provider.js +13 -22
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts +99 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGEO_BRICK.js +139 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts +65 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/VGeoBrickProvider.js +393 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts +17 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_box.js +36 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts +29 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_pair.js +108 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts +31 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_texel.js +113 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts +36 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/chunk_vgeo_brick_triangle.js +85 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts +23 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_distance.js +273 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_gather.js +151 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_traverse.js +133 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts +22 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/vgeo/shader_vgeo_brick_wait.js +135 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +20 -6
- 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 +152 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +7 -0
- 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 +8 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +14 -2
- 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 +50 -5
- 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 +188 -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 +4 -0
- 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 +26 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.d.ts +3 -0
- 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 +8 -1
- 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 +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_due.js +1 -1
- 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 +26 -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 +210 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.d.ts +3 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_retire.js +3 -3
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_shade.d.ts +2 -1
- 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 +5 -1
- 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 +3 -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 +27 -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/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/loader/gltf/tiny-gltf.d.ts +1 -1
- 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/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/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/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/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/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/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
|
@@ -13,9 +13,9 @@ import { PARTICLE_VALUE_TYPES } from "./ParticleValueType.js";
|
|
|
13
13
|
* The engine's generic {@link ../../../../core/model/node-graph/node/NodeDescription.js} parameter
|
|
14
14
|
* mechanism is not used for these. Its parameters are keyed by a numeric id and typed as
|
|
15
15
|
* number / string / boolean, and a particle node's are keyed by name and are vectors, layout
|
|
16
|
-
*
|
|
17
|
-
* scalar types and lose what they mean, they are described here in their own terms, and the
|
|
18
|
-
* renders a control per kind.
|
|
16
|
+
* particle field references, ISA enum members and swizzle patterns. Rather than flatten them into
|
|
17
|
+
* three scalar types and lose what they mean, they are described here in their own terms, and the
|
|
18
|
+
* editor renders a control per kind.
|
|
19
19
|
*
|
|
20
20
|
* Living beside the node library rather than in the editor is what keeps the two honest:
|
|
21
21
|
* {@link ./particle_node_parameters.spec.js} asserts that every registered type is described here,
|
|
@@ -31,8 +31,12 @@ export const PARTICLE_PARAMETER_KIND = Object.freeze({
|
|
|
31
31
|
VECTOR: "vector",
|
|
32
32
|
/** four floats that are a colour: red, green, blue and alpha, each in `[0, 1]` */
|
|
33
33
|
COLOR: "color",
|
|
34
|
-
/** the name of
|
|
35
|
-
|
|
34
|
+
/** the name of a particle field in the effect's {@link ../layout/ParticleLayout.js} */
|
|
35
|
+
PARTICLE_FIELD: "particle_field",
|
|
36
|
+
/** the name of an emitter field in the effect's emitter layout */
|
|
37
|
+
EMITTER_FIELD: "emitter_field",
|
|
38
|
+
/** the name of a global field the effect imports */
|
|
39
|
+
GLOBAL_FIELD: "global_field",
|
|
36
40
|
/** one member of {@link PARTICLE_NODE_PARAMETER_SCHEMA}'s `options` map */
|
|
37
41
|
ENUM: "enum",
|
|
38
42
|
/** one to four lane selectors in `[0, 4)`, one per output lane */
|
|
@@ -55,8 +59,10 @@ export const PARTICLE_PARAMETER_KIND = Object.freeze({
|
|
|
55
59
|
* @typedef {object} ParticleNodeParameter
|
|
56
60
|
* @property {string} name the key the node's `emit` reads off `context.parameters`
|
|
57
61
|
* @property {string} kind a {@link PARTICLE_PARAMETER_KIND}
|
|
58
|
-
* @property {*} [default] the value a freshly created node takes; absent for
|
|
59
|
-
* {@link PARTICLE_PARAMETER_KIND.
|
|
62
|
+
* @property {*} [default] the value a freshly created node takes; absent for the field kinds
|
|
63
|
+
* ({@link PARTICLE_PARAMETER_KIND.PARTICLE_FIELD}, {@link PARTICLE_PARAMETER_KIND.EMITTER_FIELD},
|
|
64
|
+
* {@link PARTICLE_PARAMETER_KIND.GLOBAL_FIELD}), whose default can only come from the effect's
|
|
65
|
+
* layouts
|
|
60
66
|
* @property {Object<string, *>} [options] for {@link PARTICLE_PARAMETER_KIND.ENUM}: label -> value
|
|
61
67
|
* @property {boolean} [alpha] for {@link PARTICLE_PARAMETER_KIND.GRADIENT}: whether the node reads
|
|
62
68
|
* the alpha channel. Both gradients *store* one — see {@link ./particle_ramp.js} — so that a
|
|
@@ -132,10 +138,22 @@ export const PARTICLE_NODE_PARAMETER_SCHEMA = Object.freeze({
|
|
|
132
138
|
description: "Which per-invocation value the host shader hands the VM.",
|
|
133
139
|
}],
|
|
134
140
|
|
|
135
|
-
|
|
141
|
+
particleField: [{
|
|
136
142
|
name: "name",
|
|
137
|
-
kind: PARTICLE_PARAMETER_KIND.
|
|
138
|
-
description: "The
|
|
143
|
+
kind: PARTICLE_PARAMETER_KIND.PARTICLE_FIELD,
|
|
144
|
+
description: "The particle field to read, by name in the effect's layout.",
|
|
145
|
+
}],
|
|
146
|
+
|
|
147
|
+
emitterField: [{
|
|
148
|
+
name: "name",
|
|
149
|
+
kind: PARTICLE_PARAMETER_KIND.EMITTER_FIELD,
|
|
150
|
+
description: "The emitter field to read, by name in the effect's emitter layout.",
|
|
151
|
+
}],
|
|
152
|
+
|
|
153
|
+
globalField: [{
|
|
154
|
+
name: "name",
|
|
155
|
+
kind: PARTICLE_PARAMETER_KIND.GLOBAL_FIELD,
|
|
156
|
+
description: "The global field to read, by name among the ones the effect imports.",
|
|
139
157
|
}],
|
|
140
158
|
|
|
141
159
|
// Four is the width a draw had before it had one — as wide as anything could read it — so an
|
|
@@ -149,10 +167,10 @@ export const PARTICLE_NODE_PARAMETER_SCHEMA = Object.freeze({
|
|
|
149
167
|
description: "How many independent draws, one per lane: a scalar, or a vector of them.",
|
|
150
168
|
}],
|
|
151
169
|
|
|
152
|
-
|
|
170
|
+
setParticleField: [{
|
|
153
171
|
name: "name",
|
|
154
|
-
kind: PARTICLE_PARAMETER_KIND.
|
|
155
|
-
description: "The
|
|
172
|
+
kind: PARTICLE_PARAMETER_KIND.PARTICLE_FIELD,
|
|
173
|
+
description: "The particle field to write, by name in the effect's layout.",
|
|
156
174
|
}],
|
|
157
175
|
|
|
158
176
|
compare: [{
|
|
@@ -261,25 +279,39 @@ export function particle_node_parameters(type) {
|
|
|
261
279
|
* fill anything in — which is the difference between a palette that drops working nodes into a
|
|
262
280
|
* graph and one that drops broken ones.
|
|
263
281
|
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
* come back as the empty string, which will not
|
|
267
|
-
* either pass a layout or fill the name in.
|
|
282
|
+
* Field parameters have no default of their own: the only sensible one is a name from the effect
|
|
283
|
+
* being authored, so the layout the field lives in has to be supplied, and the default is its
|
|
284
|
+
* first field. With no layout (or an empty one) they come back as the empty string, which will not
|
|
285
|
+
* compile — the caller is expected to know that and either pass a layout or fill the name in.
|
|
268
286
|
*
|
|
269
287
|
* @param {string} type node type name
|
|
270
288
|
* @param {object} [context]
|
|
271
289
|
* @param {import("../layout/ParticleLayout.js").ParticleLayout} [context.layout] the effect's
|
|
272
|
-
*
|
|
290
|
+
* particle field schema, for particle field parameters
|
|
291
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|null} [context.emitter_layout] the
|
|
292
|
+
* effect's emitter field schema, for emitter field parameters
|
|
293
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|null} [context.global_layout] the
|
|
294
|
+
* global fields the effect imports, for global field parameters
|
|
273
295
|
* @returns {object}
|
|
274
296
|
*/
|
|
275
|
-
export function particle_node_default_parameters(type, { layout } = {}) {
|
|
297
|
+
export function particle_node_default_parameters(type, { layout, emitter_layout, global_layout } = {}) {
|
|
276
298
|
const result = {};
|
|
277
299
|
|
|
278
|
-
const
|
|
300
|
+
const first_particle_field = layout === undefined ? undefined : layout.fields.keys().next().value;
|
|
301
|
+
const first_emitter_field = emitter_layout === undefined || emitter_layout === null
|
|
302
|
+
? undefined
|
|
303
|
+
: emitter_layout.fields.keys().next().value;
|
|
304
|
+
const first_global_field = global_layout === undefined || global_layout === null
|
|
305
|
+
? undefined
|
|
306
|
+
: global_layout.fields.keys().next().value;
|
|
279
307
|
|
|
280
308
|
for (const parameter of particle_node_parameters(type)) {
|
|
281
|
-
if (parameter.kind === PARTICLE_PARAMETER_KIND.
|
|
282
|
-
result[parameter.name] =
|
|
309
|
+
if (parameter.kind === PARTICLE_PARAMETER_KIND.PARTICLE_FIELD) {
|
|
310
|
+
result[parameter.name] = first_particle_field ?? "";
|
|
311
|
+
} else if (parameter.kind === PARTICLE_PARAMETER_KIND.EMITTER_FIELD) {
|
|
312
|
+
result[parameter.name] = first_emitter_field ?? "";
|
|
313
|
+
} else if (parameter.kind === PARTICLE_PARAMETER_KIND.GLOBAL_FIELD) {
|
|
314
|
+
result[parameter.name] = first_global_field ?? "";
|
|
283
315
|
} else {
|
|
284
316
|
// A default that is not a number is mutable, and a node writes through to its own: a
|
|
285
317
|
// shared one would make every node of the type the same node, and editing one gradient
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"particle_node_presentation.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/graph/particle_node_presentation.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"particle_node_presentation.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/graph/particle_node_presentation.js"],"names":[],"mappings":"AAmVA;;;;;;;GAOG;AACH,iDAHW,MAAM,GACJ;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAIvD;AAnTD;;;;;;;;GAQG;AACH;QAFiB,MAAM,GAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC;EAgSjE"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The library's own names are addresses — they are what a saved graph holds and what
|
|
6
6
|
* {@link ./ParticleNodeRegistry.js get_particle_node_description} looks a type up by — so they are
|
|
7
|
-
* terse and they do not change. `div`, `mad`, `
|
|
8
|
-
* "multiply-add" and "write
|
|
7
|
+
* terse and they do not change. `div`, `mad`, `setParticleField`. Nobody reads those as "divide",
|
|
8
|
+
* "multiply-add" and "write particle field" without translating, and an editor that shows only them
|
|
9
9
|
* makes every author do that translation on every node, every time.
|
|
10
10
|
*
|
|
11
11
|
* So the names stay what they are and this says what to draw instead. Kept out of the registry
|
|
@@ -66,10 +66,20 @@ export const PARTICLE_NODE_PRESENTATION = Object.freeze({
|
|
|
66
66
|
icon: "M6 7h12v10H6z M9 4v3 M15 4v3 M9 17v3 M15 17v3",
|
|
67
67
|
help: "a value the host provides — delta time, emitter position…",
|
|
68
68
|
},
|
|
69
|
-
|
|
70
|
-
label: "Read
|
|
69
|
+
particleField: {
|
|
70
|
+
label: "Read Particle Field",
|
|
71
71
|
icon: "M5 5v14 M8 12h11 M16 9l3 3-3 3",
|
|
72
|
-
help: "read one of this effect's
|
|
72
|
+
help: "read one of this effect's particle fields",
|
|
73
|
+
},
|
|
74
|
+
globalField: {
|
|
75
|
+
label: "Read Global Field",
|
|
76
|
+
icon: "M12 4a8 8 0 1 0 0 16a8 8 0 1 0 0-16 M4 12h16 M12 4c-3 3-3 13 0 16 M12 4c3 3 3 13 0 16",
|
|
77
|
+
help: "read one of the system's global fields, which every effect shares",
|
|
78
|
+
},
|
|
79
|
+
emitterField: {
|
|
80
|
+
label: "Read Emitter Field",
|
|
81
|
+
icon: "M4 5h5v14H4z M11 12h8 M16 9l3 3-3 3",
|
|
82
|
+
help: "read one of the fields every emitter of this effect carries for itself",
|
|
73
83
|
},
|
|
74
84
|
random: {
|
|
75
85
|
label: "Random",
|
|
@@ -78,10 +88,10 @@ export const PARTICLE_NODE_PRESENTATION = Object.freeze({
|
|
|
78
88
|
},
|
|
79
89
|
|
|
80
90
|
// --- sinks ---
|
|
81
|
-
|
|
82
|
-
label: "Write
|
|
91
|
+
setParticleField: {
|
|
92
|
+
label: "Write Particle Field",
|
|
83
93
|
icon: "M19 5v14 M5 12h11 M13 9l3 3-3 3",
|
|
84
|
-
help: "write
|
|
94
|
+
help: "write one of this effect's particle fields",
|
|
85
95
|
},
|
|
86
96
|
kill: {
|
|
87
97
|
label: "Kill Particle",
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
* @param {NodeGraph} graph
|
|
3
3
|
* @param {object} [context]
|
|
4
4
|
* @param {import("../layout/ParticleLayout.js").ParticleLayout} [context.layout] the effect's
|
|
5
|
-
*
|
|
5
|
+
* particle field schema; without it, particle field references cannot be checked and are left
|
|
6
|
+
* alone
|
|
7
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|null} [context.emitter_layout] the
|
|
8
|
+
* effect's emitter field schema; without it, emitter field references are left alone
|
|
9
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|null} [context.global_layout] the
|
|
10
|
+
* global fields the effect imports; without it, global field references are left alone
|
|
6
11
|
* @param {string} [context.phase] which {@link PARTICLE_GRAPH_PHASE} this graph is; without it the
|
|
7
12
|
* checks that only hold for one phase are skipped rather than guessed at
|
|
8
13
|
* @returns {ParticleGraphDiagnostic[]}
|
|
9
14
|
*/
|
|
10
|
-
export function validate_particle_graph(graph: NodeGraph, { layout, phase }?: {
|
|
15
|
+
export function validate_particle_graph(graph: NodeGraph, { layout, emitter_layout, global_layout, phase }?: {
|
|
11
16
|
layout?: import("../layout/ParticleLayout.js").ParticleLayout;
|
|
17
|
+
emitter_layout?: import("../layout/ParticleLayout.js").ParticleLayout | null;
|
|
18
|
+
global_layout?: import("../layout/ParticleLayout.js").ParticleLayout | null;
|
|
12
19
|
phase?: string;
|
|
13
20
|
}): ParticleGraphDiagnostic[];
|
|
14
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate_particle_graph.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/graph/validate_particle_graph.js"],"names":[],"mappings":"AA+DA
|
|
1
|
+
{"version":3,"file":"validate_particle_graph.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/graph/validate_particle_graph.js"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;GAaG;AACH;IAX0E,MAAM,GAArE,OAAO,6BAA6B,EAAE,cAAc;IAGgB,cAAc,GAAlF,OAAO,6BAA6B,EAAE,cAAc,GAAC,IAAI;IAEW,aAAa,GAAjF,OAAO,6BAA6B,EAAE,cAAc,GAAC,IAAI;IAExC,KAAK,GAAtB,MAAM;IAEJ,yBAAyB,CAoDrC;;;;;;;;mCAvES,MAAM;AA5ChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH;;;;;;;;GAQG;AACH;;;GAGG"}
|
|
@@ -65,12 +65,17 @@ export const PARTICLE_GRAPH_PHASE = Object.freeze({
|
|
|
65
65
|
* @param {NodeGraph} graph
|
|
66
66
|
* @param {object} [context]
|
|
67
67
|
* @param {import("../layout/ParticleLayout.js").ParticleLayout} [context.layout] the effect's
|
|
68
|
-
*
|
|
68
|
+
* particle field schema; without it, particle field references cannot be checked and are left
|
|
69
|
+
* alone
|
|
70
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|null} [context.emitter_layout] the
|
|
71
|
+
* effect's emitter field schema; without it, emitter field references are left alone
|
|
72
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|null} [context.global_layout] the
|
|
73
|
+
* global fields the effect imports; without it, global field references are left alone
|
|
69
74
|
* @param {string} [context.phase] which {@link PARTICLE_GRAPH_PHASE} this graph is; without it the
|
|
70
75
|
* checks that only hold for one phase are skipped rather than guessed at
|
|
71
76
|
* @returns {ParticleGraphDiagnostic[]}
|
|
72
77
|
*/
|
|
73
|
-
export function validate_particle_graph(graph, { layout, phase } = {}) {
|
|
78
|
+
export function validate_particle_graph(graph, { layout, emitter_layout = undefined, global_layout = undefined, phase } = {}) {
|
|
74
79
|
/** @type {ParticleGraphDiagnostic[]} */
|
|
75
80
|
const diagnostics = [];
|
|
76
81
|
|
|
@@ -103,13 +108,13 @@ export function validate_particle_graph(graph, { layout, phase } = {}) {
|
|
|
103
108
|
}
|
|
104
109
|
|
|
105
110
|
check_inputs(node, description, error);
|
|
106
|
-
check_parameters(node, description, layout, error);
|
|
111
|
+
check_parameters(node, description, layout, emitter_layout ?? undefined, global_layout ?? undefined, error);
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
if (sinks.length === 0) {
|
|
110
115
|
error(
|
|
111
116
|
-1,
|
|
112
|
-
"Nothing in this graph writes
|
|
117
|
+
"Nothing in this graph writes a particle field or kills a particle, so none of it runs. "
|
|
113
118
|
+ "Compilation starts from the sinks."
|
|
114
119
|
);
|
|
115
120
|
}
|
|
@@ -117,7 +122,7 @@ export function validate_particle_graph(graph, { layout, phase } = {}) {
|
|
|
117
122
|
report_duplicate_writes(sinks, layout, error);
|
|
118
123
|
report_missing_kill(sinks, phase, warning);
|
|
119
124
|
report_cycles(nodes, error);
|
|
120
|
-
report_conversions(graph, layout, diagnostics);
|
|
125
|
+
report_conversions(graph, layout, emitter_layout ?? undefined, global_layout ?? undefined, diagnostics);
|
|
121
126
|
|
|
122
127
|
return report_unreachable(nodes, sinks, diagnostics);
|
|
123
128
|
}
|
|
@@ -149,9 +154,11 @@ function check_inputs(node, description, error) {
|
|
|
149
154
|
* @param {NodeInstance} node
|
|
150
155
|
* @param {ParticleNodeDescription} description
|
|
151
156
|
* @param {import("../layout/ParticleLayout.js").ParticleLayout|undefined} layout
|
|
157
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|undefined} emitter_layout
|
|
158
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|undefined} global_layout
|
|
152
159
|
* @param {function(number, string):void} error
|
|
153
160
|
*/
|
|
154
|
-
function check_parameters(node, description, layout, error) {
|
|
161
|
+
function check_parameters(node, description, layout, emitter_layout, global_layout, error) {
|
|
155
162
|
if (is_particle_group_description(description)) {
|
|
156
163
|
// A group's configuration is its wiring and its boundary blocks are its edge; neither
|
|
157
164
|
// declares parameters, and what is inside a group was checked when the group was built.
|
|
@@ -176,12 +183,40 @@ function check_parameters(node, description, layout, error) {
|
|
|
176
183
|
}
|
|
177
184
|
|
|
178
185
|
switch (parameter.kind) {
|
|
179
|
-
case PARTICLE_PARAMETER_KIND.
|
|
186
|
+
case PARTICLE_PARAMETER_KIND.PARTICLE_FIELD:
|
|
180
187
|
if (layout !== undefined && !layout.has(value)) {
|
|
181
188
|
error(
|
|
182
189
|
node.id,
|
|
183
|
-
`'${value}' is not
|
|
184
|
-
+ `${Array.from(layout.
|
|
190
|
+
`'${value}' is not a particle field of this effect. It has: `
|
|
191
|
+
+ `${Array.from(layout.fields.keys()).join(", ") || "none"}.`
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
|
|
196
|
+
case PARTICLE_PARAMETER_KIND.EMITTER_FIELD:
|
|
197
|
+
if (emitter_layout === undefined) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (!emitter_layout.has(value)) {
|
|
202
|
+
error(
|
|
203
|
+
node.id,
|
|
204
|
+
`'${value}' is not an emitter field of this effect. It has: `
|
|
205
|
+
+ `${Array.from(emitter_layout.fields.keys()).join(", ") || "none"}.`
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
|
|
210
|
+
case PARTICLE_PARAMETER_KIND.GLOBAL_FIELD:
|
|
211
|
+
if (global_layout === undefined) {
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (!global_layout.has(value)) {
|
|
216
|
+
error(
|
|
217
|
+
node.id,
|
|
218
|
+
`'${value}' is not a global field this effect imports. It imports: `
|
|
219
|
+
+ `${Array.from(global_layout.fields.keys()).join(", ") || "none"}.`
|
|
185
220
|
);
|
|
186
221
|
}
|
|
187
222
|
break;
|
|
@@ -262,16 +297,17 @@ function check_parameters(node, description, layout, error) {
|
|
|
262
297
|
* them. What each check tests is what a sink *does* — store a value, end a life — and the library
|
|
263
298
|
* says which does what by type, so a sink added to it that also stores or also kills belongs here.
|
|
264
299
|
*/
|
|
265
|
-
const
|
|
300
|
+
const SET_PARTICLE_FIELD_NODE = "setParticleField";
|
|
266
301
|
const KILL_NODE = "kill";
|
|
267
302
|
|
|
268
303
|
/**
|
|
269
|
-
* A `
|
|
270
|
-
* straight-line: two stores to one
|
|
271
|
-
* which value survives — is whatever order the compiler's traversal happened to take. That is
|
|
272
|
-
* merge anyone asked for. Combining two values is a `select` or a `mix` in front of one
|
|
304
|
+
* A `setParticleField` node lowers to a store at its particle field's offset, and the program is
|
|
305
|
+
* straight-line: two stores to one particle field both run, and which of them is last — which is to
|
|
306
|
+
* say which value survives — is whatever order the compiler's traversal happened to take. That is
|
|
307
|
+
* not a merge anyone asked for. Combining two values is a `select` or a `mix` in front of one
|
|
308
|
+
* write.
|
|
273
309
|
*
|
|
274
|
-
* Reported against every node that writes the
|
|
310
|
+
* Reported against every node that writes the particle field, for the reason {@link report_cycles}
|
|
275
311
|
* reports against every node on a cycle: no one of them is the offender.
|
|
276
312
|
*
|
|
277
313
|
* Per graph, not per effect. Writing `age` in INIT and again in UPDATE is how a particle ages —
|
|
@@ -282,38 +318,38 @@ const KILL_NODE = "kill";
|
|
|
282
318
|
* @param {function(number, string):void} error
|
|
283
319
|
*/
|
|
284
320
|
function report_duplicate_writes(sinks, layout, error) {
|
|
285
|
-
/** @type {Map<*, NodeInstance[]>}
|
|
321
|
+
/** @type {Map<*, NodeInstance[]>} particle field -> the nodes writing it */
|
|
286
322
|
const writers = new Map();
|
|
287
323
|
|
|
288
324
|
for (const node of sinks) {
|
|
289
|
-
if (node.description.name !==
|
|
325
|
+
if (node.description.name !== SET_PARTICLE_FIELD_NODE) {
|
|
290
326
|
continue;
|
|
291
327
|
}
|
|
292
328
|
|
|
293
|
-
const
|
|
329
|
+
const particle_field = node.getParameterValue("name");
|
|
294
330
|
|
|
295
|
-
if (
|
|
296
|
-
// the node names no
|
|
331
|
+
if (particle_field === undefined) {
|
|
332
|
+
// the node names no particle field at all; check_parameters has already said so
|
|
297
333
|
continue;
|
|
298
334
|
}
|
|
299
335
|
|
|
300
|
-
if (layout !== undefined && !layout.has(
|
|
301
|
-
// The
|
|
302
|
-
// there is no race to report. What is wrong with these nodes is the name they
|
|
303
|
-
// check_parameters has already said that about each of them.
|
|
336
|
+
if (layout !== undefined && !layout.has(particle_field)) {
|
|
337
|
+
// The particle field does not exist, so neither store is one the compiler will ever
|
|
338
|
+
// emit and there is no race to report. What is wrong with these nodes is the name they
|
|
339
|
+
// carry, and check_parameters has already said that about each of them.
|
|
304
340
|
continue;
|
|
305
341
|
}
|
|
306
342
|
|
|
307
|
-
const written = writers.get(
|
|
343
|
+
const written = writers.get(particle_field);
|
|
308
344
|
|
|
309
345
|
if (written === undefined) {
|
|
310
|
-
writers.set(
|
|
346
|
+
writers.set(particle_field, [node]);
|
|
311
347
|
} else {
|
|
312
348
|
written.push(node);
|
|
313
349
|
}
|
|
314
350
|
}
|
|
315
351
|
|
|
316
|
-
for (const [
|
|
352
|
+
for (const [particle_field, written] of writers) {
|
|
317
353
|
if (written.length < 2) {
|
|
318
354
|
continue;
|
|
319
355
|
}
|
|
@@ -321,9 +357,9 @@ function report_duplicate_writes(sinks, layout, error) {
|
|
|
321
357
|
for (const node of written) {
|
|
322
358
|
error(
|
|
323
359
|
node.id,
|
|
324
|
-
`${written.length} nodes write '${
|
|
360
|
+
`${written.length} nodes write '${particle_field}' in this phase, and nothing orders them. `
|
|
325
361
|
+ "Every store runs, so the value that survives is whichever one the compiler reaches "
|
|
326
|
-
+ "last. Combine them with a 'select' or a 'mix' and write the
|
|
362
|
+
+ "last. Combine them with a 'select' or a 'mix' and write the particle field once."
|
|
327
363
|
);
|
|
328
364
|
}
|
|
329
365
|
}
|
|
@@ -362,7 +398,7 @@ function report_missing_kill(sinks, phase, warning) {
|
|
|
362
398
|
/**
|
|
363
399
|
* A value wired into a port that reads it as a different shape is converted on the way in — a
|
|
364
400
|
* wider vector keeps its leading lanes, a narrower one reads zero past its content — and each such
|
|
365
|
-
* conversion is worth a word, because a `vec4` literal feeding a three-component
|
|
401
|
+
* conversion is worth a word, because a `vec4` literal feeding a three-component particle field is
|
|
366
402
|
* either a slip or a literal that ought to be a `vec3`. A scalar meeting a vector broadcasts, which
|
|
367
403
|
* is what a scalar is for, and says nothing.
|
|
368
404
|
*
|
|
@@ -372,10 +408,12 @@ function report_missing_kill(sinks, phase, warning) {
|
|
|
372
408
|
*
|
|
373
409
|
* @param {NodeGraph} graph
|
|
374
410
|
* @param {import("../layout/ParticleLayout.js").ParticleLayout|undefined} layout
|
|
411
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|undefined} emitter_layout
|
|
412
|
+
* @param {import("../layout/ParticleLayout.js").ParticleLayout|undefined} global_layout
|
|
375
413
|
* @param {ParticleGraphDiagnostic[]} diagnostics
|
|
376
414
|
*/
|
|
377
|
-
function report_conversions(graph, layout, diagnostics) {
|
|
378
|
-
diagnostics.push(...infer_particle_graph_types(graph, { layout }).diagnostics);
|
|
415
|
+
function report_conversions(graph, layout, emitter_layout, global_layout, diagnostics) {
|
|
416
|
+
diagnostics.push(...infer_particle_graph_types(graph, { layout, emitter_layout, global_layout }).diagnostics);
|
|
379
417
|
}
|
|
380
418
|
|
|
381
419
|
/**
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* {@link graph_particles_simulate} is everything that moves particles:
|
|
7
7
|
*
|
|
8
|
-
* reset counters -> spawn commands -> emitter tick -> scan -> spawn args -> emit
|
|
9
|
-
* -> bucket -> bounds -> build indirect
|
|
8
|
+
* reset counters -> [field bind] -> spawn commands -> emitter tick -> scan -> spawn args -> emit
|
|
9
|
+
* -> simulate -> bucket -> bounds -> build indirect
|
|
10
10
|
*
|
|
11
11
|
* and it leaves the frame's alive list, the pool and the indirect draw args as graph handles for
|
|
12
12
|
* the draw. That draw is not here and is not recorded by `execute` either: the AVBOIT transparency
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
*
|
|
61
61
|
* A buffer is imported only if its contents cross the frame boundary: the pool, the free list, the
|
|
62
62
|
* counters, the alive list, `sim_list` (written here, read by next frame's simulate),
|
|
63
|
-
* `dispatch_args` (the same), the program
|
|
63
|
+
* `dispatch_args` (the same), the program buffer and the two CPU-uploaded queues. Everything else is
|
|
64
64
|
* produced and consumed inside one graph, so the pass that first writes it declares it with a
|
|
65
65
|
* {@link BufferResourceDescriptor} in place of a handle and the graph allocates it just in time and
|
|
66
66
|
* releases it after its last reader — into the pool every other feature draws from. That is the
|
|
@@ -113,9 +113,11 @@
|
|
|
113
113
|
* @param {number} params.frame.warmup_capacity slots the warm-up's transient pool needs
|
|
114
114
|
* @param {import("./warmup/warmup_schedule.js").WarmupSchedule} params.frame.warmup_schedule how
|
|
115
115
|
* many ticks the warm-up runs and how long each is
|
|
116
|
+
* @param {{group_count: number}} [params.field_bindings] the transform binding table's dispatch:
|
|
117
|
+
* zero workgroups while nothing is bound, and the bind pass is not recorded then
|
|
116
118
|
* @returns {ParticleSimulationHandles}
|
|
117
119
|
*/
|
|
118
|
-
export function graph_particles_simulate({ graph, camera, scene_database, wind, gpu, emitters, capacity, bucket_count, wide_registers, frame, }: {
|
|
120
|
+
export function graph_particles_simulate({ graph, camera, scene_database, wind, gpu, emitters, capacity, bucket_count, wide_registers, frame, field_bindings, }: {
|
|
119
121
|
graph: import("../../../engine/graphics/render/frame_graph/FrameGraph.js").FrameGraph;
|
|
120
122
|
camera: number;
|
|
121
123
|
scene_database: number;
|
|
@@ -139,6 +141,9 @@ export function graph_particles_simulate({ graph, camera, scene_database, wind,
|
|
|
139
141
|
warmup_capacity: number;
|
|
140
142
|
warmup_schedule: import("./warmup/warmup_schedule.js").WarmupSchedule;
|
|
141
143
|
};
|
|
144
|
+
field_bindings?: {
|
|
145
|
+
group_count: number;
|
|
146
|
+
};
|
|
142
147
|
}): ParticleSimulationHandles;
|
|
143
148
|
export type ParticleSimulationHandles = {
|
|
144
149
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_particles.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/particles/graph_particles.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph_particles.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/particles/graph_particles.js"],"names":[],"mappings":"AAiDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAEH;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;IAnCkG,KAAK,EAA5F,OAAO,2DAA2D,EAAE,UAAU;IAC/D,MAAM,EAArB,MAAM;IACS,cAAc,EAA7B,MAAM;IACiD,IAAI,EAA3D,OAAO,yBAAyB,EAAE,YAAY;IAE/B,GAAG,EAAlB,MAAM;IAGS,QAAQ;QACC,QAAQ,EAAhC,MAAM;QAEkB,WAAW,EAAnC,MAAM;;IACS,QAAQ,EAAvB,MAAM;IACS,YAAY,EAA3B,MAAM;IAEU,cAAc,EAA9B,OAAO;IAGQ,KAAK;QACC,EAAE,EAAvB,MAAM;QACe,IAAI,EAAzB,MAAM;QACe,KAAK,EAA1B,MAAM;QACiB,QAAQ,GAA/B,OAAO;QACc,WAAW,EAAhC,MAAM;QACe,mBAAmB,EAAxC,MAAM;QACe,YAAY,EAAjC,MAAM;QAGe,eAAe,EAApC,MAAM;QAC6D,eAAe,EAAlF,OAAO,6BAA6B,EAAE,cAAc;;IAErB,cAAc,GAA7C;QAAC,WAAW,EAAE,MAAM,CAAA;KAAC;IAEnB,yBAAyB,CA0VrC;;;;;UAtYa,MAAM;;;;WACN,MAAM;;;;eACN,MAAM;;;;;sBACN,MAAM"}
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
shader_particle_emit_wide,
|
|
26
26
|
} from "./shaders/shader_particle_emit_wide.js";
|
|
27
27
|
import { shader_particle_emitter_tick } from "./shaders/shader_particle_emitter_tick.js";
|
|
28
|
+
import { shader_particle_field_bind } from "./shaders/shader_particle_field_bind.js";
|
|
28
29
|
import {
|
|
29
30
|
shader_particle_build_indirect,
|
|
30
31
|
shader_particle_reset_counters,
|
|
@@ -40,6 +41,12 @@ import {
|
|
|
40
41
|
} from "./shaders/shader_particle_spawn_commands.js";
|
|
41
42
|
import { graph_particle_warmup } from "./warmup/graph_particle_warmup.js";
|
|
42
43
|
|
|
44
|
+
/**
|
|
45
|
+
* What {@link graph_particles_simulate} is told when nothing is bound.
|
|
46
|
+
* @type {{group_count: number}}
|
|
47
|
+
*/
|
|
48
|
+
const NO_FIELD_BINDINGS = Object.freeze({ group_count: 0 });
|
|
49
|
+
|
|
43
50
|
/**
|
|
44
51
|
* The simulation half of the particle system's frame, recorded into the frame graph.
|
|
45
52
|
* {@link GPUParticleSystem#execute} is what calls it, with the buffers it owns; nothing else needs
|
|
@@ -47,8 +54,8 @@ import { graph_particle_warmup } from "./warmup/graph_particle_warmup.js";
|
|
|
47
54
|
*
|
|
48
55
|
* {@link graph_particles_simulate} is everything that moves particles:
|
|
49
56
|
*
|
|
50
|
-
* reset counters -> spawn commands -> emitter tick -> scan -> spawn args -> emit
|
|
51
|
-
* -> bucket -> bounds -> build indirect
|
|
57
|
+
* reset counters -> [field bind] -> spawn commands -> emitter tick -> scan -> spawn args -> emit
|
|
58
|
+
* -> simulate -> bucket -> bounds -> build indirect
|
|
52
59
|
*
|
|
53
60
|
* and it leaves the frame's alive list, the pool and the indirect draw args as graph handles for
|
|
54
61
|
* the draw. That draw is not here and is not recorded by `execute` either: the AVBOIT transparency
|
|
@@ -102,7 +109,7 @@ import { graph_particle_warmup } from "./warmup/graph_particle_warmup.js";
|
|
|
102
109
|
*
|
|
103
110
|
* A buffer is imported only if its contents cross the frame boundary: the pool, the free list, the
|
|
104
111
|
* counters, the alive list, `sim_list` (written here, read by next frame's simulate),
|
|
105
|
-
* `dispatch_args` (the same), the program
|
|
112
|
+
* `dispatch_args` (the same), the program buffer and the two CPU-uploaded queues. Everything else is
|
|
106
113
|
* produced and consumed inside one graph, so the pass that first writes it declares it with a
|
|
107
114
|
* {@link BufferResourceDescriptor} in place of a handle and the graph allocates it just in time and
|
|
108
115
|
* releases it after its last reader — into the pool every other feature draws from. That is the
|
|
@@ -157,6 +164,8 @@ import { graph_particle_warmup } from "./warmup/graph_particle_warmup.js";
|
|
|
157
164
|
* @param {number} params.frame.warmup_capacity slots the warm-up's transient pool needs
|
|
158
165
|
* @param {import("./warmup/warmup_schedule.js").WarmupSchedule} params.frame.warmup_schedule how
|
|
159
166
|
* many ticks the warm-up runs and how long each is
|
|
167
|
+
* @param {{group_count: number}} [params.field_bindings] the transform binding table's dispatch:
|
|
168
|
+
* zero workgroups while nothing is bound, and the bind pass is not recorded then
|
|
160
169
|
* @returns {ParticleSimulationHandles}
|
|
161
170
|
*/
|
|
162
171
|
export function graph_particles_simulate({
|
|
@@ -170,6 +179,7 @@ export function graph_particles_simulate({
|
|
|
170
179
|
bucket_count,
|
|
171
180
|
wide_registers = false,
|
|
172
181
|
frame,
|
|
182
|
+
field_bindings = NO_FIELD_BINDINGS,
|
|
173
183
|
}) {
|
|
174
184
|
assert.defined(graph, "graph");
|
|
175
185
|
assert.isNonNegativeInteger(camera, "camera");
|
|
@@ -177,7 +187,9 @@ export function graph_particles_simulate({
|
|
|
177
187
|
assert.defined(wind, "wind");
|
|
178
188
|
assert.isPositiveInteger(capacity, "capacity");
|
|
179
189
|
|
|
180
|
-
|
|
190
|
+
// Renamed by the bind pass when it writes the field section, so it is threaded like every other
|
|
191
|
+
// buffer more than one pass touches.
|
|
192
|
+
let gr_program = graph_import_buffer(graph, gpu.program, "particles/program");
|
|
181
193
|
let gr_sim_list = graph_import_buffer(graph, gpu.sim_list, "particles/sim_list");
|
|
182
194
|
let gr_dispatch = graph_import_buffer(graph, gpu.dispatch_args, "particles/dispatch_args");
|
|
183
195
|
// The draw args are the one indirect buffer that does NOT cross the frame boundary: build-
|
|
@@ -239,6 +251,17 @@ export function graph_particles_simulate({
|
|
|
239
251
|
group_count: [1, 1, 1],
|
|
240
252
|
}).counters;
|
|
241
253
|
|
|
254
|
+
// 1b. Transform bindings — each bound row's composed `global` into its field, so every VM
|
|
255
|
+
// pass after this reads this frame's transforms. Recorded only while something is bound.
|
|
256
|
+
if (field_bindings.group_count > 0) {
|
|
257
|
+
gr_program = graph_compute_pass({
|
|
258
|
+
graph,
|
|
259
|
+
shader: shader_particle_field_bind,
|
|
260
|
+
bindings: { scene_database, emitter_database, program: gr_program },
|
|
261
|
+
group_count: [field_bindings.group_count, 1, 1],
|
|
262
|
+
}).program;
|
|
263
|
+
}
|
|
264
|
+
|
|
242
265
|
// 2. Spawn commands — the CPU's bursts, added to the emitters' pending spawns. The one dispatch
|
|
243
266
|
// the host sizes, because the host wrote the list.
|
|
244
267
|
if (frame.spawn_command_count > 0) {
|
|
@@ -16,8 +16,8 @@ export class InstructionStream {
|
|
|
16
16
|
*
|
|
17
17
|
* A source is what its slot's role in the ISA says: for a register-role slot, a register operand
|
|
18
18
|
* word — a slot index, or `vm_register(slot, pattern)` to read it through a swizzle — or a
|
|
19
|
-
* literal from `vm_immediate(value)`; for any other role, the raw value (
|
|
20
|
-
* component count, a builtin id, a pool index). The kinds word 0 carries follow
|
|
19
|
+
* literal from `vm_immediate(value)`; for any other role, the raw value (a particle field
|
|
20
|
+
* offset, a component count, a builtin id, a pool index). The kinds word 0 carries follow
|
|
21
21
|
* from that, and register operands are stored in their canonical spelling.
|
|
22
22
|
*
|
|
23
23
|
* `width` is the lane count the operation spans. Left out, it is the opcode's natural width —
|
|
@@ -75,7 +75,7 @@ export class InstructionStream {
|
|
|
75
75
|
*/
|
|
76
76
|
loadConst(dst: number, constant_index: number, width?: number): InstructionStream;
|
|
77
77
|
/**
|
|
78
|
-
* Lanes past `component_count` read as zero, which is how a narrow
|
|
78
|
+
* Lanes past `component_count` read as zero, which is how a narrow particle field widens into a
|
|
79
79
|
* wider operation without a second instruction.
|
|
80
80
|
*
|
|
81
81
|
* @param {number} dst
|
|
@@ -84,7 +84,7 @@ export class InstructionStream {
|
|
|
84
84
|
* @param {number} [width] defaults to the component count
|
|
85
85
|
* @returns {InstructionStream}
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
loadParticleField(dst: number, word_offset: number, component_count: number, width?: number): InstructionStream;
|
|
88
88
|
/**
|
|
89
89
|
* The width is the component count and cannot differ from it: a store writes exactly the lanes
|
|
90
90
|
* the value holds.
|
|
@@ -94,13 +94,14 @@ export class InstructionStream {
|
|
|
94
94
|
* @param {number} component_count
|
|
95
95
|
* @returns {InstructionStream}
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
storeParticleField(source: number | {
|
|
98
98
|
kind: number;
|
|
99
99
|
word: number;
|
|
100
100
|
}, word_offset: number, component_count: number): InstructionStream;
|
|
101
101
|
/**
|
|
102
102
|
* @param {number} dst
|
|
103
|
-
* @param {number} builtin_id
|
|
103
|
+
* @param {number} builtin_id a `VM_BUILTIN`, or a field id from `vm_builtin_emitter_field` or
|
|
104
|
+
* `vm_builtin_global_field`
|
|
104
105
|
* @param {number} [width]
|
|
105
106
|
* @returns {InstructionStream}
|
|
106
107
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstructionStream.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/isa/InstructionStream.js"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH;IACI,yCAAyC;IACzC,cADW,MAAM,EAAE,EAAE,CACH;IAClB,iEAAiE;IACjE,gBADW,MAAM,CACE;IAsBnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SARW,MAAM,QACN,MAAM,OACN,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,OACnC,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,OACnC,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,UACnC,MAAM,GACJ,iBAAiB,CA6D7B;IAED;;;;;;OAMG;IACH,iBAHW,UAAU,MAAM,CAAC,GACf,iBAAiB,CAS7B;IAID;;;;;OAKG;IACH,SALW,MAAM,OACN,MAAM,UACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;;;;OAQG;IACH,eALW,MAAM,OACN,MAAM,SACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;OAKG;IACH,eALW,MAAM,kBACN,MAAM,UACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;;;;;OASG;IACH,
|
|
1
|
+
{"version":3,"file":"InstructionStream.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/particles/isa/InstructionStream.js"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH;IACI,yCAAyC;IACzC,cADW,MAAM,EAAE,EAAE,CACH;IAClB,iEAAiE;IACjE,gBADW,MAAM,CACE;IAsBnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SARW,MAAM,QACN,MAAM,OACN,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,OACnC,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,OACnC,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,UACnC,MAAM,GACJ,iBAAiB,CA6D7B;IAED;;;;;;OAMG;IACH,iBAHW,UAAU,MAAM,CAAC,GACf,iBAAiB,CAS7B;IAID;;;;;OAKG;IACH,SALW,MAAM,OACN,MAAM,UACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;;;;OAQG;IACH,eALW,MAAM,OACN,MAAM,SACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;OAKG;IACH,eALW,MAAM,kBACN,MAAM,UACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;;;;;OASG;IACH,uBANW,MAAM,eACN,MAAM,mBACN,MAAM,UACN,MAAM,GACJ,iBAAiB,CAK7B;IAED;;;;;;;;OAQG;IACH,2BALW,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,eACnC,MAAM,mBACN,MAAM,GACJ,iBAAiB,CAK7B;IAED;;;;;;OAMG;IACH,iBANW,MAAM,cACN,MAAM,UAEN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;OAGG;IACH,gBAHW,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GACjC,iBAAiB,CAI7B;IAED;;;;;;;;OAQG;IACH,YAJW,MAAM,UACN,MAAM,GACJ,iBAAiB,CAI7B;IAED;;;;;;;;OAQG;IACH,gBALW,MAAM,YACN,MAAM,GAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,UACnC,MAAM,GACJ,iBAAiB,CAI7B;IAED;;OAEG;IACH,QAFa,iBAAiB,CAI7B;IAED;;OAEG;IACH,gCAEC;IAED;;OAEG;IACH,WAFa,WAAW,CAWvB;;CACJ"}
|