@woosh/meep-engine 3.51.0 → 3.53.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/package.json +1 -1
- package/src/engine/ecs/animation/Animation.d.ts +4 -25
- package/src/engine/ecs/animation/Animation.d.ts.map +1 -1
- package/src/engine/ecs/animation/Animation.js +9 -41
- package/src/engine/ecs/ik/IKGoalSystem.d.ts +4 -5
- package/src/engine/ecs/ik/IKGoalSystem.d.ts.map +1 -1
- package/src/engine/ecs/ik/IKGoalSystem.js +4 -6
- package/src/engine/graphics/ecs/mesh/assetTypeByPath.js +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.d.ts +9 -22
- package/src/engine/graphics3/AnimationGraphSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationGraphSystem.js +58 -203
- package/src/engine/graphics3/AnimationSystem.d.ts +7 -18
- package/src/engine/graphics3/AnimationSystem.d.ts.map +1 -1
- package/src/engine/graphics3/AnimationSystem.js +62 -243
- package/src/engine/graphics3/FoliageWindSystem.d.ts +67 -0
- package/src/engine/graphics3/FoliageWindSystem.d.ts.map +1 -0
- package/src/engine/graphics3/FoliageWindSystem.js +257 -0
- package/src/engine/graphics3/GPUFluidSystem.d.ts +7 -0
- package/src/engine/graphics3/GPUFluidSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUFluidSystem.js +39 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +0 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +19 -5
- package/src/engine/graphics3/animation/AnimationClips.d.ts +107 -13
- package/src/engine/graphics3/animation/AnimationClips.d.ts.map +1 -1
- package/src/engine/graphics3/animation/AnimationClips.js +207 -10
- package/src/engine/graphics3/animation/AnimationClipsSink.d.ts +89 -0
- package/src/engine/graphics3/animation/AnimationClipsSink.d.ts.map +1 -0
- package/src/engine/graphics3/animation/AnimationClipsSink.js +205 -0
- package/src/engine/graphics3/animation/FoliageWindRigs.d.ts +43 -0
- package/src/engine/graphics3/animation/FoliageWindRigs.d.ts.map +1 -0
- package/src/engine/graphics3/animation/FoliageWindRigs.js +69 -0
- package/src/engine/graphics3/animation/write_clip_playback.d.ts +17 -11
- package/src/engine/graphics3/animation/write_clip_playback.d.ts.map +1 -1
- package/src/engine/graphics3/animation/write_clip_playback.js +36 -27
- package/src/engine/graphics3/decal/GPUDecalRenderer.d.ts.map +1 -1
- package/src/engine/graphics3/decal/GPUDecalRenderer.js +8 -6
- package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
- package/src/engine/graphics3/decal/shader_decal_composite.js +11 -5
- package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts +7 -7
- package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts.map +1 -1
- package/src/engine/graphics3/pose/collect_entity_playbacks.js +14 -15
- package/src/engine/graphics3/prefab/Prefab.d.ts +6 -0
- package/src/engine/graphics3/prefab/Prefab.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/Prefab.js +169 -162
- package/src/engine/graphics3/prefab/prefab_compile.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_compile.js +369 -334
- package/src/engine/graphics3/prefab/prefab_instantiate.d.ts.map +1 -1
- package/src/engine/graphics3/prefab/prefab_instantiate.js +43 -2
- package/src/engine/graphics3/terrain/chunk_terrain_material_surface.js +2 -2
- package/src/engine/physics/ecs/ContactProbeSystem.d.ts +2 -3
- package/src/engine/physics/ecs/ContactProbeSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/ContactProbeSystem.js +2 -4
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/simulation/PROBE_PLACEMENT.md +4 -4
- package/src/engine/sound/simulation/README.md +1 -1
- package/src/engine/sound/simulation/probe/bakeProbeField.d.ts +22 -8
- package/src/engine/sound/simulation/probe/bakeProbeField.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/bakeProbeField.js +60 -15
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +19 -23
- package/src/engine/sound/simulation/probe/probe_sdf_grid.d.ts +63 -17
- package/src/engine/sound/simulation/probe/probe_sdf_grid.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_sdf_grid.js +67 -17
- package/src/generation/foliage/FOLIAGE_DESIGN.md +318 -0
- package/src/generation/foliage/FOLIAGE_PLAN.md +198 -0
- package/src/generation/foliage/animation/build_tree_wind_rig.d.ts +20 -0
- package/src/generation/foliage/animation/build_tree_wind_rig.d.ts.map +1 -0
- package/src/generation/foliage/animation/build_tree_wind_rig.js +108 -0
- package/src/generation/foliage/asset/TreeAsset.d.ts +86 -0
- package/src/generation/foliage/asset/TreeAsset.d.ts.map +1 -0
- package/src/generation/foliage/asset/TreeAsset.js +111 -0
- package/src/generation/foliage/asset/TreeLODAsset.d.ts +115 -0
- package/src/generation/foliage/asset/TreeLODAsset.d.ts.map +1 -0
- package/src/generation/foliage/asset/TreeLODAsset.js +346 -0
- package/src/generation/foliage/asset/generate_tree.d.ts +15 -0
- package/src/generation/foliage/asset/generate_tree.d.ts.map +1 -0
- package/src/generation/foliage/asset/generate_tree.js +93 -0
- package/src/generation/foliage/asset/place_tree.d.ts +82 -0
- package/src/generation/foliage/asset/place_tree.d.ts.map +1 -0
- package/src/generation/foliage/asset/place_tree.js +194 -0
- package/src/generation/foliage/config/BarkMaterialConfig.d.ts +120 -0
- package/src/generation/foliage/config/BarkMaterialConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/BarkMaterialConfig.js +250 -0
- package/src/generation/foliage/config/BranchLevelConfig.d.ts +288 -0
- package/src/generation/foliage/config/BranchLevelConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/BranchLevelConfig.js +536 -0
- package/src/generation/foliage/config/CrownConfig.d.ts +100 -0
- package/src/generation/foliage/config/CrownConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/CrownConfig.js +186 -0
- package/src/generation/foliage/config/CrownEnvelopeType.d.ts +16 -0
- package/src/generation/foliage/config/CrownEnvelopeType.d.ts.map +1 -0
- package/src/generation/foliage/config/CrownEnvelopeType.js +17 -0
- package/src/generation/foliage/config/FoliageCardType.d.ts +12 -0
- package/src/generation/foliage/config/FoliageCardType.d.ts.map +1 -0
- package/src/generation/foliage/config/FoliageCardType.js +18 -0
- package/src/generation/foliage/config/FoliageConfig.d.ts +151 -0
- package/src/generation/foliage/config/FoliageConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/FoliageConfig.js +283 -0
- package/src/generation/foliage/config/FoliageMaterialConfig.d.ts +90 -0
- package/src/generation/foliage/config/FoliageMaterialConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/FoliageMaterialConfig.js +181 -0
- package/src/generation/foliage/config/PhyllotaxisMode.d.ts +13 -0
- package/src/generation/foliage/config/PhyllotaxisMode.d.ts.map +1 -0
- package/src/generation/foliage/config/PhyllotaxisMode.js +20 -0
- package/src/generation/foliage/config/TreeLODConfig.d.ts +87 -0
- package/src/generation/foliage/config/TreeLODConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/TreeLODConfig.js +211 -0
- package/src/generation/foliage/config/TreePreset.d.ts +16 -0
- package/src/generation/foliage/config/TreePreset.d.ts.map +1 -0
- package/src/generation/foliage/config/TreePreset.js +17 -0
- package/src/generation/foliage/config/TreeSpeciesConfig.d.ts +109 -0
- package/src/generation/foliage/config/TreeSpeciesConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/TreeSpeciesConfig.js +400 -0
- package/src/generation/foliage/config/TreeWindConfig.d.ts +84 -0
- package/src/generation/foliage/config/TreeWindConfig.d.ts.map +1 -0
- package/src/generation/foliage/config/TreeWindConfig.js +157 -0
- package/src/generation/foliage/index.d.ts +38 -0
- package/src/generation/foliage/index.d.ts.map +1 -0
- package/src/generation/foliage/index.js +43 -0
- package/src/generation/foliage/material/make_bark_material.d.ts +37 -0
- package/src/generation/foliage/material/make_bark_material.d.ts.map +1 -0
- package/src/generation/foliage/material/make_bark_material.js +802 -0
- package/src/generation/foliage/material/make_foliage_material.d.ts +14 -0
- package/src/generation/foliage/material/make_foliage_material.d.ts.map +1 -0
- package/src/generation/foliage/material/make_foliage_material.js +359 -0
- package/src/generation/foliage/mesh/branch_collar_project.d.ts +42 -0
- package/src/generation/foliage/mesh/branch_collar_project.d.ts.map +1 -0
- package/src/generation/foliage/mesh/branch_collar_project.js +203 -0
- package/src/generation/foliage/mesh/branch_ring_triangulate.d.ts +35 -0
- package/src/generation/foliage/mesh/branch_ring_triangulate.d.ts.map +1 -0
- package/src/generation/foliage/mesh/branch_ring_triangulate.js +72 -0
- package/src/generation/foliage/mesh/foliage_collect_attachments.d.ts +80 -0
- package/src/generation/foliage/mesh/foliage_collect_attachments.d.ts.map +1 -0
- package/src/generation/foliage/mesh/foliage_collect_attachments.js +502 -0
- package/src/generation/foliage/mesh/tree_mesh_apply_canopy_ao.d.ts +19 -0
- package/src/generation/foliage/mesh/tree_mesh_apply_canopy_ao.d.ts.map +1 -0
- package/src/generation/foliage/mesh/tree_mesh_apply_canopy_ao.js +150 -0
- package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts +55 -0
- package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts.map +1 -0
- package/src/generation/foliage/mesh/tree_mesh_build_bark.js +1047 -0
- package/src/generation/foliage/mesh/tree_mesh_build_foliage.d.ts +21 -0
- package/src/generation/foliage/mesh/tree_mesh_build_foliage.d.ts.map +1 -0
- package/src/generation/foliage/mesh/tree_mesh_build_foliage.js +415 -0
- package/src/generation/foliage/presets/make_tree_species_preset.d.ts +13 -0
- package/src/generation/foliage/presets/make_tree_species_preset.d.ts.map +1 -0
- package/src/generation/foliage/presets/make_tree_species_preset.js +837 -0
- package/src/generation/foliage/skeleton/TreeSkeleton.d.ts +443 -0
- package/src/generation/foliage/skeleton/TreeSkeleton.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/TreeSkeleton.js +1100 -0
- package/src/generation/foliage/skeleton/crown_envelope_evaluate.d.ts +27 -0
- package/src/generation/foliage/skeleton/crown_envelope_evaluate.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/crown_envelope_evaluate.js +121 -0
- package/src/generation/foliage/skeleton/spine_frame_double_reflection.d.ts +32 -0
- package/src/generation/foliage/skeleton/spine_frame_double_reflection.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/spine_frame_double_reflection.js +87 -0
- package/src/generation/foliage/skeleton/tree_skeleton_assign_skin_joints.d.ts +33 -0
- package/src/generation/foliage/skeleton/tree_skeleton_assign_skin_joints.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_assign_skin_joints.js +205 -0
- package/src/generation/foliage/skeleton/tree_skeleton_compute_pipe_radii.d.ts +14 -0
- package/src/generation/foliage/skeleton/tree_skeleton_compute_pipe_radii.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_compute_pipe_radii.js +179 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow.d.ts +18 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow.d.ts.map +1 -0
- package/src/generation/foliage/skeleton/tree_skeleton_grow.js +1104 -0
- package/src/shade/playground/additive_blending/index.html +197 -0
- package/src/shade/playground/additive_blending/main.d.ts +2 -0
- package/src/shade/playground/additive_blending/main.d.ts.map +1 -0
- package/src/shade/playground/additive_blending/main.js +529 -0
- package/src/shade/playground/foliage_wind/README.md +18 -0
- package/src/shade/playground/foliage_wind/foliage_world.d.ts +127 -0
- package/src/shade/playground/foliage_wind/foliage_world.d.ts.map +1 -0
- package/src/shade/playground/foliage_wind/foliage_world.js +593 -0
- package/src/shade/playground/foliage_wind/index.html +254 -0
- package/src/shade/playground/foliage_wind/main.d.ts +2 -0
- package/src/shade/playground/foliage_wind/main.d.ts.map +1 -0
- package/src/shade/playground/foliage_wind/main.js +263 -0
- package/src/shade/playground/tonemap_sdr/README.md +5 -3
- package/src/shade/renderer/Renderer.d.ts +1 -1
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +88 -31
- package/src/shade/renderer/ShadeToneMappingMode.d.ts +3 -2
- package/src/shade/renderer/ShadeToneMappingMode.js +15 -4
- package/src/shade/renderer/animation/ADDITIVE_BLENDING_PLAN.md +145 -0
- package/src/shade/renderer/animation/ANIMATION_DATABASE_SPEC.d.ts +9 -1
- package/src/shade/renderer/animation/ANIMATION_DATABASE_SPEC.d.ts.map +1 -1
- package/src/shade/renderer/animation/ANIMATION_DATABASE_SPEC.js +53 -1
- package/src/shade/renderer/animation/ANIMATION_FOLIAGE_JOINT_STRUCT.d.ts +8 -0
- package/src/shade/renderer/animation/ANIMATION_FOLIAGE_JOINT_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/animation/ANIMATION_FOLIAGE_JOINT_STRUCT.js +71 -0
- package/src/shade/renderer/animation/ANIMATION_FOLIAGE_RIG_STRUCT.d.ts +11 -0
- package/src/shade/renderer/animation/ANIMATION_FOLIAGE_RIG_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/animation/ANIMATION_FOLIAGE_RIG_STRUCT.js +32 -0
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +30 -3
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +532 -79
- package/src/shade/renderer/animation/POSE_ACCUMULATOR_LAYOUT.d.ts +19 -12
- package/src/shade/renderer/animation/POSE_ACCUMULATOR_LAYOUT.d.ts.map +1 -1
- package/src/shade/renderer/animation/POSE_ACCUMULATOR_LAYOUT.js +20 -13
- package/src/shade/renderer/animation/ShadeAnimationClip.d.ts +35 -8
- package/src/shade/renderer/animation/ShadeAnimationClip.d.ts.map +1 -1
- package/src/shade/renderer/animation/ShadeAnimationClip.js +433 -2
- package/src/shade/renderer/animation/chunk_pose_accumulator.d.ts.map +1 -1
- package/src/shade/renderer/animation/chunk_pose_accumulator.js +40 -32
- package/src/shade/renderer/animation/foliage/FoliageWindJoint.d.ts +97 -0
- package/src/shade/renderer/animation/foliage/FoliageWindJoint.d.ts.map +1 -0
- package/src/shade/renderer/animation/foliage/FoliageWindJoint.js +161 -0
- package/src/shade/renderer/animation/foliage/FoliageWindRig.d.ts +65 -0
- package/src/shade/renderer/animation/foliage/FoliageWindRig.d.ts.map +1 -0
- package/src/shade/renderer/animation/foliage/FoliageWindRig.js +89 -0
- package/src/shade/renderer/animation/foliage/chunk_foliage_wind_step.d.ts +19 -0
- package/src/shade/renderer/animation/foliage/chunk_foliage_wind_step.d.ts.map +1 -0
- package/src/shade/renderer/animation/foliage/chunk_foliage_wind_step.js +143 -0
- package/src/shade/renderer/animation/foliage/shader_foliage_wind_apply.d.ts +14 -0
- package/src/shade/renderer/animation/foliage/shader_foliage_wind_apply.d.ts.map +1 -0
- package/src/shade/renderer/animation/foliage/shader_foliage_wind_apply.js +116 -0
- package/src/shade/renderer/animation/pose/pose_evaluate_local.d.ts.map +1 -1
- package/src/shade/renderer/animation/pose/pose_evaluate_local.js +39 -29
- package/src/shade/renderer/animation/shader_animation_pose_resolve.js +37 -37
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +2 -2
- package/src/shade/renderer/deferred/tonemap/TonemapAces2Tables.d.ts +38 -0
- package/src/shade/renderer/deferred/tonemap/TonemapAces2Tables.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/TonemapAces2Tables.js +97 -0
- package/src/shade/renderer/deferred/{TonemapDisplaySettings.d.ts → tonemap/TonemapDisplaySettings.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/TonemapDisplaySettings.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{TonemapDisplaySettings.js → tonemap/TonemapDisplaySettings.js} +5 -5
- package/src/shade/renderer/deferred/{shader_tonemap_HDR.d.ts → tonemap/shader_tonemap_HDR.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{shader_tonemap_HDR.js → tonemap/shader_tonemap_HDR.js} +9 -9
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_aces.d.ts +17 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_aces.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_aces.js +101 -0
- package/src/shade/renderer/deferred/{shader_tonemap_HDR_none.d.ts → tonemap/shader_tonemap_HDR_none.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_none.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{shader_tonemap_HDR_none.js → tonemap/shader_tonemap_HDR_none.js} +6 -6
- package/src/shade/renderer/deferred/{shader_tonemap_HDR_pbr_neutral.d.ts → tonemap/shader_tonemap_HDR_pbr_neutral.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_HDR_pbr_neutral.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{shader_tonemap_HDR_pbr_neutral.js → tonemap/shader_tonemap_HDR_pbr_neutral.js} +8 -8
- package/src/shade/renderer/deferred/{shader_tonemap_LDR.d.ts → tonemap/shader_tonemap_LDR.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{shader_tonemap_LDR.js → tonemap/shader_tonemap_LDR.js} +10 -10
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_aces.d.ts +10 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_aces.d.ts.map +1 -0
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_aces.js +77 -0
- package/src/shade/renderer/deferred/{shader_tonemap_LDR_none.d.ts → tonemap/shader_tonemap_LDR_none.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_none.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{shader_tonemap_LDR_none.js → tonemap/shader_tonemap_LDR_none.js} +7 -7
- package/src/shade/renderer/deferred/{shader_tonemap_LDR_pbr_neutral.d.ts → tonemap/shader_tonemap_LDR_pbr_neutral.d.ts} +1 -1
- package/src/shade/renderer/deferred/tonemap/shader_tonemap_LDR_pbr_neutral.d.ts.map +1 -0
- package/src/shade/renderer/deferred/{shader_tonemap_LDR_pbr_neutral.js → tonemap/shader_tonemap_LDR_pbr_neutral.js} +8 -8
- package/src/shade/renderer/extension/RenderExtension.d.ts +7 -0
- package/src/shade/renderer/extension/RenderExtension.d.ts.map +1 -1
- package/src/shade/renderer/extension/RenderExtension.js +9 -0
- package/src/shade/renderer/extension/RenderExtensionRegistry.d.ts +6 -0
- package/src/shade/renderer/extension/RenderExtensionRegistry.d.ts.map +1 -1
- package/src/shade/renderer/extension/RenderExtensionRegistry.js +15 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +10 -3
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts.map +1 -1
- package/src/shade/renderer/fluid/GPUFluidCascade.js +15 -0
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +8 -1
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts.map +1 -1
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.js +11 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.js +51 -48
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +6 -6
- package/src/shade/renderer/fluid/mac/FluidMacPasses.d.ts +6 -0
- package/src/shade/renderer/fluid/mac/FluidMacPasses.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/FluidMacPasses.js +16 -0
- package/src/shade/renderer/fluid/mac/chunk_fluid_mac_seams.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/chunk_fluid_mac_seams.js +15 -3
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_lattice_corners.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_lattice_corners.js +102 -96
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.js +12 -12
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_predict.js +12 -12
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +8 -1
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts.map +1 -1
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.js +16 -0
- package/src/shade/renderer/fluid/publish/FluidWindPublish.d.ts +7 -0
- package/src/shade/renderer/fluid/publish/FluidWindPublish.d.ts.map +1 -1
- package/src/shade/renderer/fluid/publish/FluidWindPublish.js +10 -0
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.js +2 -2
- package/src/shade/renderer/loader/SceneBundle.d.ts +7 -0
- package/src/shade/renderer/loader/SceneBundle.d.ts.map +1 -1
- package/src/shade/renderer/loader/SceneBundle.js +119 -111
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts +4 -0
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.js +6 -5
- package/src/shade/renderer/object_property/chunk_write_object_property_node3d.d.ts +8 -7
- package/src/shade/renderer/object_property/chunk_write_object_property_node3d.d.ts.map +1 -1
- package/src/shade/renderer/object_property/chunk_write_object_property_node3d.js +9 -8
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +3 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +9 -4
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- 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 +9 -7
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.js +15 -7
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +6 -4
- package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.js +3 -3
- package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.js +8 -5
- package/src/shade/renderer/rasterize/native/viz/viz_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/viz/viz_rasterization_alpha_tested_pass_descriptor.js +4 -3
- package/src/shade/renderer/shader/chunk/color/tonemap/ACES_TONE_MAPPING_BRIEF_2026_10_17.md +160 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/HDR_TONE_MAPPING_FORMS_BRIEF_2026_10_16.md +5 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/SDR_TONE_MAPPING_BRIEF_2026_10_16.md +15 -5
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/aces2_transform_block.d.ts +41 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/aces2_transform_block.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/aces2_transform_block.js +692 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces2_output_transform.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces2_output_transform.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces2_output_transform.js +446 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +68 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +32 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +163 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts +10 -3
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.js +12 -4
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +1 -1
- package/src/shade/renderer/texture/SAMPLER_ANISOTROPIC_CLAMP.d.ts +9 -0
- package/src/shade/renderer/texture/SAMPLER_ANISOTROPIC_CLAMP.d.ts.map +1 -0
- package/src/shade/renderer/texture/SAMPLER_ANISOTROPIC_CLAMP.js +17 -0
- package/src/shade/renderer/texture/SAMPLER_LINEAR_UPSCALE.d.ts +8 -0
- package/src/shade/renderer/texture/SAMPLER_LINEAR_UPSCALE.d.ts.map +1 -1
- package/src/shade/renderer/texture/SAMPLER_LINEAR_UPSCALE.js +28 -20
- package/src/shade/renderer/texture/SAMPLER_TRILINEAR_CLAMP.d.ts +8 -0
- package/src/shade/renderer/texture/SAMPLER_TRILINEAR_CLAMP.d.ts.map +1 -0
- package/src/shade/renderer/texture/SAMPLER_TRILINEAR_CLAMP.js +15 -0
- package/src/shade/renderer/view/chunk_view_mip_bias.d.ts +21 -0
- package/src/shade/renderer/view/chunk_view_mip_bias.d.ts.map +1 -0
- package/src/shade/renderer/view/chunk_view_mip_bias.js +44 -0
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +105 -26
- package/src/engine/graphics/composit/CompositingStages.d.ts +0 -6
- package/src/engine/graphics/composit/CompositingStages.d.ts.map +0 -1
- package/src/engine/graphics/composit/CompositingStages.js +0 -8
- package/src/engine/graphics/geometry/buffered/computeBufferAttributeHash.d.ts +0 -7
- package/src/engine/graphics/geometry/buffered/computeBufferAttributeHash.d.ts.map +0 -1
- package/src/engine/graphics/geometry/buffered/computeBufferAttributeHash.js +0 -24
- package/src/engine/graphics/geometry/buffered/computeGeometryBoundingSphereMiniball.d.ts +0 -8
- package/src/engine/graphics/geometry/buffered/computeGeometryBoundingSphereMiniball.d.ts.map +0 -1
- package/src/engine/graphics/geometry/buffered/computeGeometryBoundingSphereMiniball.js +0 -17
- package/src/engine/graphics/geometry/buffered/computeGeometryEquality.d.ts +0 -8
- package/src/engine/graphics/geometry/buffered/computeGeometryEquality.d.ts.map +0 -1
- package/src/engine/graphics/geometry/buffered/computeGeometryEquality.js +0 -60
- package/src/engine/graphics/geometry/buffered/computeGeometryHash.d.ts +0 -7
- package/src/engine/graphics/geometry/buffered/computeGeometryHash.d.ts.map +0 -1
- package/src/engine/graphics/geometry/buffered/computeGeometryHash.js +0 -26
- package/src/engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.d.ts +0 -7
- package/src/engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.d.ts.map +0 -1
- package/src/engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.js +0 -23
- package/src/engine/graphics/geometry/instancing/geometry_copy.d.ts +0 -7
- package/src/engine/graphics/geometry/instancing/geometry_copy.d.ts.map +0 -1
- package/src/engine/graphics/geometry/instancing/geometry_copy.js +0 -15
- package/src/engine/graphics/geometry/instancing/rewriteMaterial.d.ts +0 -2
- package/src/engine/graphics/geometry/instancing/rewriteMaterial.d.ts.map +0 -1
- package/src/engine/graphics/geometry/instancing/rewriteMaterial.js +0 -57
- package/src/engine/graphics/geometry/ribbon/Quad.d.ts +0 -96
- package/src/engine/graphics/geometry/ribbon/Quad.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/Quad.js +0 -213
- package/src/engine/graphics/geometry/ribbon/copyAttributeV3.d.ts +0 -9
- package/src/engine/graphics/geometry/ribbon/copyAttributeV3.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/copyAttributeV3.js +0 -12
- package/src/engine/graphics/geometry/ribbon/copyAttributeValue.d.ts +0 -10
- package/src/engine/graphics/geometry/ribbon/copyAttributeValue.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/copyAttributeValue.js +0 -17
- package/src/engine/graphics/geometry/ribbon/equalAttributeV3.d.ts +0 -10
- package/src/engine/graphics/geometry/ribbon/equalAttributeV3.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/equalAttributeV3.js +0 -13
- package/src/engine/graphics/geometry/ribbon/equalAttributeValue.d.ts +0 -11
- package/src/engine/graphics/geometry/ribbon/equalAttributeValue.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/equalAttributeValue.js +0 -24
- package/src/engine/graphics/geometry/ribbon/rotateRibbon.d.ts +0 -6
- package/src/engine/graphics/geometry/ribbon/rotateRibbon.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/rotateRibbon.js +0 -37
- package/src/engine/graphics/geometry/ribbon/updateTipPosition.d.ts +0 -9
- package/src/engine/graphics/geometry/ribbon/updateTipPosition.d.ts.map +0 -1
- package/src/engine/graphics/geometry/ribbon/updateTipPosition.js +0 -52
- package/src/engine/graphics/geometry/skining/computeSkinnedMeshVertices.d.ts +0 -8
- package/src/engine/graphics/geometry/skining/computeSkinnedMeshVertices.d.ts.map +0 -1
- package/src/engine/graphics/geometry/skining/computeSkinnedMeshVertices.js +0 -54
- package/src/engine/graphics/render/RenderPassType.d.ts +0 -6
- package/src/engine/graphics/render/RenderPassType.d.ts.map +0 -1
- package/src/engine/graphics/render/RenderPassType.js +0 -8
- package/src/engine/graphics/render/layers/RenderLayer.d.ts +0 -78
- package/src/engine/graphics/render/layers/RenderLayer.d.ts.map +0 -1
- package/src/engine/graphics/render/layers/RenderLayer.js +0 -95
- package/src/engine/graphics/render/layers/RenderLayerManager.d.ts +0 -72
- package/src/engine/graphics/render/layers/RenderLayerManager.d.ts.map +0 -1
- package/src/engine/graphics/render/layers/RenderLayerManager.js +0 -160
- package/src/engine/graphics/render/layers/RenderLayerManagerState.d.ts +0 -18
- package/src/engine/graphics/render/layers/RenderLayerManagerState.d.ts.map +0 -1
- package/src/engine/graphics/render/layers/RenderLayerManagerState.js +0 -48
- package/src/engine/graphics/render/layers/RenderLayerState.d.ts +0 -18
- package/src/engine/graphics/render/layers/RenderLayerState.d.ts.map +0 -1
- package/src/engine/graphics/render/layers/RenderLayerState.js +0 -27
- package/src/engine/graphics/render/layers/RenderLayerUtils.d.ts +0 -8
- package/src/engine/graphics/render/layers/RenderLayerUtils.d.ts.map +0 -1
- package/src/engine/graphics/render/layers/RenderLayerUtils.js +0 -103
- package/src/engine/graphics/render/make_bvh_visibility_builder.d.ts +0 -10
- package/src/engine/graphics/render/make_bvh_visibility_builder.d.ts.map +0 -1
- package/src/engine/graphics/render/make_bvh_visibility_builder.js +0 -64
- package/src/engine/graphics/render/view/CameraViewFlags.d.ts +0 -7
- package/src/engine/graphics/render/view/CameraViewFlags.d.ts.map +0 -1
- package/src/engine/graphics/render/view/CameraViewFlags.js +0 -9
- package/src/engine/graphics/render/visibility/IncrementalDeltaSet.d.ts +0 -143
- package/src/engine/graphics/render/visibility/IncrementalDeltaSet.d.ts.map +0 -1
- package/src/engine/graphics/render/visibility/IncrementalDeltaSet.js +0 -328
- package/src/engine/graphics/render/visibility/VisibilityComputer.d.ts +0 -39
- package/src/engine/graphics/render/visibility/VisibilityComputer.d.ts.map +0 -1
- package/src/engine/graphics/render/visibility/VisibilityComputer.js +0 -80
- package/src/engine/graphics/render/visibility/VisibilityFilter.d.ts +0 -29
- package/src/engine/graphics/render/visibility/VisibilityFilter.d.ts.map +0 -1
- package/src/engine/graphics/render/visibility/VisibilityFilter.js +0 -37
- package/src/engine/graphics3/animation/write_graph_playback.d.ts +0 -24
- package/src/engine/graphics3/animation/write_graph_playback.d.ts.map +0 -1
- package/src/engine/graphics3/animation/write_graph_playback.js +0 -48
- package/src/shade/renderer/deferred/TonemapDisplaySettings.d.ts.map +0 -1
- package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts.map +0 -1
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts.map +0 -1
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts.map +0 -1
- package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts.map +0 -1
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts.map +0 -1
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts.map +0 -1
|
@@ -22,13 +22,16 @@ import { shader_composite_volumetrics } from "./deferred/shader_composite_volume
|
|
|
22
22
|
import { shader_deferred_main } from "./deferred/shader_deferred_main.js";
|
|
23
23
|
import { LOCAL_LIGHT_SHADING } from "./deferred/LOCAL_LIGHT_SHADING.js";
|
|
24
24
|
import { LocalLightShading } from "./deferred/LocalLightShading.js";
|
|
25
|
-
import { shader_tonemap_HDR } from "./deferred/shader_tonemap_HDR.js";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
25
|
+
import { shader_tonemap_HDR } from "./deferred/tonemap/shader_tonemap_HDR.js";
|
|
26
|
+
import { shader_tonemap_HDR_aces } from "./deferred/tonemap/shader_tonemap_HDR_aces.js";
|
|
27
|
+
import { shader_tonemap_HDR_none } from "./deferred/tonemap/shader_tonemap_HDR_none.js";
|
|
28
|
+
import { shader_tonemap_HDR_pbr_neutral } from "./deferred/tonemap/shader_tonemap_HDR_pbr_neutral.js";
|
|
29
|
+
import { shader_tonemap_LDR } from "./deferred/tonemap/shader_tonemap_LDR.js";
|
|
30
|
+
import { shader_tonemap_LDR_aces } from "./deferred/tonemap/shader_tonemap_LDR_aces.js";
|
|
31
|
+
import { shader_tonemap_LDR_none } from "./deferred/tonemap/shader_tonemap_LDR_none.js";
|
|
32
|
+
import { shader_tonemap_LDR_pbr_neutral } from "./deferred/tonemap/shader_tonemap_LDR_pbr_neutral.js";
|
|
33
|
+
import { TonemapAces2Tables } from "./deferred/tonemap/TonemapAces2Tables.js";
|
|
34
|
+
import { TonemapDisplaySettings } from "./deferred/tonemap/TonemapDisplaySettings.js";
|
|
32
35
|
import { FrameContext } from "./extension/FrameContext.js";
|
|
33
36
|
import { FramePhase } from "./extension/FramePhase.js";
|
|
34
37
|
import { GBufferTextures } from "./extension/GBufferTextures.js";
|
|
@@ -225,11 +228,11 @@ export class Renderer {
|
|
|
225
228
|
|
|
226
229
|
/**
|
|
227
230
|
* How the exposed scene colour becomes display colour, on every output. An SDR and an HDR display run the same
|
|
228
|
-
* mode, so a scene looks alike on both; see {@link ShadeToneMappingMode}. Read every frame, so it can be flipped
|
|
231
|
+
* mode, so a scene looks alike on both; see {@link ShadeToneMappingMode}. ACES, Unreal's default look, unless set. Read every frame, so it can be flipped
|
|
229
232
|
* at runtime. A mode not in use at {@link initialize} compiles its pass on the first frame that draws with it.
|
|
230
233
|
* @type {ShadeToneMappingMode}
|
|
231
234
|
*/
|
|
232
|
-
tone_mapping_mode = ShadeToneMappingMode.
|
|
235
|
+
tone_mapping_mode = ShadeToneMappingMode.ACES;
|
|
233
236
|
|
|
234
237
|
/**
|
|
235
238
|
* Switches of the AVBOIT mode, read every frame while {@link transparency_mode} selects it.
|
|
@@ -838,7 +841,33 @@ export class Renderer {
|
|
|
838
841
|
* @returns {RenderExtension} `extension`, for handing back to {@link remove_extension}
|
|
839
842
|
*/
|
|
840
843
|
add_extension(extension) {
|
|
841
|
-
|
|
844
|
+
this.#extensions.add(extension);
|
|
845
|
+
|
|
846
|
+
if (
|
|
847
|
+
this.#graphics !== undefined
|
|
848
|
+
&& !this.#destroyed
|
|
849
|
+
&& !this.#device_lost
|
|
850
|
+
&& typeof extension.enquirePipelines === 'function'
|
|
851
|
+
) {
|
|
852
|
+
const enquiry = PipelineEnquiry.from(this.device);
|
|
853
|
+
|
|
854
|
+
extension.enquirePipelines(enquiry);
|
|
855
|
+
|
|
856
|
+
const graphics = this.#graphics;
|
|
857
|
+
const render = enquiry.render;
|
|
858
|
+
|
|
859
|
+
for (let i = 0; i < render.length; i++) {
|
|
860
|
+
graphics.render_pipelines.prepare(render[i]);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
const compute = enquiry.compute;
|
|
864
|
+
|
|
865
|
+
for (let i = 0; i < compute.length; i++) {
|
|
866
|
+
graphics.compute_pipelines.prepare(compute[i]);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
return extension;
|
|
842
871
|
}
|
|
843
872
|
|
|
844
873
|
/**
|
|
@@ -1399,6 +1428,13 @@ export class Renderer {
|
|
|
1399
1428
|
*/
|
|
1400
1429
|
#tonemap_settings = new TonemapDisplaySettings();
|
|
1401
1430
|
|
|
1431
|
+
/**
|
|
1432
|
+
* The ACES HDR pass's two output transforms, built for the display in {@link #tonemap_settings}.
|
|
1433
|
+
*
|
|
1434
|
+
* @type {TonemapAces2Tables}
|
|
1435
|
+
*/
|
|
1436
|
+
#tonemap_aces2_tables = new TonemapAces2Tables();
|
|
1437
|
+
|
|
1402
1438
|
#update_presentation_format() {
|
|
1403
1439
|
|
|
1404
1440
|
const format8bit = navigator.gpu.getPreferredCanvasFormat();
|
|
@@ -1725,6 +1761,8 @@ export class Renderer {
|
|
|
1725
1761
|
this.#autoexposure.enquirePipelines(enquiry);
|
|
1726
1762
|
}
|
|
1727
1763
|
|
|
1764
|
+
this.#extensions.enquirePipelines(enquiry);
|
|
1765
|
+
|
|
1728
1766
|
enquiry.render.push(this.#tonemap_shader().pipeline_for([this.#presentation_format]));
|
|
1729
1767
|
}
|
|
1730
1768
|
|
|
@@ -1741,6 +1779,10 @@ export class Renderer {
|
|
|
1741
1779
|
return this.#hdr_supported ? shader_tonemap_HDR_none : shader_tonemap_LDR_none;
|
|
1742
1780
|
}
|
|
1743
1781
|
|
|
1782
|
+
if (this.tone_mapping_mode === ShadeToneMappingMode.ACES) {
|
|
1783
|
+
return this.#hdr_supported ? shader_tonemap_HDR_aces : shader_tonemap_LDR_aces;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1744
1786
|
if (this.tone_mapping_mode === ShadeToneMappingMode.PBR_NEUTRAL) {
|
|
1745
1787
|
return this.#hdr_supported ? shader_tonemap_HDR_pbr_neutral : shader_tonemap_LDR_pbr_neutral;
|
|
1746
1788
|
}
|
|
@@ -1822,6 +1864,7 @@ export class Renderer {
|
|
|
1822
1864
|
this.#scene_sdfs.clear();
|
|
1823
1865
|
|
|
1824
1866
|
this.#autoexposure?.destroy();
|
|
1867
|
+
this.#tonemap_aces2_tables.destroy();
|
|
1825
1868
|
this.#depth_of_field?.destroy();
|
|
1826
1869
|
this.#depth_of_field_unreal?.destroy();
|
|
1827
1870
|
this.#restir_di?.destroy();
|
|
@@ -2428,6 +2471,21 @@ export class Renderer {
|
|
|
2428
2471
|
}
|
|
2429
2472
|
}
|
|
2430
2473
|
|
|
2474
|
+
const graph = new FrameGraph("Shading");
|
|
2475
|
+
|
|
2476
|
+
/*
|
|
2477
|
+
The view is updated and nothing has been rasterized, so an extension here is doing the
|
|
2478
|
+
per-frame compute that later phases depend on. There are no records yet — the frame has
|
|
2479
|
+
built nothing to hand out. Runs ahead of `scene.tick` and shadow allocation so scene-level
|
|
2480
|
+
producers at `FrameStart` (such as `GPUFluidSystem` publishing `GPUSceneWind`) have finalized
|
|
2481
|
+
their atlas and uniforms before `scene.tick` encodes.
|
|
2482
|
+
*/
|
|
2483
|
+
const frame = new FrameContext(graph, view_ctx);
|
|
2484
|
+
|
|
2485
|
+
frame.phase = FramePhase.FrameStart;
|
|
2486
|
+
|
|
2487
|
+
this.#extensions.run(frame);
|
|
2488
|
+
|
|
2431
2489
|
// Per-frame animation tick — runs before shadow allocation so
|
|
2432
2490
|
// animated transforms (joint poses, mesh.global from animated
|
|
2433
2491
|
// parents) are in the scene database by the time shadow
|
|
@@ -2436,7 +2494,7 @@ export class Renderer {
|
|
|
2436
2494
|
|
|
2437
2495
|
/*
|
|
2438
2496
|
The virtual-geometry frame, which spans every graph this render records: the shadow maps
|
|
2439
|
-
draw into graphs of their own before the `Shading` graph
|
|
2497
|
+
draw into graphs of their own before the `Shading` graph executes, and a shadow view cuts like
|
|
2440
2498
|
any other view (SHADOW_PLAN_2026_09_28). So it opens here — before the shadow block and
|
|
2441
2499
|
outside its `if`, so a frame with shadows off still opens and closes — for the view this
|
|
2442
2500
|
frame is rendered for, which takes the feedback's first slot. The readback is recorded into
|
|
@@ -2466,20 +2524,6 @@ export class Renderer {
|
|
|
2466
2524
|
sm.draw(command_ctx);
|
|
2467
2525
|
}
|
|
2468
2526
|
|
|
2469
|
-
|
|
2470
|
-
const graph = new FrameGraph("Shading");
|
|
2471
|
-
|
|
2472
|
-
/*
|
|
2473
|
-
The view is updated and nothing has been rasterized, so an extension here is doing the
|
|
2474
|
-
per-frame compute that later phases depend on. There are no records yet — the frame has
|
|
2475
|
-
built nothing to hand out.
|
|
2476
|
-
*/
|
|
2477
|
-
const frame = new FrameContext(graph, view_ctx);
|
|
2478
|
-
|
|
2479
|
-
frame.phase = FramePhase.FrameStart;
|
|
2480
|
-
|
|
2481
|
-
this.#extensions.run(frame);
|
|
2482
|
-
|
|
2483
2527
|
// build main view rasterization job
|
|
2484
2528
|
const raster_main = new RasterizationJob();
|
|
2485
2529
|
raster_main.view_ctx = view_ctx;
|
|
@@ -3177,16 +3221,29 @@ export class Renderer {
|
|
|
3177
3221
|
|
|
3178
3222
|
current_color_out = record_scene_color.color;
|
|
3179
3223
|
|
|
3224
|
+
const tonemap_shader = this.#tonemap_shader();
|
|
3225
|
+
|
|
3180
3226
|
// every pass reads from the settings only the members its immediate struct names: the canvas's primaries
|
|
3181
3227
|
// from its working space, and, on an HDR display, the peak
|
|
3228
|
+
const tonemap_inputs = {
|
|
3229
|
+
input_color: current_color_out,
|
|
3230
|
+
settings: this.#tonemap_settings,
|
|
3231
|
+
exposure,
|
|
3232
|
+
};
|
|
3233
|
+
|
|
3234
|
+
if (tonemap_shader === shader_tonemap_HDR_aces) {
|
|
3235
|
+
// the two ACES 2.0 transforms for this display, rebuilt only when the display changed
|
|
3236
|
+
const display = this.#tonemap_settings;
|
|
3237
|
+
const tables = this.#tonemap_aces2_tables;
|
|
3238
|
+
|
|
3239
|
+
tables.update(display.peak_nits);
|
|
3240
|
+
tonemap_inputs.aces2_tables = graph_import_buffer(graph, tables.gpu_buffer(this.device), "tonemap/aces2 tables");
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3182
3243
|
[current_color_out] = graph_image_pass({
|
|
3183
3244
|
graph,
|
|
3184
|
-
shader:
|
|
3185
|
-
inputs:
|
|
3186
|
-
input_color: current_color_out,
|
|
3187
|
-
settings: this.#tonemap_settings,
|
|
3188
|
-
exposure
|
|
3189
|
-
},
|
|
3245
|
+
shader: tonemap_shader,
|
|
3246
|
+
inputs: tonemap_inputs,
|
|
3190
3247
|
output: [gr_texture_canvas]
|
|
3191
3248
|
});
|
|
3192
3249
|
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* How the exposed scene colour becomes display colour.
|
|
3
3
|
*
|
|
4
4
|
* One choice for every display. The same mode runs on an SDR and an HDR output, so a scene looks the same on both up
|
|
5
|
-
* to the SDR display's limits. That is the reason Polyphony give for GT7's operator, and
|
|
6
|
-
* setting on purpose.
|
|
5
|
+
* to the SDR display's limits. That is the reason Polyphony give for GT7's operator, and Epic's for how Unreal 5.8
|
|
6
|
+
* takes its Filmic picture to HDR, and there is no per-output setting on purpose.
|
|
7
7
|
*/
|
|
8
8
|
export type ShadeToneMappingMode = number;
|
|
9
9
|
export namespace ShadeToneMappingMode {
|
|
10
10
|
let GT7: number;
|
|
11
11
|
let NONE: number;
|
|
12
12
|
let PBR_NEUTRAL: number;
|
|
13
|
+
let ACES: number;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=ShadeToneMappingMode.d.ts.map
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* How the exposed scene colour becomes display colour.
|
|
3
3
|
*
|
|
4
4
|
* One choice for every display. The same mode runs on an SDR and an HDR output, so a scene looks the same on both up
|
|
5
|
-
* to the SDR display's limits. That is the reason Polyphony give for GT7's operator, and
|
|
6
|
-
* setting on purpose.
|
|
5
|
+
* to the SDR display's limits. That is the reason Polyphony give for GT7's operator, and Epic's for how Unreal 5.8
|
|
6
|
+
* takes its Filmic picture to HDR, and there is no per-output setting on purpose.
|
|
7
7
|
*
|
|
8
8
|
* @enum {number}
|
|
9
9
|
*/
|
|
10
10
|
export const ShadeToneMappingMode = {
|
|
11
11
|
/**
|
|
12
|
-
* GT7 tone mapping (Polyphony Digital, SIGGRAPH 2025). An exposed 1.0 shows at
|
|
13
|
-
*
|
|
12
|
+
* GT7 tone mapping (Polyphony Digital, SIGGRAPH 2025). An exposed 1.0 shows at the paper white on both outputs.
|
|
13
|
+
* SDR clips at that paper white, the curve's SDR mode, and HDR rolls off to the display's peak.
|
|
14
14
|
*/
|
|
15
15
|
GT7: 0,
|
|
16
16
|
/**
|
|
@@ -27,4 +27,15 @@ export const ShadeToneMappingMode = {
|
|
|
27
27
|
* An exposed 0.18 shows at 0.14 of SDR white, where {@link GT7} shows it at 0.179.
|
|
28
28
|
*/
|
|
29
29
|
PBR_NEUTRAL: 2,
|
|
30
|
+
/**
|
|
31
|
+
* Unreal Engine's default look, the default here too. SDR is UE's "Filmic" tone mapper at its default settings,
|
|
32
|
+
* the ACES-derived curve every Unreal title ships with unless it chose otherwise. HDR is what Unreal 5.8 does with
|
|
33
|
+
* the same method: the SDR picture, taken back to the scene through the inverse ACES 2.0 output transform for an
|
|
34
|
+
* SDR display, and rendered again with the ACES 2.0 output transform for the display's headroom.
|
|
35
|
+
*
|
|
36
|
+
* An exposed 0.18 shows at 0.18 of SDR white, as with {@link GT7}, with a mid-tone contrast of 1.36 against GT7's
|
|
37
|
+
* 1.05. On HDR the picture expands into the headroom and mid-grey rises with it, by ACES 2.0's design: 0.26 of SDR
|
|
38
|
+
* white at a 1000 cd/m² display.
|
|
39
|
+
*/
|
|
40
|
+
ACES: 3,
|
|
30
41
|
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Unified Rest-Anchored Delta Animation Blending
|
|
2
|
+
|
|
3
|
+
**Status:** Approved & Implemented (Zero Runtime Switches / Enums)
|
|
4
|
+
|
|
5
|
+
## 1. Core Insight: Why Bone Masks, Override Layers, and Runtime Blend Enums Are Not Needed
|
|
6
|
+
|
|
7
|
+
In traditional engines where animations are dense full-skeleton arrays, combining a lower-body
|
|
8
|
+
animation with an upper-body or additive animation requires runtime **bone masks**, an explicit
|
|
9
|
+
**override layer mode**, and a runtime **additive vs. absolute clip switch**.
|
|
10
|
+
|
|
11
|
+
`meep-engine` needs none of these:
|
|
12
|
+
1. **`ShadeAnimationClip` is already sparse per-node and per-axis.** A clip's `channels` array only
|
|
13
|
+
contains entries for the specific entities (joints) and axes it keys. An upper-body clip with
|
|
14
|
+
only upper-body channels leaves every lower-body joint untouched. Any per-bone feathering (e.g.
|
|
15
|
+
`Spine_01` moving 30% as much as `Spine_03`) is naturally authored into the keyframe curves.
|
|
16
|
+
2. **Every clip in the runtime is evaluated as a weighted delta from the target joint's Rest Pose
|
|
17
|
+
($V_{\text{rest}}$).**
|
|
18
|
+
Instead of accumulating raw $w_i \cdot V_i(t)$ into a zero-based slot (which collapses
|
|
19
|
+
translation and scale toward zero whenever $\sum w_i < 1$, and ignores partial weights on single
|
|
20
|
+
rotation clips), the apply pass accumulates weighted **deltas from rest**
|
|
21
|
+
$w_i \cdot (V_i(t) - V_{\text{rest}})$ and the resolve pass adds the accumulated delta back onto
|
|
22
|
+
$V_{\text{rest}}$:
|
|
23
|
+
$$V_{\text{final}} = V_{\text{rest}} + \sum_i w_i \cdot \bigl(V_i(t) - V_{\text{rest}}\bigr)$$
|
|
24
|
+
(with $R_{\text{final}} = \text{normalize}(R_{\text{rest}} + \sum_i w_i \cdot (R_i(t) - R_{\text{rest}}))$ for rotation).
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. Adversarial Pass on the Zero-Runtime-Switch Design
|
|
29
|
+
|
|
30
|
+
### 2.1. Why Naive "Import-Only Zero-Centered Deltas" Fail on a Zero-Based Accumulator
|
|
31
|
+
Suppose we kept the old zero-based accumulator ($V_{\text{final}} = \sum_i w_i V_i(t)$) and tried to
|
|
32
|
+
bake additive clips at import time as raw zero-centered deltas $\Delta V(t) = V(t) - V_{\text{ref}}$:
|
|
33
|
+
- **Failure 1 (Unkeyed Base Channels / `clip.optimize`):** `load_gltf` calls `clip.optimize(rest)`,
|
|
34
|
+
stripping un-animated channels. In `Michelle.glb`, `SambaDancing` only keys `Translation` on 1 of
|
|
35
|
+
65 bones (`Hips`) and `Rotation` on 52 of 65 bones. If an additive clip keys a bone or axis that
|
|
36
|
+
the base clip does *not* key, the zero-based accumulator receives only $0 + w_{\text{add}} \Delta T$,
|
|
37
|
+
**wiping out the bone's rest translation and scale to zero**.
|
|
38
|
+
- **Failure 2 (Rotation Collapse on Unkeyed Base Bones):** On a bone whose rotation is not keyed by
|
|
39
|
+
the active base clip, a zero-centered quaternion difference $\Delta R = R(t) - R_{\text{ref}}$ has
|
|
40
|
+
$w \approx 0$ for small angles. Normalizing $0 + w_{\text{add}} \Delta R$ without $R_{\text{rest}}$
|
|
41
|
+
normalizes a pure-imaginary chordal vector, **snapping the bone by $90^\circ$**.
|
|
42
|
+
- **Failure 3 (Single Partial-Weight Clip):** On a zero-based accumulator, a single clip fading in
|
|
43
|
+
with weight $w \in (0, 1)$ scales translation and scale toward zero ($w \cdot T$, $w \cdot S$)
|
|
44
|
+
while leaving rotation at 100% full strength ($\text{normalize}(w \cdot R) = R$), then snaps at
|
|
45
|
+
$w = 0$.
|
|
46
|
+
|
|
47
|
+
### 2.2. How Unified Rest-Anchored Delta Accumulation Solves Every Case Without Switches
|
|
48
|
+
Under $V_{\text{final}} = V_{\text{rest}} + \sum_i w_i \cdot (V_i(t) - V_{\text{rest}})$:
|
|
49
|
+
1. **Single clip at $w = 1$:**
|
|
50
|
+
$$V_{\text{rest}} + 1 \cdot (V_1 - V_{\text{rest}}) = V_1$$
|
|
51
|
+
2. **Silent clip at $w = 0$ (fixes D37/E14 at the root for T, R, and S):**
|
|
52
|
+
$$V_{\text{rest}} + 0 \cdot (V_1 - V_{\text{rest}}) = V_{\text{rest}}$$
|
|
53
|
+
A bound clip at weight zero never clobbers non-zero rest translation or scale.
|
|
54
|
+
3. **Single partial-body clip fading $w: 0 \to 1$:**
|
|
55
|
+
$$V_{\text{rest}} + w \cdot (V_1 - V_{\text{rest}}) = (1 - w) V_{\text{rest}} + w V_1$$
|
|
56
|
+
Smoothly interpolates (lerp for T/S, nlerp for R) from the joint's rest pose to $V_1$.
|
|
57
|
+
4. **Two full-body clips crossfading ($w_1 + w_2 = 1$):**
|
|
58
|
+
$$V_{\text{rest}} + w_1(V_1 - V_{\text{rest}}) + w_2(V_2 - V_{\text{rest}}) = w_1 V_1 + w_2 V_2$$
|
|
59
|
+
Even if `clip.optimize` stripped a constant-at-rest channel from clip 1, clip 1's omitted delta
|
|
60
|
+
is identically $0$, so clip 2 still crossfades smoothly against $V_{\text{rest}}$!
|
|
61
|
+
5. **Base clip ($w_{\text{base}} = 1$, or crossfading base clips summing to $1$) + Additive /
|
|
62
|
+
Upper-Body clip ($w_{\text{add}} = w$):**
|
|
63
|
+
$$V_{\text{rest}} + 1 \cdot (V_{\text{base}} - V_{\text{rest}}) + w \cdot (V_{\text{add}} - V_{\text{rest}}) = V_{\text{base}} + w \cdot \Delta V_{\text{add}}$$
|
|
64
|
+
And on any bone/axis that $V_{\text{base}}$ does *not* key, it automatically evaluates to
|
|
65
|
+
$V_{\text{rest}} + w \cdot \Delta V_{\text{add}}$.
|
|
66
|
+
|
|
67
|
+
### 2.3. Adversarial Check: Why Quaternion Hemisphere Alignment Must Happen at Import/Build Time, Not Per-Frame in the Apply Shader
|
|
68
|
+
Suppose a base clip spins a joint past $180^\circ$ so $\text{dot}(R_{\text{base}}(t), R_{\text{rest}})$
|
|
69
|
+
crosses $0$ mid-clip, while an additive clip contributes $w_{\text{add}} \Delta R_{\text{add}}$.
|
|
70
|
+
If the apply shader flipped $R_{\text{base}}(t) \to -R_{\text{base}}(t)$ dynamically when
|
|
71
|
+
$\text{dot}(R_{\text{base}}(t), R_{\text{rest}}) < 0$, then at the crossing frame the sum would flip
|
|
72
|
+
from $+R_{\text{base}} + w_{\text{add}} \Delta R_{\text{add}}$ to
|
|
73
|
+
$-R_{\text{base}} + w_{\text{add}} \Delta R_{\text{add}} = -(R_{\text{base}} - w_{\text{add}} \Delta R_{\text{add}})$,
|
|
74
|
+
inverting the direction of the additive offset mid-animation!
|
|
75
|
+
By keeping sign canonicalization strictly at clip import/creation time (`quat3_canonicalize_sign_run`
|
|
76
|
+
anchored to $R_{\text{rest}}$ at keyframe 0 and continuous across consecutive keyframes), curves
|
|
77
|
+
remain $C^1$-continuous everywhere and the apply shader has zero sign-flip branches.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 3. Architecture
|
|
82
|
+
|
|
83
|
+
### 3.1. Accumulator Layout ([`POSE_ACCUMULATOR_LAYOUT.js`](./POSE_ACCUMULATOR_LAYOUT.js))
|
|
84
|
+
|
|
85
|
+
Expand each per-row slot in `pose_accumulator` from 16 `u32`s (64 bytes) to 32 `u32`s (128 bytes,
|
|
86
|
+
preserving power-of-two shift indexing) so rest translation and rest scale ride alongside rest
|
|
87
|
+
rotation:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Word Offset Field Description
|
|
91
|
+
──────────────────────────────────────────────────────────────────────────────────────────
|
|
92
|
+
[0..3] translation.xyz Σ w_i * (T_i - rest_T)
|
|
93
|
+
[3..7] rotation.xyzw Σ w_i * (R_i - rest_R)
|
|
94
|
+
[7..10] scale.xyz Σ w_i * (S_i - rest_S)
|
|
95
|
+
[10] dirty_mask Bitmask of touched channels (TX, TY, TZ, R, SX, SY, SZ)
|
|
96
|
+
[11..15] rest_rotation.xyzw Target joint's rest rotation
|
|
97
|
+
[15..18] rest_translation.xyz Target joint's rest translation
|
|
98
|
+
[18..21] rest_scale.xyz Target joint's rest scale
|
|
99
|
+
[21..32] padding Power-of-two slot alignment (32 u32s = 128 bytes)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 3.2. Zero-Overhead Binding Rest Value ([`ANIMATION_TRACK_BINDING_STRUCT.js`](./ANIMATION_TRACK_BINDING_STRUCT.js))
|
|
103
|
+
|
|
104
|
+
Each row in `animation_bindings` targets a single `property` (`Translation`, `Rotation`, or `Scale`)
|
|
105
|
+
and already carries a `vec4f` field (`rest_rotation`). By populating that `vec4f` with the target
|
|
106
|
+
entity's rest value for its bound `property`—`[tx, ty, tz, 0]` for Translation, `[sx, sy, sz, 0]`
|
|
107
|
+
for Scale, and `[rx, ry, rz, rw]` for Rotation, both at binding completion and in
|
|
108
|
+
`GPUAnimationManager.#unmute`—the binding struct stays 32 bytes with zero extra memory overhead.
|
|
109
|
+
|
|
110
|
+
### 3.3. GPU Apply & Resolve ([`chunk_pose_accumulator.js`](./chunk_pose_accumulator.js), [`shader_animation_pose_resolve.js`](./shader_animation_pose_resolve.js))
|
|
111
|
+
|
|
112
|
+
- **Apply (`chunk_pose_accumulator`):**
|
|
113
|
+
- `pose_accumulator_add_translation(row, value, mask, weight, rest)`: for each masked axis $a$,
|
|
114
|
+
atomic-adds `value[a] - rest[a] * weight` into `POSE_OFFSET_TRANSLATION + a` and stores
|
|
115
|
+
`rest[a]` into `POSE_OFFSET_REST_TRANSLATION + a`.
|
|
116
|
+
- `pose_accumulator_add_rotation(row, value, mask, weight, rest)`: substitutes `weight` for a
|
|
117
|
+
missing $w$ curve (`let w = select(weight, value.w, (mask & 0x8u) != 0u)`), atomic-adds
|
|
118
|
+
`(value.xyz, w) - rest * weight` into `POSE_OFFSET_ROTATION`, and stores `rest` into
|
|
119
|
+
`POSE_OFFSET_REST_ROTATION`.
|
|
120
|
+
- `pose_accumulator_add_scale(row, value, mask, weight, rest)`: for each masked axis $a$,
|
|
121
|
+
atomic-adds `value[a] - rest[a] * weight` into `POSE_OFFSET_SCALE + a` and stores `rest[a]`
|
|
122
|
+
into `POSE_OFFSET_REST_SCALE + a`.
|
|
123
|
+
- **Resolve (`shader_animation_pose_resolve`):**
|
|
124
|
+
- Translation (per dirty axis $a$): `t[a] = rest_t[a] + delta_t[a]`, then zeroes `delta_t[a]`.
|
|
125
|
+
- Rotation (when `POSE_DIRTY_R` set): `r = rest_r + delta_r`, zeroes `delta_r`, and writes
|
|
126
|
+
`normalize(r)` when `length(r) > 0.0`, else `rest_r`.
|
|
127
|
+
- Scale (per dirty axis $a$): `s[a] = rest_s[a] + delta_s[a]`, then zeroes `delta_s[a]`.
|
|
128
|
+
|
|
129
|
+
### 3.4. CPU Twin Lockstep ([`pose_evaluate_local.js`](./pose/pose_evaluate_local.js))
|
|
130
|
+
|
|
131
|
+
`pose_evaluate_local(result, target, rest, playbacks)` accumulates `(curve.evaluate(time) - rest_comp) * weight`
|
|
132
|
+
into `SUM_TRANSLATION`, `SUM_ROTATION`, and `SUM_SCALE`, and resolves `rest + SUM` (normalizing
|
|
133
|
+
rotation with fallback to `rest.rotation` on zero length), matching the GPU bit-for-bit.
|
|
134
|
+
|
|
135
|
+
### 3.5. Import / Authoring Stage Additive Rebasing ([`ShadeAnimationClip.js`](./ShadeAnimationClip.js))
|
|
136
|
+
|
|
137
|
+
`ShadeAnimationClip.from_additive(source_clip, { reference_clip, reference_time, rest_of, name })`
|
|
138
|
+
rebases a clip authored relative to `reference_clip` at `reference_time` onto each target's rest
|
|
139
|
+
pose `rest_of(target)`:
|
|
140
|
+
- $T_{\text{out}}(t) = T_{\text{rest}} + (T_{\text{src}}(t) - T_{\text{ref}})$
|
|
141
|
+
- $S_{\text{out}}(t) = S_{\text{rest}} + (S_{\text{src}}(t) - S_{\text{ref}})$
|
|
142
|
+
- $R_{\text{out}}(t) = (R_{\text{src}}(t) \otimes R_{\text{ref}}^{-1}) \otimes R_{\text{rest}}$,
|
|
143
|
+
sign-canonicalized against $R_{\text{rest}}$
|
|
144
|
+
- Automatically drops any axis curve or rotation channel whose delta from $V_{\text{ref}}$ is zero
|
|
145
|
+
across all keyframes (within `1e-5`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Schema for the GPU-side animation system.
|
|
3
3
|
*
|
|
4
|
-
* Tables fall into
|
|
4
|
+
* Tables fall into four categories:
|
|
5
5
|
*
|
|
6
6
|
* - **Animation data** (immutable per curve definition): `animation_curves`
|
|
7
7
|
* (curve headers, each naming a run of keyframes), `animation_keyframes`
|
|
@@ -21,6 +21,14 @@
|
|
|
21
21
|
* joint row, writing `node.global * inverse_bind` into the shared
|
|
22
22
|
* skin-matrices scratch buffer at the joint's own row.
|
|
23
23
|
*
|
|
24
|
+
* - **Foliage fluid bones**: `animation_foliage_rigs` (one row per placed
|
|
25
|
+
* foliage rig — the run of its aeroelastic joints and the root node
|
|
26
|
+
* transform row) and `animation_foliage_joints` (one aeroelastic joint
|
|
27
|
+
* per row, storing rest orientation, branch axis, compliance, spring-damper
|
|
28
|
+
* state, and target Node3D row). Evaluated each frame by sampling
|
|
29
|
+
* `GPUSceneWind` (`wind_field_sample`) and contributing rotations into
|
|
30
|
+
* `pose_accumulator`.
|
|
31
|
+
*
|
|
24
32
|
* Where a record has many of something, they are a run of rows it names by
|
|
25
33
|
* its first row and a count — a range, declared below, so removing the
|
|
26
34
|
* record removes the run.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANIMATION_DATABASE_SPEC.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/ANIMATION_DATABASE_SPEC.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ANIMATION_DATABASE_SPEC.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/ANIMATION_DATABASE_SPEC.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,4DAUG;sCAzDmC,0CAA0C"}
|
|
@@ -3,6 +3,8 @@ import { SCENE_DATABASE_SPEC } from "../scene/SCENE_DATABASE_SPEC.js";
|
|
|
3
3
|
import { ANIMATION_CLIP_STATE_STRUCT } from "./ANIMATION_CLIP_STATE_STRUCT.js";
|
|
4
4
|
import { ANIMATION_CURVE_HEADER_STRUCT } from "./ANIMATION_CURVE_HEADER_STRUCT.js";
|
|
5
5
|
import { ANIMATION_CURVE_KEYFRAME_STRUCT } from "./ANIMATION_CURVE_KEYFRAME_STRUCT.js";
|
|
6
|
+
import { ANIMATION_FOLIAGE_JOINT_STRUCT } from "./ANIMATION_FOLIAGE_JOINT_STRUCT.js";
|
|
7
|
+
import { ANIMATION_FOLIAGE_RIG_STRUCT } from "./ANIMATION_FOLIAGE_RIG_STRUCT.js";
|
|
6
8
|
import { ANIMATION_SKIN_JOINT_STRUCT } from "./ANIMATION_SKIN_JOINT_STRUCT.js";
|
|
7
9
|
import { ANIMATION_SKIN_STRUCT } from "./ANIMATION_SKIN_STRUCT.js";
|
|
8
10
|
import { ANIMATION_TRACK_BINDING_STRUCT } from "./ANIMATION_TRACK_BINDING_STRUCT.js";
|
|
@@ -11,7 +13,7 @@ import { ANIMATION_TRACK_METADATA_STRUCT } from "./ANIMATION_TRACK_METADATA_STRU
|
|
|
11
13
|
/**
|
|
12
14
|
* Schema for the GPU-side animation system.
|
|
13
15
|
*
|
|
14
|
-
* Tables fall into
|
|
16
|
+
* Tables fall into four categories:
|
|
15
17
|
*
|
|
16
18
|
* - **Animation data** (immutable per curve definition): `animation_curves`
|
|
17
19
|
* (curve headers, each naming a run of keyframes), `animation_keyframes`
|
|
@@ -31,6 +33,14 @@ import { ANIMATION_TRACK_METADATA_STRUCT } from "./ANIMATION_TRACK_METADATA_STRU
|
|
|
31
33
|
* joint row, writing `node.global * inverse_bind` into the shared
|
|
32
34
|
* skin-matrices scratch buffer at the joint's own row.
|
|
33
35
|
*
|
|
36
|
+
* - **Foliage fluid bones**: `animation_foliage_rigs` (one row per placed
|
|
37
|
+
* foliage rig — the run of its aeroelastic joints and the root node
|
|
38
|
+
* transform row) and `animation_foliage_joints` (one aeroelastic joint
|
|
39
|
+
* per row, storing rest orientation, branch axis, compliance, spring-damper
|
|
40
|
+
* state, and target Node3D row). Evaluated each frame by sampling
|
|
41
|
+
* `GPUSceneWind` (`wind_field_sample`) and contributing rotations into
|
|
42
|
+
* `pose_accumulator`.
|
|
43
|
+
*
|
|
34
44
|
* Where a record has many of something, they are a run of rows it names by
|
|
35
45
|
* its first row and a count — a range, declared below, so removing the
|
|
36
46
|
* record removes the run.
|
|
@@ -43,6 +53,8 @@ export const ANIMATION_DATABASE_SPEC = GPUDatabaseDefinition.from({
|
|
|
43
53
|
animation_bindings: ANIMATION_TRACK_BINDING_STRUCT,
|
|
44
54
|
animation_skins: ANIMATION_SKIN_STRUCT,
|
|
45
55
|
animation_skin_joints: ANIMATION_SKIN_JOINT_STRUCT,
|
|
56
|
+
animation_foliage_rigs: ANIMATION_FOLIAGE_RIG_STRUCT,
|
|
57
|
+
animation_foliage_joints: ANIMATION_FOLIAGE_JOINT_STRUCT,
|
|
46
58
|
});
|
|
47
59
|
|
|
48
60
|
// A curve owns its run of keyframes.
|
|
@@ -118,3 +130,43 @@ ANIMATION_DATABASE_SPEC.add_link({
|
|
|
118
130
|
nullable: true,
|
|
119
131
|
owning: false,
|
|
120
132
|
});
|
|
133
|
+
|
|
134
|
+
// A foliage wind rig owns its run of aeroelastic joints.
|
|
135
|
+
ANIMATION_DATABASE_SPEC.add_range({
|
|
136
|
+
table: 'animation_foliage_rigs',
|
|
137
|
+
first_field: 'joints_first',
|
|
138
|
+
count_field: 'joint_count',
|
|
139
|
+
target_database: ANIMATION_DATABASE_SPEC,
|
|
140
|
+
target_table: 'animation_foliage_joints',
|
|
141
|
+
owning: true,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// A foliage rig's root node in the scene transforms table (nullable while pending).
|
|
145
|
+
ANIMATION_DATABASE_SPEC.add_link({
|
|
146
|
+
table: 'animation_foliage_rigs',
|
|
147
|
+
field: 'root_node',
|
|
148
|
+
target_database: SCENE_DATABASE_SPEC,
|
|
149
|
+
target_table: 'transforms',
|
|
150
|
+
nullable: true,
|
|
151
|
+
owning: false,
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// A foliage joint's target node in the scene transforms table (nullable while pending or muted).
|
|
155
|
+
ANIMATION_DATABASE_SPEC.add_link({
|
|
156
|
+
table: 'animation_foliage_joints',
|
|
157
|
+
field: 'node',
|
|
158
|
+
target_database: SCENE_DATABASE_SPEC,
|
|
159
|
+
target_table: 'transforms',
|
|
160
|
+
nullable: true,
|
|
161
|
+
owning: false,
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Back-pointer from a foliage joint to its owning rig.
|
|
165
|
+
ANIMATION_DATABASE_SPEC.add_link({
|
|
166
|
+
table: 'animation_foliage_joints',
|
|
167
|
+
field: 'rig',
|
|
168
|
+
target_database: ANIMATION_DATABASE_SPEC,
|
|
169
|
+
target_table: 'animation_foliage_rigs',
|
|
170
|
+
nullable: false,
|
|
171
|
+
owning: false,
|
|
172
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One aeroelastic foliage bone in `animation_foliage_joints`, driven on the GPU by sampling
|
|
3
|
+
* `GPUSceneWind` (`wind_field_sample(pos_ws)`) at the joint's world position and integrating a
|
|
4
|
+
* second-order damped spring-damper oscillator with Strouhal vortex shedding.
|
|
5
|
+
*/
|
|
6
|
+
export const ANIMATION_FOLIAGE_JOINT_STRUCT: WebGPUStruct;
|
|
7
|
+
import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
|
|
8
|
+
//# sourceMappingURL=ANIMATION_FOLIAGE_JOINT_STRUCT.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ANIMATION_FOLIAGE_JOINT_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/ANIMATION_FOLIAGE_JOINT_STRUCT.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,0DA8D4B;6BArEC,gCAAgC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { f32, u32, vec3f, vec4f } from "../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
2
|
+
import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One aeroelastic foliage bone in `animation_foliage_joints`, driven on the GPU by sampling
|
|
6
|
+
* `GPUSceneWind` (`wind_field_sample(pos_ws)`) at the joint's world position and integrating a
|
|
7
|
+
* second-order damped spring-damper oscillator with Strouhal vortex shedding.
|
|
8
|
+
*/
|
|
9
|
+
export const ANIMATION_FOLIAGE_JOINT_STRUCT = WebGPUStruct.from({
|
|
10
|
+
/**
|
|
11
|
+
* Rest-pose local rotation quaternion `(x, y, z, w)` of the joint.
|
|
12
|
+
*/
|
|
13
|
+
rest_rotation: vec4f,
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Unit growth axis of the branch segment in tree model space.
|
|
17
|
+
* Cross-flow aerodynamic drag acts along `cross(branch_axis, wind_model)`.
|
|
18
|
+
*/
|
|
19
|
+
branch_axis: vec3f,
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Rotational aeroelastic compliance (`rad / (m/s)^2`) derived from the pipe-model cross-section radius.
|
|
23
|
+
* Zero for an immobile ground anchor joint.
|
|
24
|
+
*/
|
|
25
|
+
compliance: f32,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Stateful 3D axis-angle deflection vector `(theta_x, theta_y, theta_z)` in tree model space (radians).
|
|
29
|
+
*/
|
|
30
|
+
angular_displacement: vec3f,
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Undamped natural angular frequency `omega_0` (`rad/s`) of the branch's restoring bark stiffness.
|
|
34
|
+
*/
|
|
35
|
+
natural_frequency: f32,
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Stateful 3D angular velocity vector `(omega_x, omega_y, omega_z)` in tree model space (`rad/s`).
|
|
39
|
+
*/
|
|
40
|
+
angular_velocity: vec3f,
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Dimensionless damping ratio `zeta` (`> 0`).
|
|
44
|
+
*/
|
|
45
|
+
damping_ratio: f32,
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Target `transforms` row in `scene_database`, or `GPU_DATABASE_NULL` when pending or CPU-held.
|
|
49
|
+
*/
|
|
50
|
+
node: u32,
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Owning row in `animation_foliage_rigs`.
|
|
54
|
+
*/
|
|
55
|
+
rig: u32,
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Asymptotic soft-saturation deflection angle limit in radians (`theta_max`).
|
|
59
|
+
*/
|
|
60
|
+
max_angle: f32,
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Strouhal vortex-shedding oscillation amplitude factor.
|
|
64
|
+
*/
|
|
65
|
+
turbulence: f32,
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Stateful accumulated vortex-shedding phase in radians.
|
|
69
|
+
*/
|
|
70
|
+
flutter_phase: f32,
|
|
71
|
+
}, "AnimationFoliageJoint");
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-instance foliage wind rig header in `animation_foliage_rigs`.
|
|
3
|
+
*
|
|
4
|
+
* Owns a contiguous run of rows in `animation_foliage_joints` (`joints_first`, `joint_count`),
|
|
5
|
+
* references the tree root's `transforms` row (`root_node`) so the GPU solver can transform
|
|
6
|
+
* world-space wind vectors from `GPUSceneWind` into the tree's model frame, and carries an
|
|
7
|
+
* overall blend/strength scalar `weight`.
|
|
8
|
+
*/
|
|
9
|
+
export const ANIMATION_FOLIAGE_RIG_STRUCT: WebGPUStruct;
|
|
10
|
+
import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
|
|
11
|
+
//# sourceMappingURL=ANIMATION_FOLIAGE_RIG_STRUCT.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ANIMATION_FOLIAGE_RIG_STRUCT.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/ANIMATION_FOLIAGE_RIG_STRUCT.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wDAoB0B;6BA9BG,gCAAgC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { f32, u32 } from "../shader/type/WEBGPU_WGSL_PRIMITIVE_TYPES.js";
|
|
2
|
+
import { WebGPUStruct } from "../shader/type/WebGPUStruct.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Per-instance foliage wind rig header in `animation_foliage_rigs`.
|
|
6
|
+
*
|
|
7
|
+
* Owns a contiguous run of rows in `animation_foliage_joints` (`joints_first`, `joint_count`),
|
|
8
|
+
* references the tree root's `transforms` row (`root_node`) so the GPU solver can transform
|
|
9
|
+
* world-space wind vectors from `GPUSceneWind` into the tree's model frame, and carries an
|
|
10
|
+
* overall blend/strength scalar `weight`.
|
|
11
|
+
*/
|
|
12
|
+
export const ANIMATION_FOLIAGE_RIG_STRUCT = WebGPUStruct.from({
|
|
13
|
+
/**
|
|
14
|
+
* First row in `animation_foliage_joints` belonging to this rig, or `GPU_DATABASE_NULL` while pending.
|
|
15
|
+
*/
|
|
16
|
+
joints_first: u32,
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Number of joints in this rig's run.
|
|
20
|
+
*/
|
|
21
|
+
joint_count: u32,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Row in `scene_database.transforms` of the tree instance's root node, or `GPU_DATABASE_NULL` while pending.
|
|
25
|
+
*/
|
|
26
|
+
root_node: u32,
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Contribution weight into the pose accumulator (`1.0` = full aeroelastic response, `0.0` = muted).
|
|
30
|
+
*/
|
|
31
|
+
weight: f32,
|
|
32
|
+
}, "AnimationFoliageRig");
|