@woosh/meep-engine 3.47.0 → 3.50.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/build/bundle-worker-terrain.js +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts +12 -2
- package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
- package/editor/particles/effect/ParticleReferenceSimulation.js +30 -4
- package/editor/view/particles/effect/ParticleGraphEditorView.d.ts.map +1 -1
- package/editor/view/particles/effect/ParticleGraphEditorView.js +3 -1
- package/package.json +1 -1
- package/src/core/color/xyz/m3_rgb_to_xyz_from_primaries.d.ts +11 -0
- package/src/core/color/xyz/m3_rgb_to_xyz_from_primaries.d.ts.map +1 -0
- package/src/core/color/xyz/m3_rgb_to_xyz_from_primaries.js +40 -0
- package/src/core/geom/3d/mat4/m4_decompose_rigid_array.d.ts +24 -0
- package/src/core/geom/3d/mat4/m4_decompose_rigid_array.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_decompose_rigid_array.js +80 -0
- package/src/core/geom/3d/shape/PosedShape3D.d.ts +10 -0
- package/src/core/geom/3d/shape/PosedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/PosedShape3D.js +50 -11
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts +37 -0
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +73 -49
- package/src/core/geom/3d/shape/UnionShape3D.d.ts +13 -0
- package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnionShape3D.js +17 -4
- package/src/core/geom/3d/shape/record/ShapeRecord.d.ts +65 -0
- package/src/core/geom/3d/shape/record/ShapeRecord.d.ts.map +1 -0
- package/src/core/geom/3d/shape/record/ShapeRecord.js +72 -0
- package/src/core/geom/3d/shape/record/ShapeRecordKind.d.ts +13 -0
- package/src/core/geom/3d/shape/record/ShapeRecordKind.d.ts.map +1 -0
- package/src/core/geom/3d/shape/record/ShapeRecordKind.js +39 -0
- package/src/core/geom/3d/shape/record/shape_record_local_bounds.d.ts +19 -0
- package/src/core/geom/3d/shape/record/shape_record_local_bounds.d.ts.map +1 -0
- package/src/core/geom/3d/shape/record/shape_record_local_bounds.js +61 -0
- package/src/core/geom/3d/shape/record/shape_record_pack.d.ts +88 -0
- package/src/core/geom/3d/shape/record/shape_record_pack.d.ts.map +1 -0
- package/src/core/geom/3d/shape/record/shape_record_pack.js +418 -0
- package/src/core/geom/3d/shape/record/shape_record_pack_bounding_box.d.ts +23 -0
- package/src/core/geom/3d/shape/record/shape_record_pack_bounding_box.d.ts.map +1 -0
- package/src/core/geom/3d/shape/record/shape_record_pack_bounding_box.js +69 -0
- package/src/core/geom/3d/shape/record/shape_record_signed_distance.d.ts +52 -0
- package/src/core/geom/3d/shape/record/shape_record_signed_distance.d.ts.map +1 -0
- package/src/core/geom/3d/shape/record/shape_record_signed_distance.js +135 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts +7 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts.map +1 -1
- package/src/core/geom/3d/shape/sdf/sdf3_plane.js +7 -0
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.d.ts +3 -0
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.d.ts.map +1 -1
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.js +19 -13
- package/src/core/geom/clipmap/ClipmapWindowSet.d.ts +141 -0
- package/src/core/geom/clipmap/ClipmapWindowSet.d.ts.map +1 -0
- package/src/core/geom/clipmap/ClipmapWindowSet.js +301 -0
- package/src/core/geom/clipmap/clipmap_select_finest.d.ts +20 -0
- package/src/core/geom/clipmap/clipmap_select_finest.d.ts.map +1 -0
- package/src/core/geom/clipmap/clipmap_select_finest.js +53 -0
- package/src/core/geom/clipmap/quantize_hysteretic.d.ts +22 -0
- package/src/core/geom/clipmap/quantize_hysteretic.d.ts.map +1 -0
- package/src/core/geom/clipmap/quantize_hysteretic.js +33 -0
- package/src/core/geom/clipmap/window_scroll_regions.d.ts +25 -0
- package/src/core/geom/clipmap/window_scroll_regions.d.ts.map +1 -0
- package/src/core/geom/clipmap/window_scroll_regions.js +83 -0
- package/src/core/geom/vec3/v3_clamp_to_cone.d.ts +59 -0
- package/src/core/geom/vec3/v3_clamp_to_cone.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_clamp_to_cone.js +197 -0
- package/src/core/math/falloff_quadratic.d.ts +13 -0
- package/src/core/math/falloff_quadratic.d.ts.map +1 -0
- package/src/core/math/falloff_quadratic.js +20 -0
- package/src/core/math/physics/fluid/vortex_swirl.d.ts +40 -0
- package/src/core/math/physics/fluid/vortex_swirl.d.ts.map +1 -0
- package/src/core/math/physics/fluid/vortex_swirl.js +91 -0
- package/src/core/math/physics/kinematics/rigid_velocity_at_point.d.ts +27 -0
- package/src/core/math/physics/kinematics/rigid_velocity_at_point.d.ts.map +1 -0
- package/src/core/math/physics/kinematics/rigid_velocity_at_point.js +40 -0
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +6 -0
- package/src/engine/ecs/EntityComponentDataset.d.ts +48 -4
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +120 -11
- package/src/engine/ecs/async/WORKER_SYSTEM_PLAN.md +27 -11
- package/src/engine/ecs/fow/FogOfWarVisibilityPredicate.d.ts.map +1 -1
- package/src/engine/ecs/fow/FogOfWarVisibilityPredicate.js +1 -3
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +13 -0
- package/src/engine/ecs/terrain/util/obtainTerrain.d.ts.map +1 -1
- package/src/engine/ecs/terrain/util/obtainTerrain.js +5 -0
- package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts +2 -2
- package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts.map +1 -1
- package/src/engine/graphics/ecs/particles/ParticleEffect.js +7 -7
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts +8 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.js +11 -3
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts +26 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts.map +1 -0
- package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.js +91 -0
- package/src/engine/graphics/ecs/water/WaterWaves.d.ts +8 -21
- package/src/engine/graphics/ecs/water/WaterWaves.d.ts.map +1 -1
- package/src/engine/graphics/ecs/water/WaterWaves.js +8 -31
- package/src/engine/graphics/ecs/water/WaterWavesSerializationAdapter.d.ts +4 -0
- package/src/engine/graphics/ecs/water/WaterWavesSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/water/WaterWavesSerializationAdapter.js +5 -5
- package/src/engine/graphics/ecs/water/WaterWavesSerializationUpgrader_1_2.d.ts +9 -0
- package/src/engine/graphics/ecs/water/WaterWavesSerializationUpgrader_1_2.d.ts.map +1 -0
- package/src/engine/graphics/ecs/water/WaterWavesSerializationUpgrader_1_2.js +19 -0
- package/src/engine/graphics/texture/3d/scs3d_sample_linear3.d.ts +21 -0
- package/src/engine/graphics/texture/3d/scs3d_sample_linear3.d.ts.map +1 -1
- package/src/engine/graphics/texture/3d/scs3d_sample_linear3.js +78 -0
- package/src/engine/graphics3/GPUFluidSystem.d.ts +266 -0
- package/src/engine/graphics3/GPUFluidSystem.d.ts.map +1 -0
- package/src/engine/graphics3/GPUFluidSystem.js +1613 -0
- package/src/engine/graphics3/GPUParticleEmitterSystem.js +2 -2
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +8 -1
- package/src/engine/graphics3/ParticipatingMedia.d.ts +90 -1
- package/src/engine/graphics3/ParticipatingMedia.d.ts.map +1 -1
- package/src/engine/graphics3/ParticipatingMedia.js +145 -5
- package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.d.ts +6 -2
- package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.js +29 -4
- package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.d.ts +10 -0
- package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.js +38 -0
- package/src/engine/graphics3/ParticipatingMediaSystem.d.ts +32 -22
- package/src/engine/graphics3/ParticipatingMediaSystem.d.ts.map +1 -1
- package/src/engine/graphics3/ParticipatingMediaSystem.js +236 -45
- package/src/engine/graphics3/WaterSystem.d.ts +9 -2
- package/src/engine/graphics3/WaterSystem.d.ts.map +1 -1
- package/src/engine/graphics3/WaterSystem.js +53 -15
- package/src/engine/network/NetworkSession.d.ts +16 -5
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +104 -7
- package/src/engine/network/README.md +27 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +40 -18
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +180 -190
- package/src/engine/network/replication/Replicator.d.ts +15 -4
- package/src/engine/network/replication/Replicator.d.ts.map +1 -1
- package/src/engine/network/replication/Replicator.js +50 -16
- package/src/engine/network/state/RecordArrivalRing.d.ts +57 -0
- package/src/engine/network/state/RecordArrivalRing.d.ts.map +1 -0
- package/src/engine/network/state/RecordArrivalRing.js +144 -0
- package/src/engine/physics/cloth/MEASUREMENTS.md +393 -0
- package/src/engine/physics/cloth/PLAN.md +106 -7
- package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderKind.js +14 -7
- package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts +19 -5
- package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/ClothColliderRecord.js +28 -5
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +3 -2
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_pack.js +26 -108
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +6 -5
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -1
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +18 -28
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +6 -21
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +6 -22
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +5 -3
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +10 -3
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts +38 -28
- package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothWorld.js +140 -43
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +2 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +6 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +20 -10
- package/src/engine/physics/cloth/playground/README.md +8 -4
- package/src/engine/physics/cloth/playground/collide.html +5 -3
- package/src/engine/physics/cloth/playground/collide_main.js +14 -13
- package/src/engine/physics/cloth/playground/wind.html +4 -4
- package/src/engine/physics/cloth/playground/wind_build.d.ts +3 -2
- package/src/engine/physics/cloth/playground/wind_build.d.ts.map +1 -1
- package/src/engine/physics/cloth/playground/wind_build.js +4 -3
- package/src/engine/physics/cloth/playground/wind_main.js +58 -19
- package/src/engine/physics/cloth/solver/ClothState.d.ts +30 -2
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +62 -4
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +11 -3
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_self_find.js +52 -11
- package/src/engine/physics/cloth/solver/cloth_self_radius.d.ts +42 -0
- package/src/engine/physics/cloth/solver/cloth_self_radius.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_self_radius.js +64 -0
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +99 -24
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +102 -25
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +5 -1
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +13 -3
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +0 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step_instance.js +12 -14
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +23 -4
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +36 -8
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +4 -2
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +36 -35
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/AbstractClothWind.js +36 -35
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +46 -25
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +70 -30
- package/src/engine/physics/cloth/wind/ClothGPUFluidWind.d.ts +96 -0
- package/src/engine/physics/cloth/wind/ClothGPUFluidWind.d.ts.map +1 -0
- package/src/engine/physics/cloth/wind/ClothGPUFluidWind.js +441 -0
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts +9 -7
- package/src/engine/physics/cloth/wind/cloth_sample_air.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/cloth_sample_air.js +9 -7
- package/src/engine/physics/ecs/ColliderObserverSystem.d.ts +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +1 -1
- package/src/engine/physics/fluid/FluidAtmosphere.d.ts +80 -0
- package/src/engine/physics/fluid/FluidAtmosphere.d.ts.map +1 -0
- package/src/engine/physics/fluid/FluidAtmosphere.js +78 -0
- package/src/engine/physics/fluid/FluidField.d.ts +14 -2
- package/src/engine/physics/fluid/FluidField.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidField.js +26 -6
- package/src/engine/physics/fluid/FluidSimulator.d.ts +5 -1
- package/src/engine/physics/fluid/FluidSimulator.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidSimulator.js +13 -2
- package/src/engine/physics/fluid/GPU_FLUID_CASCADES_PROPOSAL_2026_10_16.md +1382 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponent.d.ts +10 -4
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponent.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponent.js +13 -4
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponentSerializationAdapter.d.ts +47 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponentSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponentSerializationAdapter.js +72 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsSystem.d.ts +67 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsSystem.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/FluidEffectorsSystem.js +307 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +6 -6
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +24 -13
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidSystem.js +79 -15
- package/src/engine/physics/fluid/ecs/FluidWorkerCore.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidWorkerCore.js +17 -5
- package/src/engine/physics/fluid/ecs/GPUFluidComponent.d.ts +82 -0
- package/src/engine/physics/fluid/ecs/GPUFluidComponent.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/GPUFluidComponent.js +124 -0
- package/src/engine/physics/fluid/ecs/GPUFluidComponentSerializationAdapter.d.ts +30 -0
- package/src/engine/physics/fluid/ecs/GPUFluidComponentSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/fluid/ecs/GPUFluidComponentSerializationAdapter.js +51 -0
- package/src/engine/physics/fluid/ecs/WorkerFluidSystem.d.ts +19 -10
- package/src/engine/physics/fluid/ecs/WorkerFluidSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/WorkerFluidSystem.js +64 -14
- package/src/engine/physics/fluid/ecs/fluid_gather_visible_effectors.d.ts +4 -1
- package/src/engine/physics/fluid/ecs/fluid_gather_visible_effectors.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/fluid_gather_visible_effectors.js +9 -1
- package/src/engine/physics/fluid/ecs/fluid_reanchor_field.d.ts +1 -0
- package/src/engine/physics/fluid/ecs/fluid_reanchor_field.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/fluid_reanchor_field.js +9 -7
- package/src/engine/physics/fluid/ecs/fluid_sync_effectors_from_transform.d.ts +5 -3
- package/src/engine/physics/fluid/ecs/fluid_sync_effectors_from_transform.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/fluid_sync_effectors_from_transform.js +5 -3
- package/src/engine/physics/fluid/ecs/fluid_worker_protocol.d.ts +20 -2
- package/src/engine/physics/fluid/ecs/fluid_worker_protocol.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/fluid_worker_protocol.js +34 -6
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +46 -3
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +53 -3
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts +73 -13
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +207 -88
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationAdapter.d.ts +35 -0
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationAdapter.js +72 -0
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts +34 -10
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/ImpulseFluidEffector.js +139 -150
- package/src/engine/physics/fluid/effector/ImpulseFluidEffectorSerializationAdapter.d.ts +26 -0
- package/src/engine/physics/fluid/effector/ImpulseFluidEffectorSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/ImpulseFluidEffectorSerializationAdapter.js +51 -0
- package/src/engine/physics/fluid/effector/VortexFluidEffector.d.ts +55 -0
- package/src/engine/physics/fluid/effector/VortexFluidEffector.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/VortexFluidEffector.js +255 -0
- package/src/engine/physics/fluid/effector/VortexFluidEffectorSerializationAdapter.d.ts +25 -0
- package/src/engine/physics/fluid/effector/VortexFluidEffectorSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/VortexFluidEffectorSerializationAdapter.js +52 -0
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts +22 -20
- package/src/engine/physics/fluid/effector/WakeFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/WakeFluidEffector.js +181 -185
- package/src/engine/physics/fluid/effector/WakeFluidEffectorSerializationAdapter.d.ts +31 -0
- package/src/engine/physics/fluid/effector/WakeFluidEffectorSerializationAdapter.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/WakeFluidEffectorSerializationAdapter.js +56 -0
- package/src/engine/physics/fluid/effector/record/FLUID_EFFECTOR_RECORD_STRUCT.d.ts +52 -0
- package/src/engine/physics/fluid/effector/record/FLUID_EFFECTOR_RECORD_STRUCT.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/FLUID_EFFECTOR_RECORD_STRUCT.js +68 -0
- package/src/engine/physics/fluid/effector/record/FluidEffectorRecordKind.d.ts +10 -0
- package/src/engine/physics/fluid/effector/record/FluidEffectorRecordKind.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/FluidEffectorRecordKind.js +31 -0
- package/src/engine/physics/fluid/effector/record/chunk_fluid_effector_record_deposit.d.ts +25 -0
- package/src/engine/physics/fluid/effector/record/chunk_fluid_effector_record_deposit.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/chunk_fluid_effector_record_deposit.js +105 -0
- package/src/engine/physics/fluid/effector/record/chunk_fluid_effector_record_resolve.d.ts +17 -0
- package/src/engine/physics/fluid/effector/record/chunk_fluid_effector_record_resolve.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/chunk_fluid_effector_record_resolve.js +47 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_create.d.ts +54 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_create.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_create.js +34 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_deposit.d.ts +98 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_deposit.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_deposit.js +409 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_resolve.d.ts +25 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_resolve.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/fluid_effector_record_resolve.js +78 -0
- package/src/engine/physics/fluid/effector/record/fluid_record_apply.d.ts +27 -0
- package/src/engine/physics/fluid/effector/record/fluid_record_apply.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/record/fluid_record_apply.js +151 -0
- package/src/engine/physics/fluid/fluid_apply_atmosphere.d.ts +42 -0
- package/src/engine/physics/fluid/fluid_apply_atmosphere.d.ts.map +1 -0
- package/src/engine/physics/fluid/fluid_apply_atmosphere.js +148 -0
- package/src/engine/physics/fluid/fluid_atmosphere_to_grid.d.ts +16 -0
- package/src/engine/physics/fluid/fluid_atmosphere_to_grid.d.ts.map +1 -0
- package/src/engine/physics/fluid/fluid_atmosphere_to_grid.js +47 -0
- package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.d.ts +32 -0
- package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.d.ts.map +1 -0
- package/src/engine/physics/fluid/obstacle/FLUID_OBSTACLE_RECORD_STRUCT.js +50 -0
- package/src/engine/physics/fluid/obstacle/chunk_fluid_obstacle_record.d.ts +24 -0
- package/src/engine/physics/fluid/obstacle/chunk_fluid_obstacle_record.d.ts.map +1 -0
- package/src/engine/physics/fluid/obstacle/chunk_fluid_obstacle_record.js +61 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.d.ts +58 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.d.ts.map +1 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_create.js +35 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_evaluate.d.ts +34 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_evaluate.d.ts.map +1 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_evaluate.js +90 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_extent.d.ts +17 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_extent.d.ts.map +1 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_record_extent.js +44 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.d.ts +98 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.d.ts.map +1 -0
- package/src/engine/physics/fluid/obstacle/fluid_obstacle_write_gpu_record.js +281 -0
- package/src/engine/physics/fluid/prototype.js +2 -0
- package/src/engine/physics/narrowphase/rigid_subject_pose.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/rigid_subject_pose.js +3 -43
- package/src/generation/markers/actions/terrain/MarkerNodeActionPaintTerrain.js +4 -4
- package/src/shade/assets/textures/split_sum.bin +0 -0
- package/src/shade/device/ShadeGPUCommandContext.d.ts +20 -0
- package/src/shade/device/ShadeGPUCommandContext.d.ts.map +1 -1
- package/src/shade/device/ShadeGPUCommandContext.js +25 -8
- package/src/shade/device/mock/SoftwareGPUComputePassEncoder.d.ts +6 -2
- package/src/shade/device/mock/SoftwareGPUComputePassEncoder.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUComputePassEncoder.js +7 -3
- package/src/shade/device/mock/SoftwareGPUDevice.d.ts +15 -0
- package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUDevice.js +21 -0
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts +20 -0
- package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/ComputePipelineManager.js +80 -6
- package/src/shade/device/pipeline/PipelineEnquiry.d.ts +52 -0
- package/src/shade/device/pipeline/PipelineEnquiry.d.ts.map +1 -0
- package/src/shade/device/pipeline/PipelineEnquiry.js +63 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts +21 -0
- package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
- package/src/shade/device/pipeline/RenderPipelineManager.js +84 -4
- package/src/shade/playground/avboit/main.d.ts.map +1 -1
- package/src/shade/playground/avboit/main.js +9 -6
- package/src/shade/playground/contact_shadows/ContactShadowLab.d.ts +137 -0
- package/src/shade/playground/contact_shadows/ContactShadowLab.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/ContactShadowLab.js +654 -0
- package/src/shade/playground/contact_shadows/README.md +126 -0
- package/src/shade/playground/contact_shadows/index.html +191 -0
- package/src/shade/playground/contact_shadows/main.d.ts +2 -0
- package/src/shade/playground/contact_shadows/main.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/main.js +888 -0
- package/src/shade/playground/contact_shadows/scenes.d.ts +48 -0
- package/src/shade/playground/contact_shadows/scenes.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/scenes.js +620 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.d.ts +36 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +245 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_reference.d.ts +15 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_reference.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_reference.js +120 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_stats.d.ts +55 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_stats.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_stats.js +216 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_view.d.ts +20 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_view.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_lab_view.js +114 -0
- package/src/shade/playground/contact_shadows/shader_contact_shadow_march.d.ts +11 -0
- package/src/shade/playground/contact_shadows/shader_contact_shadow_march.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/shader_contact_shadow_march.js +90 -0
- package/src/shade/playground/contact_shadows/textures.d.ts +16 -0
- package/src/shade/playground/contact_shadows/textures.d.ts.map +1 -0
- package/src/shade/playground/contact_shadows/textures.js +123 -0
- package/src/shade/playground/particle_ecs/README.md +21 -1
- package/src/shade/playground/particle_ecs/bonfire_effects.d.ts +10 -0
- package/src/shade/playground/particle_ecs/bonfire_effects.d.ts.map +1 -1
- package/src/shade/playground/particle_ecs/bonfire_effects.js +10 -0
- package/src/shade/playground/particle_ecs/bonfire_wind.d.ts +48 -0
- package/src/shade/playground/particle_ecs/bonfire_wind.d.ts.map +1 -0
- package/src/shade/playground/particle_ecs/bonfire_wind.js +83 -0
- package/src/shade/playground/particle_ecs/effects/embers.json +1695 -1633
- package/src/shade/playground/particle_ecs/effects/flame.json +1994 -1881
- package/src/shade/playground/particle_ecs/effects/smoke.json +113 -15
- package/src/shade/playground/particle_ecs/effects/soot.json +214 -145
- package/src/shade/playground/particle_ecs/index.html +21 -0
- package/src/shade/playground/particle_ecs/main.js +35 -1
- package/src/shade/playground/path_traced_media/main.js +12 -10
- package/src/shade/playground/render_submitted_frames.d.ts +20 -0
- package/src/shade/playground/render_submitted_frames.d.ts.map +1 -0
- package/src/shade/playground/render_submitted_frames.js +29 -0
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +4 -6
- package/src/shade/playground/skinned_blas_refit/verify_instance_bounds.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_instance_bounds.js +267 -270
- package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.js +3 -6
- package/src/shade/playground/skinned_mesh_soup/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_mesh_soup/main.js +4 -5
- package/src/shade/playground/skinned_mesh_soup/verify_clone_vertices.js +438 -438
- package/src/shade/playground/ssr_motion/README.md +24 -22
- package/src/shade/playground/ssr_motion/main.js +150 -149
- package/src/shade/playground/ssr_reprojection/SpatialFilterProbe.js +1 -1
- package/src/shade/playground/ssr_reprojection/main.js +5 -3
- package/src/shade/playground/ssr_variance/capture.js +1 -1
- package/src/shade/playground/ssr_variance/main.js +247 -246
- package/src/shade/playground/submit_frame.d.ts +25 -0
- package/src/shade/playground/submit_frame.d.ts.map +1 -0
- package/src/shade/playground/submit_frame.js +36 -0
- package/src/shade/playground/tonemap_sdr/README.md +90 -0
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.d.ts +105 -0
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/ToneMapCompare.js +389 -0
- package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.d.ts +32 -0
- package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.js +104 -0
- package/src/shade/playground/tonemap_sdr/index.html +90 -0
- package/src/shade/playground/tonemap_sdr/main.d.ts +2 -0
- package/src/shade/playground/tonemap_sdr/main.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/main.js +306 -0
- package/src/shade/playground/tonemap_sdr/scenes.d.ts +26 -0
- package/src/shade/playground/tonemap_sdr/scenes.d.ts.map +1 -0
- package/src/shade/playground/tonemap_sdr/scenes.js +404 -0
- package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
- package/src/shade/playground/volumetrics_froxel/main.js +91 -4
- package/src/shade/playground/water_refraction/README.md +30 -20
- package/src/shade/playground/water_refraction/index.html +1 -1
- package/src/shade/playground/water_refraction/main.js +19 -3
- package/src/shade/playground/water_refraction/world.d.ts.map +1 -1
- package/src/shade/playground/water_refraction/world.js +2 -1
- package/src/shade/playground/water_surface/README.md +15 -7
- package/src/shade/playground/water_surface/index.html +2 -1
- package/src/shade/playground/water_surface/main.js +39 -7
- package/src/shade/playground/water_surface/world.d.ts +2 -5
- package/src/shade/playground/water_surface/world.d.ts.map +1 -1
- package/src/shade/playground/water_surface/world.js +9 -8
- package/src/shade/renderer/INDIRECT_LIGHTING.d.ts +13 -0
- package/src/shade/renderer/INDIRECT_LIGHTING.d.ts.map +1 -0
- package/src/shade/renderer/INDIRECT_LIGHTING.js +14 -0
- package/src/shade/renderer/Renderer.d.ts +35 -3
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +260 -57
- package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.d.ts +17 -0
- package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js +19 -0
- package/src/shade/renderer/ShadeToneMappingMode.d.ts +14 -0
- package/src/shade/renderer/ShadeToneMappingMode.d.ts.map +1 -0
- package/src/shade/renderer/ShadeToneMappingMode.js +30 -0
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts +9 -0
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +14 -0
- package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.js +5 -3
- package/src/shade/renderer/buffer/table/GPUDatabase.d.ts +7 -0
- package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUDatabase.js +19 -4
- package/src/shade/renderer/buffer/table/GPUDatabaseReadback.d.ts +32 -2
- package/src/shade/renderer/buffer/table/GPUDatabaseReadback.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUDatabaseReadback.js +231 -62
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts +12 -0
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUTypedTable.js +51 -14
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts +8 -0
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.js +12 -0
- package/src/shade/renderer/camera/CAMERA_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/camera/CAMERA_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/camera/CAMERA_RESOURCE.js +8 -0
- package/src/shade/renderer/camera/GPUCameraContext.d.ts.map +1 -1
- package/src/shade/renderer/camera/GPUCameraContext.js +19 -8
- package/src/shade/renderer/deferred/GBUFFER_RESOURCES.d.ts +22 -0
- package/src/shade/renderer/deferred/GBUFFER_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/deferred/GBUFFER_RESOURCES.js +25 -0
- package/src/shade/renderer/deferred/LOCAL_LIGHT_SHADING.d.ts +12 -0
- package/src/shade/renderer/deferred/LOCAL_LIGHT_SHADING.d.ts.map +1 -0
- package/src/shade/renderer/deferred/LOCAL_LIGHT_SHADING.js +13 -0
- package/src/shade/renderer/deferred/LocalLightShading.d.ts +10 -0
- package/src/shade/renderer/deferred/LocalLightShading.d.ts.map +1 -0
- package/src/shade/renderer/deferred/LocalLightShading.js +12 -0
- package/src/shade/renderer/deferred/SHADING_LIGHT_RESOURCE_GROUP.d.ts.map +1 -1
- package/src/shade/renderer/deferred/SHADING_LIGHT_RESOURCE_GROUP.js +15 -11
- package/src/shade/renderer/deferred/TonemapDisplaySettings.d.ts +50 -0
- package/src/shade/renderer/deferred/TonemapDisplaySettings.d.ts.map +1 -0
- package/src/shade/renderer/deferred/TonemapDisplaySettings.js +142 -0
- package/src/shade/renderer/deferred/chunk_read_gBuffer_material.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_read_gBuffer_material.js +10 -1
- package/src/shade/renderer/deferred/chunk_sample_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_sample_volumetrics.js +11 -1
- package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts +1 -2
- package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_directional_lights.js +4 -2
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts +10 -3
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.js +27 -5
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_deferred.d.ts +16 -0
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_deferred.d.ts.map +1 -0
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_deferred.js +23 -0
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_heavy.d.ts +3 -2
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_heavy.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_heavy.js +17 -16
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts +3 -2
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts.map +1 -1
- package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js +13 -2
- package/src/shade/renderer/deferred/indirect/chunk_get_ibl_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/deferred/indirect/chunk_get_ibl_irradiance.js +4 -1
- package/src/shade/renderer/deferred/indirect/chunk_get_ibl_radiance.d.ts.map +1 -1
- package/src/shade/renderer/deferred/indirect/chunk_get_ibl_radiance.js +4 -1
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.d.ts.map +1 -1
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.js +7 -0
- package/src/shade/renderer/deferred/shader_deferred_main.d.ts +11 -6
- package/src/shade/renderer/deferred/shader_deferred_main.d.ts.map +1 -1
- package/src/shade/renderer/deferred/shader_deferred_main.js +69 -87
- package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts +6 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts.map +1 -1
- package/src/shade/renderer/deferred/shader_tonemap_HDR.js +22 -18
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts +9 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_none.js +66 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts +10 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.js +80 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts +6 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts.map +1 -1
- package/src/shade/renderer/deferred/shader_tonemap_LDR.js +27 -7
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts +9 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_none.js +71 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts +10 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts.map +1 -0
- package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.js +76 -0
- package/src/shade/renderer/fluid/FluidCascadePlacement.d.ts +142 -0
- package/src/shade/renderer/fluid/FluidCascadePlacement.d.ts.map +1 -0
- package/src/shade/renderer/fluid/FluidCascadePlacement.js +349 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +383 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts.map +1 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.js +1217 -0
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +191 -0
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts.map +1 -0
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.js +463 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_FILL_STRUCT.d.ts +27 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_FILL_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_FILL_STRUCT.js +43 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_GHOSTS.d.ts +31 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_GHOSTS.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_GHOSTS.js +38 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_PARENT_STRUCT.d.ts +46 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_PARENT_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_PARENT_STRUCT.js +61 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_RESTRICT_STRUCT.d.ts +25 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_RESTRICT_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_RESTRICT_STRUCT.js +41 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_epilogue.d.ts +52 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_epilogue.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_epilogue.js +146 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.d.ts +41 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.js +238 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_fill.d.ts +32 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_fill.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_fill.js +141 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_ghosts.d.ts +34 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_ghosts.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_ghosts.js +101 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_restrict.d.ts +31 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_restrict.d.ts.map +1 -0
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_restrict.js +126 -0
- package/src/shade/renderer/fluid/fluid_cascade_ruler.d.ts +15 -0
- package/src/shade/renderer/fluid/fluid_cascade_ruler.d.ts.map +1 -0
- package/src/shade/renderer/fluid/fluid_cascade_ruler.js +38 -0
- package/src/shade/renderer/fluid/fluid_cascade_window.d.ts +41 -0
- package/src/shade/renderer/fluid/fluid_cascade_window.d.ts.map +1 -0
- package/src/shade/renderer/fluid/fluid_cascade_window.js +49 -0
- package/src/shade/renderer/fluid/forcing/FLUID_DATABASE_SPEC.d.ts +68 -0
- package/src/shade/renderer/fluid/forcing/FLUID_DATABASE_SPEC.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/FLUID_DATABASE_SPEC.js +103 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING.d.ts +71 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING.js +100 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.d.ts +21 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_APPLY_STRUCT.js +35 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_EXTRACT_STRUCT.d.ts +18 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_EXTRACT_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_EXTRACT_STRUCT.js +27 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_QUERY_STRUCT.d.ts +17 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_QUERY_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/FLUID_FORCING_QUERY_STRUCT.js +28 -0
- package/src/shade/renderer/fluid/forcing/FLUID_OBSTACLE_PLANE_STRUCT.d.ts +12 -0
- package/src/shade/renderer/fluid/forcing/FLUID_OBSTACLE_PLANE_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/FLUID_OBSTACLE_PLANE_STRUCT.js +16 -0
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +289 -0
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.js +1487 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.d.ts +32 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_cell.js +87 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_leaf.d.ts +28 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_leaf.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_leaf.js +99 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_query_select.d.ts +29 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_query_select.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/chunk_fluid_forcing_query_select.js +67 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.d.ts +38 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_apply.js +287 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_command.d.ts +18 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_command.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_command.js +64 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_extract.d.ts +22 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_extract.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_extract.js +168 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_query.d.ts +31 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_query.d.ts.map +1 -0
- package/src/shade/renderer/fluid/forcing/shader_fluid_forcing_query.js +208 -0
- package/src/shade/renderer/fluid/mac/FLUID_MAC_STEP_STRUCT.d.ts +35 -0
- package/src/shade/renderer/fluid/mac/FLUID_MAC_STEP_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/FLUID_MAC_STEP_STRUCT.js +50 -0
- package/src/shade/renderer/fluid/mac/FluidMacPasses.d.ts +162 -0
- package/src/shade/renderer/fluid/mac/FluidMacPasses.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/FluidMacPasses.js +384 -0
- package/src/shade/renderer/fluid/mac/FluidMacVelocitySet.d.ts +40 -0
- package/src/shade/renderer/fluid/mac/FluidMacVelocitySet.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/FluidMacVelocitySet.js +77 -0
- package/src/shade/renderer/fluid/mac/V3_MAC_LATTICE_TAP_STRUCT.d.ts +14 -0
- package/src/shade/renderer/fluid/mac/V3_MAC_LATTICE_TAP_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/V3_MAC_LATTICE_TAP_STRUCT.js +19 -0
- package/src/shade/renderer/fluid/mac/chunk_fluid_mac_seams.d.ts +35 -0
- package/src/shade/renderer/fluid/mac/chunk_fluid_mac_seams.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_fluid_mac_seams.js +178 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_advect_maccormack.d.ts +17 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_advect_maccormack.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_advect_maccormack.js +156 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_clip_trace.d.ts +31 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_clip_trace.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_clip_trace.js +63 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_compute_divergence.d.ts +27 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_compute_divergence.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_compute_divergence.js +42 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_face_carrier.d.ts +25 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_face_carrier.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_face_carrier.js +67 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_face_pinned.d.ts +23 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_face_pinned.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_face_pinned.js +38 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_lattice_corners.d.ts +33 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_lattice_corners.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_lattice_corners.js +231 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_subtract_pressure_gradient.d.ts +30 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_subtract_pressure_gradient.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_subtract_pressure_gradient.js +66 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_vorticity_confinement.d.ts +27 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_vorticity_confinement.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/chunk_v3_mac_vorticity_confinement.js +65 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts +43 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.js +245 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_predict.d.ts +31 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_predict.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_predict.js +109 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_curl.d.ts +38 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_curl.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_curl.js +222 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_divergence.d.ts +26 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_divergence.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_divergence.js +92 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_gradient.d.ts +32 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_gradient.d.ts.map +1 -0
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_gradient.js +181 -0
- package/src/shade/renderer/fluid/pressure/FLUID_MG.d.ts +112 -0
- package/src/shade/renderer/fluid/pressure/FLUID_MG.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/FLUID_MG.js +140 -0
- package/src/shade/renderer/fluid/pressure/FLUID_MG_PASS_STRUCT.d.ts +29 -0
- package/src/shade/renderer/fluid/pressure/FLUID_MG_PASS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/FLUID_MG_PASS_STRUCT.js +45 -0
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +156 -0
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.js +605 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_coarse_word.d.ts +18 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_coarse_word.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_coarse_word.js +48 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_level0_word.d.ts +17 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_level0_word.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_level0_word.js +47 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_prolong.d.ts +21 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_prolong.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_prolong.js +47 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_relax.d.ts +27 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_relax.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_relax.js +79 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_restrict.d.ts +18 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_restrict.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_restrict.js +35 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_word.d.ts +17 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_word.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_mg_word.js +34 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_pressure_ghost.d.ts +21 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_pressure_ghost.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/chunk_fluid_pressure_ghost.js +34 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarse_weights.d.ts +10 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarse_weights.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarse_weights.js +45 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarsest.d.ts +17 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarsest.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_coarsest.js +126 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_level0_weights.d.ts +10 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_level0_weights.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_level0_weights.js +44 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.d.ts +18 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_residual_restrict.js +149 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.d.ts +30 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.d.ts.map +1 -0
- package/src/shade/renderer/fluid/pressure/shader_fluid_mg_smooth.js +183 -0
- package/src/shade/renderer/fluid/publish/FLUID_WIND_PUBLISH_STRUCT.d.ts +9 -0
- package/src/shade/renderer/fluid/publish/FLUID_WIND_PUBLISH_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/publish/FLUID_WIND_PUBLISH_STRUCT.js +12 -0
- package/src/shade/renderer/fluid/publish/FluidWindPublish.d.ts +49 -0
- package/src/shade/renderer/fluid/publish/FluidWindPublish.d.ts.map +1 -0
- package/src/shade/renderer/fluid/publish/FluidWindPublish.js +136 -0
- package/src/shade/renderer/fluid/publish/chunk_fluid_wind_publish_cell.d.ts +24 -0
- package/src/shade/renderer/fluid/publish/chunk_fluid_wind_publish_cell.d.ts.map +1 -0
- package/src/shade/renderer/fluid/publish/chunk_fluid_wind_publish_cell.js +37 -0
- package/src/shade/renderer/fluid/publish/shader_fluid_wind_publish.d.ts +41 -0
- package/src/shade/renderer/fluid/publish/shader_fluid_wind_publish.d.ts.map +1 -0
- package/src/shade/renderer/fluid/publish/shader_fluid_wind_publish.js +122 -0
- package/src/shade/renderer/fluid/query/FLUID_QUERY_DATABASE_SPEC.d.ts +66 -0
- package/src/shade/renderer/fluid/query/FLUID_QUERY_DATABASE_SPEC.d.ts.map +1 -0
- package/src/shade/renderer/fluid/query/FLUID_QUERY_DATABASE_SPEC.js +88 -0
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +157 -0
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts.map +1 -0
- package/src/shade/renderer/fluid/query/GPUFluidQueries.js +709 -0
- package/src/shade/renderer/fluid/query/shader_fluid_query_gather.d.ts +47 -0
- package/src/shade/renderer/fluid/query/shader_fluid_query_gather.d.ts.map +1 -0
- package/src/shade/renderer/fluid/query/shader_fluid_query_gather.js +140 -0
- package/src/shade/renderer/geometry/GEOMETRY_ATTRIBUTE_DATA_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/geometry/GEOMETRY_ATTRIBUTE_DATA_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/GEOMETRY_ATTRIBUTE_DATA_RESOURCE.js +8 -0
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_BATCH_PLAN.md +619 -606
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.d.ts +3 -2
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.js +50 -44
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.d.ts +12 -9
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.js +447 -363
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.d.ts +7 -4
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.js +13 -6
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch_seed.d.ts +21 -0
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch_seed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch_seed.js +75 -0
- package/src/shade/renderer/geometry/meshlet/MESHLET_METADATA_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/geometry/meshlet/MESHLET_METADATA_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/geometry/meshlet/MESHLET_METADATA_RESOURCE.js +9 -0
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +58 -9
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +35 -25
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +99 -196
- package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/shader_build_sdf.js +125 -129
- package/src/shade/renderer/geometry/sdf/shader_sdf_visualize.js +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/BRICK4_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/BRICK4_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/BRICK4_RESOURCE.js +8 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.js +5 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/shader_brick4_bake_probes.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/bake/shader_brick4_bake_probes.js +7 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_load_probe.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_load_probe.js +4 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_node_by_position.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_node_by_position.js +4 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_node_sample_probes.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_node_sample_probes.js +3 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_probe_meta_pick2.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/chunk_brick4_probe_meta_pick2.js +4 -1
- 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 +3 -0
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js +4 -0
- package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.d.ts +15 -0
- package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/clipmap/shader_debug_clipmap.js +57 -57
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.js +5 -0
- 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 +3 -0
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.js +7 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.d.ts +39 -0
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.js +57 -4
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.js +3 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.js +4 -0
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.js +3 -0
- package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.js +4 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_REFIT_DEFERRED_DEFINITION.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_REFIT_DEFERRED_DEFINITION.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_REFIT_DEFERRED_DEFINITION.js +25 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_REFIT_DEFERRED_LAYOUT.d.ts +55 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_REFIT_DEFERRED_LAYOUT.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_REFIT_DEFERRED_LAYOUT.js +63 -0
- package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +248 -2
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.d.ts +7 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.js +45 -38
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.d.ts +2 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.js +81 -79
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.d.ts +2 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.js +5 -3
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.d.ts +21 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.js +42 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.d.ts +19 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.js +44 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_climb.d.ts +23 -11
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_climb.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_climb.js +171 -102
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_repair.d.ts +23 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_repair.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_repair.js +80 -0
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts +25 -5
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.js +189 -23
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_refit_lbvh.d.ts +55 -0
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_refit_lbvh.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_refit_lbvh.js +197 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.d.ts +27 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.js +222 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts +5 -4
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.js +20 -19
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.d.ts +3 -4
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.js +6 -23
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit.d.ts +6 -6
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit.js +11 -8
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit_prepare.d.ts +24 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit_prepare.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit_prepare.js +99 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit_repair.d.ts +17 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit_repair.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit_repair.js +63 -0
- package/src/shade/renderer/gpu_primitive/chunk_collection_u32_append.d.ts +19 -0
- package/src/shade/renderer/gpu_primitive/chunk_collection_u32_append.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/chunk_collection_u32_append.js +44 -0
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts +11 -0
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.js +14 -3
- package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.js +13 -3
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +14 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.d.ts +26 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.js +52 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.d.ts +32 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.js +89 -0
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +10 -0
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +20 -1
- package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts +10 -0
- package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts.map +1 -1
- package/src/shade/renderer/hiz/HierarchicalZBuffer.js +294 -281
- package/src/shade/renderer/light/GPULightCollection.d.ts +8 -0
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +18 -1
- package/src/shade/renderer/light/LIGHT_DATA_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/light/LIGHT_DATA_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/light/LIGHT_DATA_RESOURCE.js +8 -0
- package/src/shade/renderer/light/cluster/CLUSTER_LIGHT_LIST.d.ts +7 -0
- package/src/shade/renderer/light/cluster/CLUSTER_LIGHT_LIST.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/CLUSTER_LIGHT_LIST.js +16 -0
- package/src/shade/renderer/light/cluster/CLUSTER_LIGHT_PROXY.d.ts +12 -0
- package/src/shade/renderer/light/cluster/CLUSTER_LIGHT_PROXY.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/CLUSTER_LIGHT_PROXY.js +33 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_ASSIGNMENT_SETTINGS.d.ts +7 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_ASSIGNMENT_SETTINGS.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_ASSIGNMENT_SETTINGS.js +24 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_COARSE_BLOCK.d.ts +8 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_COARSE_BLOCK.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_COARSE_BLOCK.js +7 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_METADATA.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_METADATA.js +2 -3
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_RESOURCES.d.ts +17 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_RESOURCES.js +22 -0
- package/src/shade/renderer/light/cluster/PROPOSAL_ALGORITHM_2026_10_16.md +524 -0
- package/src/shade/renderer/light/cluster/PROPOSAL_HIERARCHICAL_2026_10_16.md +1101 -0
- package/src/shade/renderer/light/cluster/chunk_cluster_cell.d.ts +19 -0
- package/src/shade/renderer/light/cluster/chunk_cluster_cell.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/chunk_cluster_cell.js +133 -0
- package/src/shade/renderer/light/cluster/chunk_cluster_from_fragment_coord.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/chunk_cluster_from_fragment_coord.js +6 -1
- package/src/shade/renderer/light/cluster/chunk_cluster_light_proxy.d.ts +19 -0
- package/src/shade/renderer/light/cluster/chunk_cluster_light_proxy.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/chunk_cluster_light_proxy.js +95 -0
- package/src/shade/renderer/light/cluster/chunk_light_cluster_counts.d.ts +6 -4
- package/src/shade/renderer/light/cluster/chunk_light_cluster_counts.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/chunk_light_cluster_counts.js +10 -8
- package/src/shade/renderer/light/cluster/chunk_light_cluster_metadata_by_position.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/chunk_light_cluster_metadata_by_position.js +4 -1
- package/src/shade/renderer/light/cluster/cull/graph_cull_lights.d.ts +16 -0
- package/src/shade/renderer/light/cluster/cull/graph_cull_lights.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/cull/graph_cull_lights.js +234 -218
- package/src/shade/renderer/light/cluster/graph_assign_clsuters.d.ts +33 -1
- package/src/shade/renderer/light/cluster/graph_assign_clsuters.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/graph_assign_clsuters.js +184 -73
- package/src/shade/renderer/light/cluster/graph_build_light_clusters.d.ts +10 -1
- package/src/shade/renderer/light/cluster/graph_build_light_clusters.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/graph_build_light_clusters.js +19 -2
- package/src/shade/renderer/light/cluster/shader_cluster_assign_lights.d.ts +14 -2
- package/src/shade/renderer/light/cluster/shader_cluster_assign_lights.d.ts.map +1 -1
- package/src/shade/renderer/light/cluster/shader_cluster_assign_lights.js +230 -139
- package/src/shade/renderer/light/cluster/shader_cluster_coarse_mark.d.ts +19 -0
- package/src/shade/renderer/light/cluster/shader_cluster_coarse_mark.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/shader_cluster_coarse_mark.js +134 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_compact.d.ts +11 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_compact.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_compact.js +114 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_mark.d.ts +9 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_mark.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_mark.js +59 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_prepare.d.ts +14 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_prepare.d.ts.map +1 -0
- package/src/shade/renderer/light/cluster/shader_cluster_light_prepare.js +142 -0
- package/src/shade/renderer/light/environment/ENVIRONMENT_MAP_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/light/environment/ENVIRONMENT_MAP_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/ENVIRONMENT_MAP_RESOURCE.js +7 -0
- package/src/shade/renderer/light/environment/ENVIRONMENT_SH_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/light/environment/ENVIRONMENT_SH_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/ENVIRONMENT_SH_RESOURCE.js +8 -0
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +10 -0
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/execute_filter_environment_map.js +13 -0
- package/src/shade/renderer/light/environment/sh_exponential/README.md +2 -1
- package/src/shade/renderer/lightmap/GPULightMap.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/GPULightMap.js +5 -0
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.js +7 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.js +7 -1
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_density.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_density.js +4 -0
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_uv_checker.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_uv_checker.js +4 -0
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_view_flat.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_view_flat.js +4 -0
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_view_sh.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/debug/shader_lightmap_debug_view_sh.js +4 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.d.ts +16 -4
- package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
- package/src/shade/renderer/material/GPUMaterialManager.js +38 -8
- package/src/shade/renderer/material/standard/SHADING_MATERIAL_RESOURCE_GROUP.d.ts +22 -0
- package/src/shade/renderer/material/standard/SHADING_MATERIAL_RESOURCE_GROUP.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/SHADING_MATERIAL_RESOURCE_GROUP.js +33 -9
- package/src/shade/renderer/particles/DESIGN.md +65 -9
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +3 -0
- package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +453 -0
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts +5 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +13 -5
- package/src/shade/renderer/particles/data/particle_emitter_record.js +2 -2
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/ParticleNodeRegistry.js +21 -9
- package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.js +12 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts +60 -0
- package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.js +156 -0
- package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_node_parameters.js +1 -0
- package/src/shade/renderer/particles/graph/particle_node_presentation.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph/particle_node_presentation.js +8 -0
- package/src/shade/renderer/particles/graph_particles.d.ts +4 -1
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +13 -0
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts +13 -0
- package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/InstructionStream.js +13 -0
- package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts +1 -0
- package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts.map +1 -1
- package/src/shade/renderer/particles/isa/ParticleVMISA.js +8 -0
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts +2 -1
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/particle_program_equivalence.js +28 -6
- package/src/shade/renderer/particles/optimizer/particle_program_fuzz.js +1 -1
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
- package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +7 -0
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +2 -2
- package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ParticleEmitter.js +8 -8
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +6 -4
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +7 -6
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +91 -58
- package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit.js +5 -2
- package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.js +5 -2
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +5 -2
- package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.js +5 -2
- package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +16 -1
- package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/ParticleVMReference.js +35 -2
- package/src/shade/renderer/particles/vm/chunk_particle_vm.d.ts.map +1 -1
- package/src/shade/renderer/particles/vm/chunk_particle_vm.js +8 -0
- package/src/shade/renderer/particles/vm/chunk_particle_vm_wind_field.d.ts +20 -0
- package/src/shade/renderer/particles/vm/chunk_particle_vm_wind_field.d.ts.map +1 -0
- package/src/shade/renderer/particles/vm/chunk_particle_vm_wind_field.js +25 -0
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +4 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +8 -0
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.js +109 -106
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.d.ts.map +1 -1
- package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.js +71 -68
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +5 -0
- package/src/shade/renderer/path_tracer/accumulating/shader_accumulating_path_tracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/shader_accumulating_path_tracer.js +8 -2
- package/src/shade/renderer/path_tracer/graph_path_trace_scene.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/graph_path_trace_scene.js +11 -1
- package/src/shade/renderer/path_tracer/shader/chunk_render_trace_path.js +4 -4
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +3 -3
- package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.d.ts +7 -0
- package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.js +18 -0
- package/src/shade/renderer/postprocess/denoise/LigmaDenoiser.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/denoise/LigmaDenoiser.js +1 -0
- package/src/shade/renderer/postprocess/denoise/shader_temporal_reprojection_luma.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/denoise/shader_temporal_reprojection_luma.js +6 -4
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +11 -0
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +16 -0
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +10 -0
- package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/GTAO.js +16 -0
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.js +32 -10
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +11 -8
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +49 -52
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_temporal_accumulate.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_temporal_accumulate.js +3 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts +28 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +79 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +30 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +66 -0
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts +11 -0
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/ssr/resolve/{build_ssr_resolve_shader.js → ssr_resolve_shader.js} +98 -87
- package/src/shade/renderer/postprocess/taa/TAA.d.ts +12 -0
- package/src/shade/renderer/postprocess/taa/TAA.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/TAA.js +15 -0
- package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -0
- 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 +13 -0
- package/src/shade/renderer/rasterize/TemplatePassDescriptor.d.ts +31 -3
- package/src/shade/renderer/rasterize/TemplatePassDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/TemplatePassDescriptor.js +79 -4
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +17 -0
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +35 -4
- package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.d.ts +7 -0
- package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.js +182 -169
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/GPUCollectionLimits.js +4 -0
- package/src/shade/renderer/rasterize/expand/RasterizationCollectionType.d.ts +1 -0
- package/src/shade/renderer/rasterize/expand/RasterizationCollectionType.js +5 -0
- package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.js +20 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +18 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.js +20 -1
- package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.d.ts +7 -0
- package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.js +187 -170
- package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.js +19 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts +13 -0
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.js +25 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts +10 -0
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +20 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts +25 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +33 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_brick4.d.ts +10 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_brick4.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_brick4.js +38 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_environment.d.ts +9 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_environment.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_environment.js +30 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.d.ts +10 -0
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/forward/{chunk_forward_shade_standard_fragment_brick4.js → chunk_forward_shade_standard_fragment.js} +66 -33
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +3 -3
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +3 -3
- package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts +9 -4
- 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 +11 -5
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +8 -6
- 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 +27 -45
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.d.ts +18 -0
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/native/avboit/{shader_avboit_draw_brick4.js → shader_avboit_draw.js} +26 -21
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.js +3 -3
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +3 -2
- 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 +26 -47
- package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.d.ts +12 -8
- package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.js +128 -123
- package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.js +3 -3
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts +11 -2
- 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 +21 -13
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts +15 -0
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +35 -2
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts +14 -0
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +32 -4
- package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts +17 -0
- package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.js +34 -4
- package/src/shade/renderer/restir/di/RESTIR_RADIANCE_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/restir/di/RESTIR_RADIANCE_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/restir/di/RESTIR_RADIANCE_RESOURCE.js +7 -0
- package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts +5 -3
- package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_resolve.js +8 -3
- package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/graph_restir_di.js +1 -0
- package/src/shade/renderer/restir/di/shader_restir_di_resolve.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/shader_restir_di_resolve.js +5 -1
- package/src/shade/renderer/restir/reservoir/shader.d.ts.map +1 -1
- package/src/shade/renderer/restir/reservoir/shader.js +7 -4
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +7 -0
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +13 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +19 -1
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +40 -1
- package/src/shade/renderer/scene/MESH_INSTANCE_METADATA_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/scene/MESH_INSTANCE_METADATA_STRUCT.js +5 -0
- package/src/shade/renderer/scene/SCENE_DATABASE_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/scene/SCENE_DATABASE_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/scene/SCENE_DATABASE_RESOURCE.js +8 -0
- package/src/shade/renderer/scene/SceneManager.d.ts +9 -0
- package/src/shade/renderer/scene/SceneManager.d.ts.map +1 -1
- package/src/shade/renderer/scene/SceneManager.js +11 -0
- package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.d.ts +11 -0
- package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.d.ts.map +1 -1
- package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.js +17 -0
- package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts +11 -0
- package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts.map +1 -1
- package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.js +18 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts +14 -0
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +114 -10
- package/src/shade/renderer/shader/ComputeShader.d.ts +33 -0
- package/src/shade/renderer/shader/ComputeShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ComputeShader.js +107 -0
- package/src/shade/renderer/shader/ImageShader.d.ts +27 -8
- package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
- package/src/shade/renderer/shader/ImageShader.js +70 -1
- package/src/shade/renderer/shader/ShaderDescriptor.d.ts +27 -0
- package/src/shade/renderer/shader/ShaderDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/shader/ShaderDescriptor.js +149 -1
- package/src/shade/renderer/shader/chunk/brdf/FRESNEL_BRIEF_2026_10_16.md +394 -0
- package/src/shade/renderer/shader/chunk/brdf/chunk_BRDF_GGX.d.ts +4 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_BRDF_GGX.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_BRDF_GGX.js +7 -4
- package/src/shade/renderer/shader/chunk/brdf/dfg/chunk_integrate_brdf.d.ts +4 -1
- package/src/shade/renderer/shader/chunk/brdf/dfg/chunk_integrate_brdf.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/dfg/chunk_integrate_brdf.js +9 -9
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.d.ts +10 -1
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.js +16 -5
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.d.ts +82 -0
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_cooperative.js +286 -0
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_frontier.d.ts +47 -0
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_frontier.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/chunk_bvh_query_aabb_frontier.js +121 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.js +45 -0
- package/src/shade/renderer/shader/chunk/camera/chunk_screen_coordinate_to_view.js +3 -3
- package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js +38 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_contains.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_contains.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_contains.js +20 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.d.ts +19 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_select_finest.js +71 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_storage_coord.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_storage_coord.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/clipmap/chunk_clipmap_storage_coord.js +25 -0
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_FROM_REC709_TO_P3.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_FROM_REC709_TO_P3.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_FROM_REC709_TO_P3.js +26 -0
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +62 -62
- package/src/shade/renderer/shader/chunk/color/tonemap/HDR_TONE_MAPPING_FORMS_BRIEF_2026_10_16.md +318 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/SDR_TONE_MAPPING_BRIEF_2026_10_16.md +237 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.js +22 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.d.ts +14 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.js +28 -15
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.js +122 -110
- package/src/shade/renderer/shader/chunk/geometry/aabb3/chunk_aabb3_intersects_aabb3.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/geometry/aabb3/chunk_aabb3_intersects_aabb3.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/aabb3/chunk_aabb3_intersects_aabb3.js +24 -0
- package/src/shade/renderer/shader/chunk/geometry/aabb3/chunk_aabb3_signed_distance_to_point.d.ts +3 -0
- package/src/shade/renderer/shader/chunk/geometry/aabb3/chunk_aabb3_signed_distance_to_point.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/aabb3/chunk_aabb3_signed_distance_to_point.js +9 -10
- package/src/shade/renderer/shader/chunk/geometry/chunk_point_closest_on_line.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/geometry/chunk_point_closest_on_line.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/chunk_point_closest_on_line.js +28 -0
- package/src/shade/renderer/shader/chunk/geometry/chunk_point_distance_to_line.d.ts +3 -2
- package/src/shade/renderer/shader/chunk/geometry/chunk_point_distance_to_line.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/chunk_point_distance_to_line.js +8 -17
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_u32.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_u32.js +3 -0
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_vec2f.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_vec2f.js +4 -1
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_vec3f.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_attribute_vec3f.js +4 -1
- package/src/shade/renderer/shader/chunk/geometry/plane/chunk_point_distance_above_plane.d.ts +8 -0
- package/src/shade/renderer/shader/chunk/geometry/plane/chunk_point_distance_above_plane.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/plane/chunk_point_distance_above_plane.js +8 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.js +33 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_angle_stable.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_angle_stable.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_angle_stable.js +21 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_clamp_to_cone.d.ts +21 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_clamp_to_cone.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_clamp_to_cone.js +49 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_slerp.d.ts +29 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_slerp.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/vec3/chunk_v3_slerp.js +86 -0
- package/src/shade/renderer/shader/chunk/grid/GRID_TILE_WINDOW_STRUCT.d.ts +24 -0
- package/src/shade/renderer/shader/chunk/grid/GRID_TILE_WINDOW_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/grid/GRID_TILE_WINDOW_STRUCT.js +30 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_halo_f32.d.ts +55 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_halo_f32.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_halo_f32.js +101 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_halo_vec4.d.ts +24 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_halo_vec4.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_halo_vec4.js +70 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_window.d.ts +42 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_window.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/grid/chunk_grid_tile_window.js +88 -0
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts +4 -0
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.js +12 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.js +4 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.js +4 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.js +4 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.js +4 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.js +4 -1
- 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 +6 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.js +13 -1
- package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js +7 -0
- package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +159 -0
- package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.js +29 -5
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +24 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +84 -0
- package/src/shade/renderer/shader/chunk/material/chunk_re_indirect_specular_physical.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_re_indirect_specular_physical.js +2 -0
- package/src/shade/renderer/shader/chunk/math/chunk_falloff_quadratic.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/math/chunk_falloff_quadratic.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/math/chunk_falloff_quadratic.js +20 -0
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.js +4 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.js +3 -0
- package/src/shade/renderer/shader/chunk/physics/fluid/chunk_vortex_swirl.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/physics/fluid/chunk_vortex_swirl.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/physics/fluid/chunk_vortex_swirl.js +39 -0
- package/src/shade/renderer/shader/chunk/physics/kinematics/chunk_rigid_velocity_at_point.d.ts +12 -0
- package/src/shade/renderer/shader/chunk/physics/kinematics/chunk_rigid_velocity_at_point.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/physics/kinematics/chunk_rigid_velocity_at_point.js +21 -0
- package/src/shade/renderer/shader/chunk/screen_space/SCREEN_SPACE_RESOURCES.d.ts +17 -0
- package/src/shade/renderer/shader/chunk/screen_space/SCREEN_SPACE_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/screen_space/SCREEN_SPACE_RESOURCES.js +19 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_load_depth.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_load_depth.js +5 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_load_world_space_normal.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_load_world_space_normal.js +4 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_screen_space_to_view_space.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_screen_space_to_view_space.js +4 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_validate_hit.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/screen_space/chunk_ffx_sssr_validate_hit.js +3 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.d.ts +43 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.js +319 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_scene_sdf_raymarch.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/sdf/chunk_scene_sdf_raymarch.js +3 -5
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_box.d.ts +16 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_box.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_box.js +28 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_capsule.d.ts +18 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_capsule.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_capsule.js +30 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_cylinder.d.ts +18 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_cylinder.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_cylinder.js +28 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_sphere.d.ts +13 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_sphere.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf3_sphere.js +20 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf_texture_region_sample_linear_uv.d.ts +7 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf_texture_region_sample_linear_uv.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf_texture_region_sample_linear_uv.js +16 -41
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_kind.d.ts +10 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_kind.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_kind.js +24 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_local_bounds.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_local_bounds.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_local_bounds.js +54 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance.d.ts +23 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance.js +82 -0
- package/src/shade/renderer/shader/chunk/spherical_harmonics/exponential/chunk_sh_exp_split_sum.d.ts +4 -3
- package/src/shade/renderer/shader/chunk/spherical_harmonics/exponential/chunk_sh_exp_split_sum.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/exponential/chunk_sh_exp_split_sum.js +4 -3
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_append_slot.d.ts +31 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_append_slot.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_append_slot.js +60 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/subgroup/chunk_subgroup_atomic_add.js +29 -0
- package/src/shade/renderer/shader/chunk/texture/TEXTURE3D_TRILINEAR_CORNERS_STRUCT.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/texture/TEXTURE3D_TRILINEAR_CORNERS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/texture/TEXTURE3D_TRILINEAR_CORNERS_STRUCT.js +20 -0
- package/src/shade/renderer/shader/chunk/texture/chunk_texel_coordinate_to_uv3.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/texture/chunk_texel_coordinate_to_uv3.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/texture/chunk_texel_coordinate_to_uv3.js +18 -0
- package/src/shade/renderer/shader/chunk/texture/chunk_uv3_to_texel_coordinate.d.ts +11 -0
- package/src/shade/renderer/shader/chunk/texture/chunk_uv3_to_texel_coordinate.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/texture/chunk_uv3_to_texel_coordinate.js +18 -0
- package/src/shade/renderer/shader/chunk/texture/sample/chunk_texture3d_trilinear_corners.d.ts +35 -0
- package/src/shade/renderer/shader/chunk/texture/sample/chunk_texture3d_trilinear_corners.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/texture/sample/chunk_texture3d_trilinear_corners.js +159 -0
- package/src/shade/renderer/shader/compiler/CodeChunk.d.ts +67 -1
- package/src/shade/renderer/shader/compiler/CodeChunk.d.ts.map +1 -1
- package/src/shade/renderer/shader/compiler/CodeChunk.js +205 -2
- package/src/shade/renderer/shader/compiler/CodeChunkChoice.d.ts +76 -0
- package/src/shade/renderer/shader/compiler/CodeChunkChoice.d.ts.map +1 -0
- package/src/shade/renderer/shader/compiler/CodeChunkChoice.js +176 -0
- package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +932 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts +86 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts.map +1 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitch.js +178 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts +67 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts.map +1 -0
- package/src/shade/renderer/shader/compiler/ShaderSwitchSet.js +229 -0
- package/src/shade/renderer/shader/graph/graph_prepare_bindings.d.ts.map +1 -1
- package/src/shade/renderer/shader/graph/graph_prepare_bindings.js +69 -0
- package/src/shade/renderer/shader/resource/ShaderResourceDescriptor.d.ts +94 -2
- package/src/shade/renderer/shader/resource/ShaderResourceDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/shader/resource/ShaderResourceDescriptor.js +333 -2
- package/src/shade/renderer/shader/resource/ShaderResourceGroupDescriptor.d.ts +14 -1
- package/src/shade/renderer/shader/resource/ShaderResourceGroupDescriptor.d.ts.map +1 -1
- package/src/shade/renderer/shader/resource/ShaderResourceGroupDescriptor.js +28 -150
- package/src/shade/renderer/shader/resource/encoder_prepare_shader_bindings_defaults.d.ts +5 -0
- package/src/shade/renderer/shader/resource/encoder_prepare_shader_bindings_defaults.d.ts.map +1 -1
- package/src/shade/renderer/shader/resource/encoder_prepare_shader_bindings_defaults.js +11 -1
- package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.d.ts +14 -0
- package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.js +13 -0
- package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.d.ts +65 -0
- package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.js +252 -0
- package/src/shade/renderer/shadow/contact/FINDINGS.md +413 -0
- package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.js +105 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.js +39 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.js +92 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.d.ts +29 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.js +128 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.d.ts +52 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.d.ts.map +1 -0
- package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.js +358 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_RESOURCES.d.ts +12 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/SHADOWMAP_RESOURCES.js +14 -0
- package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.d.ts +10 -0
- package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.js +12 -0
- package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.d.ts +13 -0
- package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.js +14 -0
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_atlas_for_light.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_atlas_for_light.js +3 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.d.ts +14 -8
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.js +20 -86
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts +14 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts.map +1 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.js +79 -0
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_filtered.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_filtered.js +8 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.js +3 -0
- package/src/shade/renderer/shadow/ray/shader_ray_shadow_code.d.ts.map +1 -1
- package/src/shade/renderer/shadow/ray/shader_ray_shadow_code.js +12 -12
- package/src/shade/renderer/shadow/ray/shader_screens_space_shadows.d.ts.map +1 -1
- package/src/shade/renderer/shadow/ray/shader_screens_space_shadows.js +3 -0
- package/src/shade/renderer/shadow/ray/staged/gen/shader_generate_rays.d.ts.map +1 -1
- package/src/shade/renderer/shadow/ray/staged/gen/shader_generate_rays.js +153 -151
- package/src/shade/renderer/shadow/sdf/chunk_geometry_sdf_query_distance.d.ts.map +1 -1
- package/src/shade/renderer/shadow/sdf/chunk_geometry_sdf_query_distance.js +3 -3
- package/src/shade/renderer/shadow/sdf/chunk_sdf_geometry_raymarch.d.ts.map +1 -1
- package/src/shade/renderer/shadow/sdf/chunk_sdf_geometry_raymarch.js +3 -3
- package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts +5 -3
- package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/VSMPageManager.js +86 -89
- package/src/shade/renderer/shadow/vsm/VirtualShadowMap.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/VirtualShadowMap.js +12 -9
- package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.d.ts +13 -0
- package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.d.ts.map +1 -0
- package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.js +48 -0
- package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.d.ts +2 -2
- package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/shader/chunk_vsm_append_mover.js +13 -26
- package/src/shade/renderer/texture/GPUTextureContext.d.ts +10 -0
- package/src/shade/renderer/texture/GPUTextureContext.d.ts.map +1 -1
- package/src/shade/renderer/texture/GPUTextureContext.js +24 -0
- package/src/shade/renderer/texture/SAMPLER_LINEAR_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/texture/SAMPLER_LINEAR_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/texture/SAMPLER_LINEAR_RESOURCE.js +8 -0
- package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.d.ts +238 -0
- package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.d.ts.map +1 -0
- package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.js +747 -0
- package/src/shade/renderer/texture/atlas/chunk_tile_atlas_slot_origin.d.ts +20 -0
- package/src/shade/renderer/texture/atlas/chunk_tile_atlas_slot_origin.d.ts.map +1 -0
- package/src/shade/renderer/texture/atlas/chunk_tile_atlas_slot_origin.js +30 -0
- package/src/shade/renderer/texture/draw_texture_as_rgba.d.ts +2 -0
- package/src/shade/renderer/texture/draw_texture_as_rgba.d.ts.map +1 -1
- package/src/shade/renderer/texture/draw_texture_as_rgba.js +2 -0
- package/src/shade/renderer/texture/graph_draw_texture_3d_slice_as_rgba.d.ts +31 -0
- package/src/shade/renderer/texture/graph_draw_texture_3d_slice_as_rgba.d.ts.map +1 -0
- package/src/shade/renderer/texture/graph_draw_texture_3d_slice_as_rgba.js +116 -0
- package/src/shade/renderer/texture/shader_draw_texture_3d_slice_as_rgba.d.ts +33 -0
- package/src/shade/renderer/texture/shader_draw_texture_3d_slice_as_rgba.d.ts.map +1 -0
- package/src/shade/renderer/texture/shader_draw_texture_3d_slice_as_rgba.js +90 -0
- package/src/shade/renderer/texture/util/ZERO_UINT_PIXEL_TEXTURE.d.ts +10 -0
- package/src/shade/renderer/texture/util/ZERO_UINT_PIXEL_TEXTURE.d.ts.map +1 -0
- package/src/shade/renderer/texture/util/ZERO_UINT_PIXEL_TEXTURE.js +33 -0
- package/src/shade/renderer/view/VIEW_RESOURCE.d.ts +7 -0
- package/src/shade/renderer/view/VIEW_RESOURCE.d.ts.map +1 -0
- package/src/shade/renderer/view/VIEW_RESOURCE.js +8 -0
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts +33 -6
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +299 -16
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +11 -4
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +14 -4
- package/src/shade/renderer/volumetrics/NOTES.md +97 -0
- package/src/shade/renderer/volumetrics/PARTICIPATING_MEDIA_VOLUME_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/PARTICIPATING_MEDIA_VOLUME_STRUCT.js +42 -1
- package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.d.ts +74 -10
- package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.js +136 -10
- package/src/shade/renderer/volumetrics/SceneVolumetrics.d.ts +30 -5
- package/src/shade/renderer/volumetrics/SceneVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/SceneVolumetrics.js +97 -68
- package/src/shade/renderer/volumetrics/VOLUMETRICS_RESOURCES.d.ts +17 -0
- package/src/shade/renderer/volumetrics/VOLUMETRICS_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/VOLUMETRICS_RESOURCES.js +20 -0
- package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +336 -0
- package/src/shade/renderer/volumetrics/chunk_integrate_optical_depth.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_integrate_optical_depth.js +82 -76
- package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.d.ts +8 -4
- package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js +22 -9
- package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.d.ts +19 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.js +56 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_local_light_shadow.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_local_light_shadow.js +3 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.d.ts +12 -3
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.js +85 -48
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_optical_depth.d.ts +7 -0
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_optical_depth.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/chunk_volumetrics_sun_optical_depth.js +152 -130
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_froxel_centre_ws.js +5 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts +7 -9
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi.js +11 -9
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi_sample.d.ts +35 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi_sample.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/chunk_volumetrics_gi_sample.js +105 -0
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts +15 -9
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/gi/graph_build_froxel_gi.js +26 -36
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi.d.ts +10 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi.js +51 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts +11 -0
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/gi/volumetrics_gi_resources.js +19 -6
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts +11 -4
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.js +14 -5
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +4 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +43 -10
- package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.d.ts +133 -0
- package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.js +152 -0
- package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.d.ts +9 -0
- package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.js +24 -0
- package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.d.ts +28 -0
- package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.js +96 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.d.ts +67 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.js +73 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_carried.d.ts +14 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_carried.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_carried.js +76 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_scrolled.d.ts +14 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_scrolled.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_scrolled.js +38 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_tap.d.ts +21 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_tap.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise_tap.js +74 -0
- package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.d.ts +10 -0
- package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.js +121 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.d.ts +6 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_irradiance.js +11 -2
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts +7 -0
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +14 -4
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +54 -5
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_sun_shadow_volume.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_sun_shadow_volume.js +311 -290
- package/src/shade/renderer/volumetrics/volumetrics_position_world_to_froxel_uvw.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/volumetrics_position_world_to_froxel_uvw.js +33 -49
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts +3 -2
- package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
- package/src/shade/renderer/water/GPUWaterRenderer.js +27 -30
- package/src/shade/renderer/water/chunk_water_gi.d.ts +10 -2
- package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_gi.js +70 -56
- package/src/shade/renderer/water/chunk_water_transport.d.ts +0 -1
- package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_transport.js +0 -17
- package/src/shade/renderer/water/optics/chunk_water_inscatter.d.ts +2 -2
- package/src/shade/renderer/water/optics/chunk_water_inscatter.d.ts.map +1 -1
- package/src/shade/renderer/water/optics/chunk_water_inscatter.js +5 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts +1 -2
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.d.ts.map +1 -1
- package/src/shade/renderer/water/optics/chunk_water_receiver_downwelling.js +4 -2
- package/src/shade/renderer/water/shader_water.d.ts +9 -10
- package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water.js +88 -55
- package/src/shade/renderer/water/shader_water_avboit.d.ts +0 -4
- package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
- package/src/shade/renderer/water/shader_water_avboit.js +0 -63
- package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts +4 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/GPUWaterSurface.js +9 -3
- package/src/shade/renderer/water/surface/WATER_SURFACE_RESOURCES.d.ts +15 -0
- package/src/shade/renderer/water/surface/WATER_SURFACE_RESOURCES.d.ts.map +1 -0
- package/src/shade/renderer/water/surface/WATER_SURFACE_RESOURCES.js +27 -0
- package/src/shade/renderer/water/surface/WATER_WAVE_RECORD_STRUCT.d.ts +2 -1
- package/src/shade/renderer/water/surface/WATER_WAVE_RECORD_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/WATER_WAVE_RECORD_STRUCT.js +18 -9
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts +0 -3
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/chunk_water_surface_sample.js +15 -3
- package/src/shade/renderer/water/surface/particles/shader_water_particles.js +2 -2
- package/src/shade/renderer/water/surface/shader_water_cull.d.ts +9 -3
- package/src/shade/renderer/water/surface/shader_water_cull.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/shader_water_cull.js +46 -22
- package/src/shade/renderer/water/surface/shader_water_waves_derive.d.ts +26 -1
- package/src/shade/renderer/water/surface/shader_water_waves_derive.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/shader_water_waves_derive.js +73 -9
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +127 -0
- package/src/shade/renderer/wind/GPUSceneWind.d.ts.map +1 -0
- package/src/shade/renderer/wind/GPUSceneWind.js +410 -0
- package/src/shade/renderer/wind/WIND_FIELD.d.ts +53 -0
- package/src/shade/renderer/wind/WIND_FIELD.d.ts.map +1 -0
- package/src/shade/renderer/wind/WIND_FIELD.js +60 -0
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts +36 -0
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.js +61 -0
- package/src/shade/renderer/wind/WIND_FIELD_UNIFORM.d.ts +17 -0
- package/src/shade/renderer/wind/WIND_FIELD_UNIFORM.d.ts.map +1 -0
- package/src/shade/renderer/wind/WIND_FIELD_UNIFORM.js +17 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample.d.ts +20 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample.d.ts.map +1 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample.js +26 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts +40 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts.map +1 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.js +92 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_uniform.d.ts +12 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_uniform.d.ts.map +1 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_uniform.js +22 -0
- package/src/shade/renderer/wind/wind_field_add_resources.d.ts +15 -0
- package/src/shade/renderer/wind/wind_field_add_resources.d.ts.map +1 -0
- package/src/shade/renderer/wind/wind_field_add_resources.js +22 -0
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts +5 -2
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/CPUBitmapData.js +5 -2
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts +5 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +118 -31
- package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLLanguageCore.js +90 -22
- package/src/engine/network/transport/Channel.d.ts +0 -85
- package/src/engine/network/transport/Channel.d.ts.map +0 -1
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts +0 -155
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/FragmentAssembler.d.ts +0 -105
- package/src/engine/network/transport/fragments/FragmentAssembler.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/FragmentRetention.d.ts +0 -103
- package/src/engine/network/transport/fragments/FragmentRetention.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/fragment_send.d.ts +0 -61
- package/src/engine/network/transport/fragments/fragment_send.d.ts.map +0 -1
- package/src/engine/network/transport/fragments/packet_size.d.ts +0 -99
- package/src/engine/network/transport/fragments/packet_size.d.ts.map +0 -1
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts +0 -87
- package/src/engine/physics/cloth/wind/ClothAmbientWind.d.ts.map +0 -1
- package/src/engine/physics/cloth/wind/ClothAmbientWind.js +0 -185
- package/src/shade/renderer/geometry/sdf/chunk_sdf_slot_index_to_texture_offset.d.ts +0 -7
- package/src/shade/renderer/geometry/sdf/chunk_sdf_slot_index_to_texture_offset.d.ts.map +0 -1
- package/src/shade/renderer/geometry/sdf/chunk_sdf_slot_index_to_texture_offset.js +0 -25
- package/src/shade/renderer/global_illumination/clipmap/GPUClipMap3D.d.ts +0 -43
- package/src/shade/renderer/global_illumination/clipmap/GPUClipMap3D.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/clipmap/GPUClipMap3D.js +0 -207
- package/src/shade/renderer/global_illumination/clipmap/RadianceField.d.ts +0 -21
- package/src/shade/renderer/global_illumination/clipmap/RadianceField.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/clipmap/RadianceField.js +0 -40
- package/src/shade/renderer/global_illumination/clipmap/chunk_clip_cascade_wrap_coord.d.ts +0 -13
- package/src/shade/renderer/global_illumination/clipmap/chunk_clip_cascade_wrap_coord.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/clipmap/chunk_clip_cascade_wrap_coord.js +0 -47
- package/src/shade/renderer/global_illumination/clipmap/shader_update_clipmap_cascade.d.ts +0 -7
- package/src/shade/renderer/global_illumination/clipmap/shader_update_clipmap_cascade.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/clipmap/shader_update_clipmap_cascade.js +0 -115
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_LOCAL_LIGHT_LIMIT.d.ts +0 -7
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_LOCAL_LIGHT_LIMIT.d.ts.map +0 -1
- package/src/shade/renderer/light/cluster/LIGHT_CLUSTER_LOCAL_LIGHT_LIMIT.js +0 -6
- package/src/shade/renderer/light/cluster/chunk_cluster_keep_smallest.d.ts +0 -21
- package/src/shade/renderer/light/cluster/chunk_cluster_keep_smallest.d.ts.map +0 -1
- package/src/shade/renderer/light/cluster/chunk_cluster_keep_smallest.js +0 -47
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.d.ts +0 -21
- package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.d.ts.map +0 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_Brick4.d.ts +0 -2
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_Brick4.d.ts.map +0 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_Brick4.js +0 -24
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_IBL.d.ts +0 -2
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_IBL.d.ts.map +0 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_IBL.js +0 -21
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_LPV.d.ts +0 -2
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_LPV.d.ts.map +0 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader_LPV.js +0 -34
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.d.ts +0 -3
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.d.ts +0 -7
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.js +0 -178
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_brick4.d.ts +0 -9
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_brick4.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.d.ts +0 -9
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.js +0 -110
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.d.ts +0 -9
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.d.ts.map +0 -1
- package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.js +0 -110
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Hauber.d.ts +0 -9
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Hauber.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Hauber.js +0 -22
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.d.ts +0 -6
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.js +0 -16
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.js +0 -46
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.d.ts +0 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.js +0 -127
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.js +0 -39
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts +0 -10
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.d.ts.map +0 -1
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_brick4.js +0 -55
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts +0 -10
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.d.ts.map +0 -1
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_ibl.js +0 -47
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts +0 -10
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.d.ts.map +0 -1
- package/src/shade/renderer/volumetrics/gi/shader_volumetrics_gi_lpv.js +0 -63
|
@@ -0,0 +1,932 @@
|
|
|
1
|
+
# Shader switches: a proposal (2026-10-16, revision c; stages 1 and 2 landed)
|
|
2
|
+
|
|
3
|
+
**Status: stages 1 and 2 are on master (2026-10-16). Stage 3, declared bindings, is built in a worktree, uncommitted
|
|
4
|
+
(§12.3).**
|
|
5
|
+
|
|
6
|
+
§0 records your decisions, §4–§6 the design and its stages, and §12 what each stage contains and how it was checked. Revisions (a) and (b) are superseded by your answers.
|
|
7
|
+
|
|
8
|
+
## 0. Decided so far
|
|
9
|
+
|
|
10
|
+
From your answers of 2026-10-16:
|
|
11
|
+
|
|
12
|
+
- **D1 — a switch is an integer.** A boolean is a switch of two values. A shader depends on several switches. A
|
|
13
|
+
switch is a value, not a chunk, and one switch may be decided at several places in the graph. (Confirmed.)
|
|
14
|
+
- **D2 — a switched shader specializes to a static graph.** A switched shader and an immutable set of switch values
|
|
15
|
+
become an ordinary, fully static `CodeChunk` graph. The shader object caches its variants by the set.
|
|
16
|
+
`GraphicsContext` knows nothing of switches.
|
|
17
|
+
- **D3 — every switch defaults to 0.**
|
|
18
|
+
- **D4 — code first, the kludges fixed after.** In the first stage, alternatives differ in code only. The long-term
|
|
19
|
+
design still has to remove the existing kludges, resources included, and a refactor is fine.
|
|
20
|
+
|
|
21
|
+
From your answers to revision (b):
|
|
22
|
+
|
|
23
|
+
- **D5 — resources: one interface per definition (§5.2).** It is the union of its alternatives' bindings, bound by
|
|
24
|
+
name, with defaults for what a mode lacks. Stage 3's declared bindings are wanted later; they will change the shape
|
|
25
|
+
of a shader class a little.
|
|
26
|
+
- **D6 — no flip machinery.** Pipelines made on first use compile synchronously, as they do today. A flip compiles the
|
|
27
|
+
new variants then, and nothing extra is built for it.
|
|
28
|
+
- **D7 — a variant's label carries its set:** `Shade From G-Buffer [shadow directional technique=Virtual]`.
|
|
29
|
+
- **D8 — no interface declaration.** A choice never inspects its alternatives, and the parent never white-boxes what
|
|
30
|
+
sits behind a switch. The per-value specs are what link every alternative into its real shaders.
|
|
31
|
+
- **D9 — the API is `ShaderSwitch.enum(label, Enum)` and `ShaderSwitch.bool(label)`,** one mechanism underneath. A
|
|
32
|
+
switch's values are its own: the enum's members, or `false`/`true`. Sets, choices, labels and errors use them, and
|
|
33
|
+
errors and labels name the member.
|
|
34
|
+
- *My call, inside D3:* an enum must have a member equal to 0, the default, and one without is refused at
|
|
35
|
+
`enum()`. A bool's default is `false`. If you would rather the first-declared member be the default, it is a
|
|
36
|
+
one-line change.
|
|
37
|
+
|
|
38
|
+
What follows from those:
|
|
39
|
+
|
|
40
|
+
- **Pins are gone.** Their only use was a pair of exports with different bindings. §5 makes one definition serve every
|
|
41
|
+
value, and a pipeline that wants another value passes another set.
|
|
42
|
+
- **The linker is untouched.** `compile()` links static graphs only, and refuses a graph that still holds a choice.
|
|
43
|
+
Revision (a) threaded the set through `compile()`; this revision does not.
|
|
44
|
+
|
|
45
|
+
## 1. Summary
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
// a switch over an engine enum, 0 by default; or ShaderSwitch.bool(label), false by default
|
|
49
|
+
export const ShadowDirectionalTechnique = { Cascades: 0, Virtual: 1 };
|
|
50
|
+
export const SHADOW_DIRECTIONAL_TECHNIQUE = ShaderSwitch.enum('shadow directional technique', ShadowDirectionalTechnique);
|
|
51
|
+
|
|
52
|
+
// where a graph decides it: the export every importer already uses
|
|
53
|
+
export const chunk_shadowmap_sample_directional = CodeChunkChoice.from(SHADOW_DIRECTIONAL_TECHNIQUE);
|
|
54
|
+
chunk_shadowmap_sample_directional.add(ShadowDirectionalTechnique.Cascades, chunk_shadowmap_sample_directional_cascades);
|
|
55
|
+
chunk_shadowmap_sample_directional.add(ShadowDirectionalTechnique.Virtual, chunk_shadowmap_sample_directional_virtual);
|
|
56
|
+
|
|
57
|
+
// an immutable, interned set of values; a switch it does not name is at its default
|
|
58
|
+
const switches = ShaderSwitchSet.EMPTY.with(SHADOW_DIRECTIONAL_TECHNIQUE, ShadowDirectionalTechnique.Virtual);
|
|
59
|
+
|
|
60
|
+
// the graph, specialized: every choice replaced by its selected alternative, so no choice is left
|
|
61
|
+
const static_body = body.specialize(switches);
|
|
62
|
+
|
|
63
|
+
// the shader caches its variants by the set; a variant is an ordinary static shader
|
|
64
|
+
shader_deferred_main.variant(switches).draw({ /* … */ });
|
|
65
|
+
shader_deferred_main.descriptor.switches; // [SHADOW_DIRECTIONAL_TECHNIQUE]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For the case that prompted this, `chunk_shadowmap_sample_directional` becomes a choice between `_cascades` and
|
|
69
|
+
`_virtual`. None of the chunks above it changes, and none of the nine shaders that reach it changes its chunk code.
|
|
70
|
+
|
|
71
|
+
Measured on the real `Shade From G-Buffer` module (§7):
|
|
72
|
+
|
|
73
|
+
- **Cascades** drops exactly the 14 VSM functions and 4 VSM declarations: 96 → 82 functions, 69,917 → 59,892
|
|
74
|
+
characters.
|
|
75
|
+
- **Virtual** drops the 2-function cascade walk: 94 functions.
|
|
76
|
+
- In both, only `shadowmap_sample_directional` changes body.
|
|
77
|
+
- **Tint** (Chrome, RTX 4090) compiles all three with no messages.
|
|
78
|
+
- **Pipeline creation** in Chrome takes 0.81–0.83× (cascades) and 0.66–0.70× (virtual) of the shipped shader's.
|
|
79
|
+
- **Cost of a variant:** specializing plus linking takes 0.075–0.083 ms across runs, the same as linking the shipped
|
|
80
|
+
shader today.
|
|
81
|
+
A repeat `variant(set)` lookup takes 0.1 µs and allocates nothing.
|
|
82
|
+
|
|
83
|
+
The deferred GPU time measured earlier on the same variants (as hand-made twins) was 0.936× for cascades and 0.957×
|
|
84
|
+
for virtual, with byte-identical images.
|
|
85
|
+
|
|
86
|
+
**The long-term shape (§5–§6).** Each switched shader is one definition. It declares every binding any of its
|
|
87
|
+
alternatives reads, and a binding a mode does not have falls back to a declared default. Owners bind by name and
|
|
88
|
+
hand the renderer's set to `variant()`. That removes, in three stages:
|
|
89
|
+
|
|
90
|
+
- the two IBL/Brick4 forward-fragment twins;
|
|
91
|
+
- the paired AVBOIT/MBOIT/water exports and the `use_brick4 ? […] : […]` bind-entry arrays;
|
|
92
|
+
- the `build_deferred_main_shader` and `build_ssr_resolve_shader` factories;
|
|
93
|
+
- the per-mode froxel GI shaders;
|
|
94
|
+
- water's hidden GI dependency;
|
|
95
|
+
- the five owners' branches on `indirect_lighting_mode`.
|
|
96
|
+
|
|
97
|
+
Open questions are in §11.
|
|
98
|
+
|
|
99
|
+
## 2. What the engine does today
|
|
100
|
+
|
|
101
|
+
There are four ways a shader chooses an implementation today. None of them can be seen in the chunk graph.
|
|
102
|
+
|
|
103
|
+
1. **A runtime branch on a global choice.** `shadowmap_sample_directional` branches per light on
|
|
104
|
+
`shadowmap.virtual_map != NULL`, though the technique is per renderer (`Renderer.feature_virtual_shadow_maps` →
|
|
105
|
+
`GPUSceneShadowmapContext.use_virtual_shadow_maps`). Both paths are linked into nine shader definitions:
|
|
106
|
+
- deferred heavy and deferred ReSTIR (`shader_deferred_main.js`);
|
|
107
|
+
- AVBOIT draw IBL and Brick4 (`TemplatePassDescriptor`, one pipeline per material template);
|
|
108
|
+
- MBOIT resolve IBL and Brick4;
|
|
109
|
+
- volumetrics build-lighting and build-irradiance;
|
|
110
|
+
- water finalize.
|
|
111
|
+
|
|
112
|
+
The chain is `chunk_shadowmap_sample_directional` → `chunk_shadowmap_get_light_visibility` →
|
|
113
|
+
`chunk_shade_directional_lights` → `chunk_shade_standard_material_direct` (and `_restir`) → the shader bodies.
|
|
114
|
+
Volumetrics and water optics reach it from `chunk_shadowmap_get_light_visibility` directly.
|
|
115
|
+
2. **A factory parameter at the root.** `build_deferred_main_shader({ label, shading_chunk, with_restir })` builds heavy
|
|
116
|
+
and ReSTIR, and the Renderer picks the export by `feature_restir_di_enabled`. This is the `make_shader({ flag })`
|
|
117
|
+
shape that `no-nested-shader-codegen` rules out. ReSTIR also adds a binding, `tRestirRadiance`.
|
|
118
|
+
3. **A twin of an intermediate chunk.** `chunk_forward_shade_standard_fragment_ibl` and `_brick4` are 178 and 185 lines
|
|
119
|
+
that differ in 46 lines: the indirect-lighting block, plus comments that have already drifted apart. They feed
|
|
120
|
+
`shader_avboit_draw_ibl` / `_brick4` and `shader_oit_resolve_moments_ibl` / `shader_oit_resolve_moments`.
|
|
121
|
+
The owners pick by `indirect_lighting_mode` (`graph_rasterize_meshes_transparent_avboit.js:538`,
|
|
122
|
+
`graph_rasterize_meshes_transparent_oit.js:150`) and build different bind groups, because Brick4 adds a `brick4`
|
|
123
|
+
storage buffer to the view group.
|
|
124
|
+
4. **A function filled in at the root.** Water's `finalize_body` calls `water_gi_specular` and `water_gi_irradiance`
|
|
125
|
+
without listing a dependency that defines them. `water_finalize_shader_ibl` / `_brick4` add `chunk_water_gi_ibl` or
|
|
126
|
+
`_brick4` beside it (`shader_water.js:593-597`). Nothing needs a twin, but the dependency is invisible.
|
|
127
|
+
|
|
128
|
+
A switch with its choices gives all four one declared form: pattern 1 in stage 1 (shadows), and patterns 2, 3 and 4
|
|
129
|
+
in stage 2, once one definition can carry every alternative's bindings (§5).
|
|
130
|
+
|
|
131
|
+
The engine already has an *open* interface of the same shape. A material template supplies `material_surface` and
|
|
132
|
+
`material_opacity` to every pass by function name (`ShadeMaterialTemplate.surface` / `.opacity`), as Unreal's materials
|
|
133
|
+
and vertex factories do. Switches are the *closed* counterpart: an engine-owned choice whose values the engine knows.
|
|
134
|
+
Neither replaces the other.
|
|
135
|
+
|
|
136
|
+
## 3. What other engines do
|
|
137
|
+
|
|
138
|
+
Read from source or primary docs. Unreal was read in the installed UE 5.4 tree. The rest comes from the research brief
|
|
139
|
+
`shader-switch-prior-art.md` in the side-notes folder of this session group, which has the URLs and identifiers; its
|
|
140
|
+
Bevy and gpuweb claims were re-checked against the pages.
|
|
141
|
+
|
|
142
|
+
**Unreal: permutation domains.** `RenderCore/Public/ShaderPermutation.h`. A dimension is a C++ type made by
|
|
143
|
+
`SHADER_PERMUTATION_BOOL` / `_INT` / `_RANGE_INT` / `_SPARSE_INT` / `_ENUM_CLASS`, each carrying a `DefineName`.
|
|
144
|
+
`TShaderPermutationDomain<…>` is their product, and its permutation id is mixed-radix over the dimensions
|
|
145
|
+
(`ToDimensionValueId`). A shader class lists its dimensions. `FDeferredLightPS` (`Renderer/Private/LightRendering.cpp:816`)
|
|
146
|
+
has 14 of them, including `FVirtualShadowMapMask`.
|
|
147
|
+
|
|
148
|
+
- `ShouldCompilePermutation` culls combinations: a directional light × the VSM mask is never compiled.
|
|
149
|
+
- `RemapPermutation` folds combinations together: visualize-culling forces the others off.
|
|
150
|
+
- `ModifyCompilationEnvironment` adds the VSM defines only when that dimension is on.
|
|
151
|
+
- The draw site sets every dimension by hand (`LightRendering.cpp:2804-2833`), then asks the shader map for
|
|
152
|
+
`(shader type, permutation id)`. **The owner knows every dimension.** Nothing derives the domain: the shader class lists it
|
|
153
|
+
and the draw site sets it.
|
|
154
|
+
- Dimensions select `#if` blocks. Dependencies are `#include`s, which can sit inside an `#if`, but nothing declares
|
|
155
|
+
what each value pulls in.
|
|
156
|
+
|
|
157
|
+
**Unreal: vertex factories and materials.** These are the other half of Unreal's answer, and they are an *interface
|
|
158
|
+
slot*. `FVertexFactoryType::ModifyCompilationEnvironment` maps the virtual include path
|
|
159
|
+
`/Engine/Generated/VertexFactory.ush` to `#include "<this factory's file>"` (`RenderCore/Public/VertexFactory.h:418-420`).
|
|
160
|
+
`/Engine/Generated/Material.ush` is mapped to the generated material code (`Engine/Private/Materials/MaterialShared.cpp:3357`).
|
|
161
|
+
Every shader that includes the path gets the implementation the compile supplies, and nothing in between is twinned.
|
|
162
|
+
The shader map is keyed by material × vertex factory × shader type × permutation.
|
|
163
|
+
|
|
164
|
+
Note that Unreal's deferred light shader does not choose its *shadow technique* this way. VSM is projected into a
|
|
165
|
+
screen-space mask beforehand, and the light shader only chooses whether to read the mask.
|
|
166
|
+
|
|
167
|
+
**Unity: keywords.** A pass declares its keyword sets by hand with `#pragma multi_compile` / `shader_feature`
|
|
168
|
+
(`_local`, `_vertex`/`_fragment` suffixes). A plain `#include` drops the pragmas of the file it includes, so a library's
|
|
169
|
+
switches do not reach the shader that uses it. `#include_with_pragmas` exists to let them, and URP's `Lit.shader` uses
|
|
170
|
+
it to pull in whole keyword bundles. That is Unity working its way toward a domain derived from the includes.
|
|
171
|
+
|
|
172
|
+
- Since 2021.2 every declared keyword is local to the shader's `LocalKeywordSpace`. A `GlobalKeyword` is mapped into
|
|
173
|
+
each shader's space by name.
|
|
174
|
+
- Setting a keyword the shader does not declare does nothing. This design does the same: values for other switches
|
|
175
|
+
are ignored.
|
|
176
|
+
- Variants are looked up by closest match, and a missing one falls back silently. We should not copy that.
|
|
177
|
+
|
|
178
|
+
**Bevy and naga_oil.** naga_oil passes one global map of shader defs to every module. Each module's `effective_defs`
|
|
179
|
+
are collected by syntax: every name in an `#if`/`#ifdef`, whether or not its branch is taken, plus the effective defs of
|
|
180
|
+
every import. So a module's domain is derived and transitive. The module is cached by a key made only of those defs
|
|
181
|
+
(`ModuleKey::from_members`). That is this design's `descriptor.switches` and its key, arrived at independently.
|
|
182
|
+
|
|
183
|
+
The code itself is chosen by `#ifdef` inside the text, the conditional-template shape this engine rejects.
|
|
184
|
+
|
|
185
|
+
naga_oil's other route is `virtual fn` in a base module and `override fn base::f` in the top-level shader. A
|
|
186
|
+
`Redirector` then rewrites every call in the final module, so no intermediate module is twinned. But the redirect is
|
|
187
|
+
global, so two call sites cannot get different implementations. That is candidate B (§10).
|
|
188
|
+
|
|
189
|
+
**Bevy 0.20 (released 2026-10-08) has since moved all its shaders to WESL** and removed its own WGSL dialect (checked
|
|
190
|
+
against the release post). The release says nothing about what replaces `virtual fn`/`override fn`.
|
|
191
|
+
|
|
192
|
+
**WESL.** `@if`/`@elif`/`@else` attributes go on declarations, statements, struct members and imports. The conditions
|
|
193
|
+
are names joined with `! && ||`; they carry no values. Features are one flat set for the whole link.
|
|
194
|
+
|
|
195
|
+
- The spec makes an unset feature that is used a link error. wesl-js treats it as false. wesl-rs offers
|
|
196
|
+
`Enable/Disable/Keep/Error` and defaults to `Disable`.
|
|
197
|
+
- A removed branch need not be valid, and only declarations reachable from the root are emitted.
|
|
198
|
+
- A module-parameters proposal (#222, unimplemented) would fork only the declarations that depend on a parameter.
|
|
199
|
+
|
|
200
|
+
**gpuweb / WGSL.** WGSL itself has no conditional compilation, shipped or accepted. The only thread is gpuweb#5140,
|
|
201
|
+
"@if for conditions", which is open in Milestone 3 with no decision (checked). Reviewers there asked for *declared*
|
|
202
|
+
conditions, so that a library can say which conditions it reads. That is the same requirement as here.
|
|
203
|
+
|
|
204
|
+
`override` is pipeline-overridable, but the spec defines a shader as the call closure from the entry point *whatever the
|
|
205
|
+
constants' values*. A function reached only through a false `if` on an override is part of the shader, its bindings stay
|
|
206
|
+
in the shader's interface, and nothing requires the dead branch to be removed. Chrome's Tint keeps it as `if (false)`
|
|
207
|
+
(measured 2026-10-16), and DXC then drops it.
|
|
208
|
+
|
|
209
|
+
This is a second reason an override is the wrong mechanism, beyond hiding the dependency. A Brick4-or-IBL override would
|
|
210
|
+
still need the `brick4` buffer bound in IBL mode.
|
|
211
|
+
|
|
212
|
+
**Slang: link-time `extern`/`export`.** A module declares `extern struct S : IFoo;` or `extern static const int k;`. A
|
|
213
|
+
provider module declares `export struct S : IFoo = Impl;`. The program is composed from the modules chosen
|
|
214
|
+
(`createCompositeComponentType`) and then `link()`ed. Unselected providers never enter the program, and intermediate
|
|
215
|
+
modules compile once.
|
|
216
|
+
|
|
217
|
+
This is the cleanest prior art for choosing deep in a graph without duplication, and it is open, like B. Whether any
|
|
218
|
+
API lists a module's unresolved externs is unverified.
|
|
219
|
+
|
|
220
|
+
**Filament** chooses the shadow technique per View at *run time*. Only the sampler type is a variant; PCF, VSM and
|
|
221
|
+
EVSM are a uniform (`frameUniforms.shadowSamplingType`). That is today's meep, the runtime branch, which costs 4–6 % of
|
|
222
|
+
the deferred pass here.
|
|
223
|
+
|
|
224
|
+
**Godot** reads each specialization constant through an accessor that falls back to a push constant when built as an
|
|
225
|
+
"ubershader". One source then serves both the specialized pipeline and a fallback compiled in the background. We do not
|
|
226
|
+
need that, because `PipelineEnquiry` already compiles off the main thread.
|
|
227
|
+
|
|
228
|
+
**What this design takes, and what it leaves.**
|
|
229
|
+
|
|
230
|
+
- **From Unreal:** a dimension as an object with a closed value set, and a key per shader made of its values. But not
|
|
231
|
+
the owner listing every dimension; here the graph lists them.
|
|
232
|
+
- **From naga_oil:** deriving the domain transitively from the graph, and keying only on it.
|
|
233
|
+
- **From Unity:** values a shader does not use are ignored.
|
|
234
|
+
- **From WESL's spec:** an unset value is an error, not false.
|
|
235
|
+
- **From Slang and vertex factories:** the implementation is linked in *beside* the code that calls it, so nothing in
|
|
236
|
+
between is twinned or rebuilt.
|
|
237
|
+
- **Left out:** conditional text inside a chunk (Unreal's and naga_oil's `#if`, WESL's `@if` on statements), which is
|
|
238
|
+
what `CodeChunk` exists to avoid. Also left out: global redirects (naga_oil overrides) and closest-match fallback
|
|
239
|
+
(Unity).
|
|
240
|
+
|
|
241
|
+
An alternative here is a whole chunk with its own dependencies, which is WESL's `@if` on a declaration, raised to a
|
|
242
|
+
declared, typed choice.
|
|
243
|
+
|
|
244
|
+
## 4. The design
|
|
245
|
+
|
|
246
|
+
### 4.1 Pieces
|
|
247
|
+
|
|
248
|
+
| piece | is | API |
|
|
249
|
+
|---|---|---|
|
|
250
|
+
| `ShaderSwitch` | a named choice over an engine enum's members (default: the member equal to 0) or over `false`/`true` (default `false`) | `ShaderSwitch.enum(label, Enum)`, `ShaderSwitch.bool(label)`; `label`, `values`, `default_value`, `is_value(v)`, `name_of(v)` |
|
|
251
|
+
| `ShaderSwitchSet` | immutable, **interned** values for some switches; a switch it does not name is at its default | `EMPTY`, `with(switch, value)`, `get(switch)`, `restricted_to(switches)` |
|
|
252
|
+
| `CodeChunkChoice` | a chunk standing for one alternative per value of one switch | `CodeChunkChoice.from(switch)`, `add(value, chunk)`, `alternative_for(set)` |
|
|
253
|
+
| `CodeChunk.specialize(set)` | the graph with every choice replaced by its selected alternative | returns a static `CodeChunk` |
|
|
254
|
+
| `CodeChunk.collectSwitches()` | every switch the graph decides, through every alternative | `ShaderSwitch[]` |
|
|
255
|
+
| `variant(set)` | on `ShaderDescriptor`, `ImageShader`, `ComputeShader`, and (designed) `TemplatePassDescriptor` | a static shader of the same class |
|
|
256
|
+
|
|
257
|
+
**Interning** makes a set a value: two sets that give every switch the same value are one object, and a switch set to
|
|
258
|
+
0 is not stored. So:
|
|
259
|
+
|
|
260
|
+
- `a.with(X, 1).with(Y, 2) === a.with(Y, 2).with(X, 1)`;
|
|
261
|
+
- `EMPTY.with(X, X.default_value) === EMPTY`;
|
|
262
|
+
- every cache keys by identity;
|
|
263
|
+
- `toString()` names the members, `shadow directional technique=Virtual`, which is what labels carry (D7);
|
|
264
|
+
- `with` returns `this` when the value is already that, so a renderer re-deriving its set every frame allocates
|
|
265
|
+
nothing until a flag changes.
|
|
266
|
+
|
|
267
|
+
Each set is made once, on first use, and kept for the process, so the table only grows by sets actually used.
|
|
268
|
+
|
|
269
|
+
### 4.2 Specialization: a switched graph becomes a static one
|
|
270
|
+
|
|
271
|
+
`specialize(set)` walks the graph once, depth-first, with a memo from source chunk to result:
|
|
272
|
+
|
|
273
|
+
- A **choice** becomes the specialization of the alternative `set` selects. An alternative may itself be a choice of
|
|
274
|
+
another switch.
|
|
275
|
+
- A **chunk whose dependencies all come back as themselves** is returned as it is. Everything not above a choice is
|
|
276
|
+
shared with the source graph, and a graph with no choice specializes to itself.
|
|
277
|
+
- **Any other chunk** becomes a new `CodeChunk`: the same text and extensions, with specialized dependencies. If two
|
|
278
|
+
dependencies resolve to the same chunk, it is kept once.
|
|
279
|
+
- **The memo** keeps what two chunks share in the source shared in the result, so a diamond stays a diamond.
|
|
280
|
+
|
|
281
|
+
`compile()` is unchanged, except that it throws, naming the choice, if a choice reaches it. The linker only ever sees
|
|
282
|
+
static graphs.
|
|
283
|
+
|
|
284
|
+
`collectSwitches()` walks every alternative, selected or not, so a switch nested inside one alternative is still in
|
|
285
|
+
the shader's domain.
|
|
286
|
+
|
|
287
|
+
Errors:
|
|
288
|
+
|
|
289
|
+
- a value with no alternative at a choice names the switch and the value;
|
|
290
|
+
- a cycle through any alternative is refused at `add()`;
|
|
291
|
+
- a choice equals only itself, since every choice has the same empty text.
|
|
292
|
+
|
|
293
|
+
### 4.3 Variants on the shader classes
|
|
294
|
+
|
|
295
|
+
"The shader" caches its variants by the set, as you asked. Every class has the same shape, `variant(set)`:
|
|
296
|
+
|
|
297
|
+
1. Look `set` up by identity. A frame asking again stops here: 0.1 µs, no allocation.
|
|
298
|
+
2. Restrict it to the descriptor's `switches`. Sets that agree on this shader's switches get the same variant.
|
|
299
|
+
3. If the restricted set is `EMPTY`, return `this`. The object a module exports *is* the all-defaults variant, so
|
|
300
|
+
`shader.pipeline` and `descriptor.source` keep meaning what they mean today.
|
|
301
|
+
4. Otherwise build, once, a static object of the same class from the specialized descriptor.
|
|
302
|
+
|
|
303
|
+
| class | status | variant is |
|
|
304
|
+
|---|---|---|
|
|
305
|
+
| `ShaderDescriptor` | prototyped | `ShaderDescriptor.from({ label: '<label> [<set>]', resources: same object, body: body.specialize(set) })`. `switches` = `body.collectSwitches()`. `source` = the all-zeros variant. |
|
|
306
|
+
| `ImageShader` | prototyped | `new ImageShader({ descriptor: descriptor.variant(set), targets, depthStencil })`, the same targets and depth state as the original. |
|
|
307
|
+
| `ComputeShader` | prototyped | `new ComputeShader(descriptor.variant(set))`. Refused if its `@workgroup_size` differs from the original's: a switch changes what a pass computes, never how it is dispatched. |
|
|
308
|
+
| `TemplatePassDescriptor` | designed | a sibling sharing `label`, `build` and the attachments. `build(template, set)` gets the set and returns `….variant(set).source`; existing builds that ignore the second argument keep working. Its own per-manager × template × cull-mode cache is unchanged. The reads of `.pipeline` for its layout (`graph_rasterize_meshes_transparent_avboit.js:287`, `:593`; `graph_rasterize_meshes_transparent_oit.js:205`, `:353`) becomes a `pipeline_layout` getter, so a sibling needs no pipeline of its own. |
|
|
309
|
+
| water's finalize pipeline | designed | `create_water_finalize_pipeline(set)`, cached the same way. |
|
|
310
|
+
|
|
311
|
+
A few things fall out of variants being whole static objects:
|
|
312
|
+
|
|
313
|
+
- `features` (the `enable` list) and `validate_against_device` are per variant, with no extra work.
|
|
314
|
+
- Labels carry the set, so profiler entries and validation errors name the variant they came from.
|
|
315
|
+
|
|
316
|
+
### 4.4 Where the set comes from
|
|
317
|
+
|
|
318
|
+
- **Who builds it.** The Renderer, from its feature flags, at the start of `render()`:
|
|
319
|
+
|
|
320
|
+
```js
|
|
321
|
+
this.#shader_switches = this.#shader_switches
|
|
322
|
+
.with(SHADOW_DIRECTIONAL_TECHNIQUE, this.feature_virtual_shadow_maps ? ShadowDirectionalTechnique.Virtual : ShadowDirectionalTechnique.Cascades)
|
|
323
|
+
.with(INDIRECT_LIGHTING, this.indirect_lighting_mode) // stage 2
|
|
324
|
+
.with(LOCAL_LIGHT_SHADING, this.feature_restir_di_enabled ? LocalLightShading.ReSTIR : LocalLightShading.Clustered); // stage 2
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
This allocates nothing while the flags are unchanged.
|
|
328
|
+
- **How it reaches owners.** Each owner is handed it the way it is handed `indirect_lighting_mode` today: the deferred
|
|
329
|
+
pass in the Renderer, the volumetrics and transparency graph functions through their options, water through its
|
|
330
|
+
draw call. An owner passes the set opaquely to `variant()`. It never learns which switches its shaders contain, and
|
|
331
|
+
in stage 2 the set replaces the `indirect_lighting_mode` parameter it carries today.
|
|
332
|
+
- **A per-pipeline choice.** An owner asks for it explicitly, with `shader.variant(switches.with(X, v))`, for example a
|
|
333
|
+
debug view that forces cascades.
|
|
334
|
+
- **A forgotten set.** With D3 an owner that forgets to pass the set draws the all-defaults variant, silently. That is the price of
|
|
335
|
+
defaults. The domain is enumerable, so a review can list every shader with non-empty `switches` and check that its
|
|
336
|
+
owner calls `variant`.
|
|
337
|
+
|
|
338
|
+
### 4.5 Caching and keys
|
|
339
|
+
|
|
340
|
+
- **Shader level:** by set identity, then by the restricted set (§4.3).
|
|
341
|
+
- **GPU pipeline managers: unchanged.** `RenderPipelineManager` and `ComputePipelineManager` key by descriptor, which
|
|
342
|
+
includes the WGSL text and the label. Distinct variants are distinct pipelines. Sets differing only in switches a
|
|
343
|
+
shader does not have share one, because the variant is restricted to the shader's own switches first.
|
|
344
|
+
- *Corrected in stage 2:* sets that produce the same text through different values do not share. LPV and IBL on
|
|
345
|
+
the transparent paths and water link the same code, but D7 puts the set in the label and descriptor equality
|
|
346
|
+
compares labels, so LPV gets its own pipeline: one extra compile when LPV is switched on.
|
|
347
|
+
- **What affects what.** `descriptor.switches` lists a shader's switches, and `TemplatePassDescriptor.switches_of(template)`
|
|
348
|
+
does the same per template, since a template's own chunks may hold a choice. "Which pipelines does flipping X
|
|
349
|
+
recompile" is the set of shaders whose `switches` include X.
|
|
350
|
+
|
|
351
|
+
### 4.6 Preparation, and a flip
|
|
352
|
+
|
|
353
|
+
- **Offers.** The Renderer offers `shader.variant(this.#shader_switches).pipeline` and hands the set to the `enquire_*`
|
|
354
|
+
functions, so only the selected variants are prepared.
|
|
355
|
+
- **When the set changes**, nothing extra happens (D6). The first frame that draws with the new set makes its
|
|
356
|
+
variants through `obtain`, synchronously, as a feature turned on after `initialize()` does today. That is about 1 s
|
|
357
|
+
cold for the deferred shader. The shadow records and the shaders flip in that same frame.
|
|
358
|
+
- **Speculative offers.** The domain is enumerable, so a settings screen can offer the other value in the background to
|
|
359
|
+
make flips instant.
|
|
360
|
+
|
|
361
|
+
### 4.7 Specs
|
|
362
|
+
|
|
363
|
+
- **Existing specs keep passing.** With D3 they test the all-defaults variant, and the whole shade suite (877 files) passes on the
|
|
364
|
+
prototype unchanged.
|
|
365
|
+
- **New specs per switched shader:** "every value validates as WGSL", a plain `for` over `switch.values` inside one test,
|
|
366
|
+
not `.each`.
|
|
367
|
+
- **Chunk-level harnesses** that compile a graph containing a choice call `specialize(set)` first. The linker refuses
|
|
368
|
+
one that does not.
|
|
369
|
+
|
|
370
|
+
## 5. Resources: the long-term half
|
|
371
|
+
|
|
372
|
+
### 5.1 What differs between alternatives today
|
|
373
|
+
|
|
374
|
+
| fork | bindings only one mode has | does the resource exist in the other modes? |
|
|
375
|
+
|---|---|---|
|
|
376
|
+
| AVBOIT draw, MBOIT resolve | `brick4` (in the view group) | yes: `Brick4LightMap` creates its buffer in its constructor, per scene |
|
|
377
|
+
| water finalize | `brick4`, `view` (an extra group) | yes |
|
|
378
|
+
| SSR resolve (`build_ssr_resolve_shader` factory) | IBL `tEnvironment`; Brick4 `brick4`, `tSTBN_vec2`; LPV `tEnvironment` + 2 textures, 3 buffers + 1 uniform | Brick4, STBN and LPV's buffers yes; LPV's atlas textures only once LPV runs |
|
|
379
|
+
| froxel GI (a module per mode) | IBL `environment_sh`; Brick4 `brick4`; LPV 3 buffers + 1 uniform | yes |
|
|
380
|
+
| deferred heavy/ReSTIR (factory) | `tRestirRadiance` | only when ReSTIR runs |
|
|
381
|
+
|
|
382
|
+
*Corrected in stage 2:* LPV's buffers exist in every mode. `GPUSceneContext`'s constructor makes the
|
|
383
|
+
`GPULightProbeVolume` beside the `Brick4LightMap`, and its buffers are created there at a reserved minimum (one probe,
|
|
384
|
+
one tetrahedron, a BVH root). Only the atlas textures wait: a `GPUTextureContext` allocates on first use, and nothing
|
|
385
|
+
uses them outside LPV.
|
|
386
|
+
|
|
387
|
+
Mode-specific bindings cannot simply get a group of their own. The raster passes already use groups 0–3 (material,
|
|
388
|
+
scene, view, lights), which is all WebGPU guarantees (`maxBindGroups` defaults to 4, and the device floor does not
|
|
389
|
+
raise it).
|
|
390
|
+
|
|
391
|
+
### 5.2 Recommended: one interface per definition, the union of its alternatives'
|
|
392
|
+
|
|
393
|
+
A switched shader's resource set declares every binding any of its alternatives reads. Switches then change code only,
|
|
394
|
+
never the interface (D4 holds forever, not just in stage 1). It follows that:
|
|
395
|
+
|
|
396
|
+
- **Layouts don't depend on the set.** The shared groups (`SHADING_LIGHT_RESOURCE_GROUP`, `FORWARD_LIGHT_LAYOUT`) and the
|
|
397
|
+
bind groups built from them stay shared across variants and passes. A layout may list a binding the selected variant
|
|
398
|
+
does not read; WebGPU allows that.
|
|
399
|
+
- **Owners bind by name.** `group.generateBindings(map, encoder)` already does this, and every pass becomes
|
|
400
|
+
"pass what you have". The positional `use_brick4 ? [ … ] : [ … ]` arrays in the AVBOIT and MBOIT owners go.
|
|
401
|
+
- **A binding a mode lacks falls back to its declared default.**
|
|
402
|
+
- Textures already take one: `addTexture(…, BLACK_PIXEL_TEXTURE)` is in use. `tRestirRadiance` defaults to black.
|
|
403
|
+
- Storage buffers have no default parameter today. One convention would be added: `addStorageBuffer(name, type,
|
|
404
|
+
write, default_value)`, with the engine's zero buffer of the type's minimum size. LPV's three buffers need it.
|
|
405
|
+
- *As built in stage 2, your option B on the frame graph path only:* `addStorageBuffer(name, type, write,
|
|
406
|
+
transient_default)`. The declaration says only whether the convention applies. A frame graph pass given nothing
|
|
407
|
+
for such a binding binds a transient storage buffer of the type's minimum binding size from the frame's pool, so
|
|
408
|
+
there is no buffer to keep and no lifecycle. Its contents are whatever the pooled buffer last held, so it may
|
|
409
|
+
only stand in for a binding the selected variant does not read, and an assert checks exactly that: the module
|
|
410
|
+
names the binding nowhere but its declaration, comments aside. A pass that binds by hand (`generateBindings`)
|
|
411
|
+
gets no default and is told so.
|
|
412
|
+
- Owners pass only what the running mode has. The Renderer hands SSR and froxel GI Brick4's map, or the light
|
|
413
|
+
probe volume, only while that mode runs. AVBOIT, MBOIT and water bind by hand and pass Brick4's buffer, which
|
|
414
|
+
exists in every mode (§5.1).
|
|
415
|
+
- Textures: `tRestirRadiance` and LPV's `lpv_atlas_depth` default to `BLACK_PIXEL_TEXTURE`, and
|
|
416
|
+
`lpv_atlas_radiance`, a `uint` binding, to a new one-texel `r32uint` zero, `ZERO_UINT_PIXEL_TEXTURE`. LPV's
|
|
417
|
+
`lpv_metadata` uniform defaults to a volume of no probes.
|
|
418
|
+
|
|
419
|
+
**Measured in stage 2 (§12.2):** an unread binding in a layout costs nothing measurable at draw time. The AVBOIT draw
|
|
420
|
+
and the SSR resolve take the same GPU time with the union of bindings as with their own mode's.
|
|
421
|
+
|
|
422
|
+
### 5.3 Later, and optional: chunks declare the bindings they read
|
|
423
|
+
|
|
424
|
+
Today `chunk_shade_directional_lights` says in prose that it "relies on the `light_data` storage binding and the shadow
|
|
425
|
+
atlas bindings being present". `chunk_water_gi_brick4` says "Expects `brick4` and `view`". These are implicit
|
|
426
|
+
dependencies, of the same kind as water's hidden GI function.
|
|
427
|
+
|
|
428
|
+
A chunk would declare them through a channel beside `addExtension`: `chunk.requireResource(RESOURCE_BRICK4)`, with the
|
|
429
|
+
resource descriptor exported once. `compile()` collects them over the static graph as it collects extensions, and
|
|
430
|
+
`ShaderDescriptor` checks each against its resource set by name and type. The error names both: "`chunk_brick4_sample_*`
|
|
431
|
+
reads `brick4`, which `AVBOIT / draw` does not bind".
|
|
432
|
+
|
|
433
|
+
With switches, a variant's required set is then known exactly. Migration is chunk by chunk, since an undeclared read
|
|
434
|
+
works as it does today.
|
|
435
|
+
|
|
436
|
+
### 5.4 Considered and not recommended
|
|
437
|
+
|
|
438
|
+
- **Resources chosen by switch, per variant.** A group, or entries within one, would change with the set, so each
|
|
439
|
+
variant binds only what it reads. Shared groups would stop being shared whenever a variant read less than all of
|
|
440
|
+
one, and owners would build a bind group per variant. It buys nothing measured.
|
|
441
|
+
- **A group per mode.** It does not fit in 4 groups.
|
|
442
|
+
|
|
443
|
+
## 6. Migration, in three stages
|
|
444
|
+
|
|
445
|
+
Each stage is a set of one-concern commits, red-then-green where it fixes something.
|
|
446
|
+
|
|
447
|
+
### Stage 1: the mechanism and shadows (code-only)
|
|
448
|
+
|
|
449
|
+
1. The compiler layer as prototyped: `ShaderSwitch`, `ShaderSwitchSet`, `CodeChunkChoice`, `specialize`,
|
|
450
|
+
`collectSwitches`, and `variant` on `ShaderDescriptor`, `ImageShader` and `ComputeShader`.
|
|
451
|
+
2. `TemplatePassDescriptor.variant` and `build(template, set)`. `.pipeline` reads for layout become `pipeline_layout`.
|
|
452
|
+
Water's finalize builder takes a set.
|
|
453
|
+
3. Shadows:
|
|
454
|
+
- add `ShadowDirectionalTechnique { Cascades: 0, Virtual: 1 }` and
|
|
455
|
+
`SHADOW_DIRECTIONAL_TECHNIQUE = ShaderSwitch.enum('shadow directional technique', ShadowDirectionalTechnique)`;
|
|
456
|
+
- split `_cascades` (today's function without the virtual branch) from `_virtual` (record read; NULL → 1.0; else
|
|
457
|
+
`shadowmap_sample_virtual`);
|
|
458
|
+
- make `chunk_shadowmap_sample_directional` the choice. Nothing above it changes.
|
|
459
|
+
4. The Renderer builds `#shader_switches` and hands it to:
|
|
460
|
+
- the deferred pass;
|
|
461
|
+
- volumetrics build-lighting and build-irradiance;
|
|
462
|
+
- AVBOIT and MBOIT;
|
|
463
|
+
- water;
|
|
464
|
+
- the `enquire_*` functions.
|
|
465
|
+
|
|
466
|
+
5. Specs: about a dozen that compile these shaders directly gain a loop over the technique.
|
|
467
|
+
|
|
468
|
+
### Stage 2: resources, and the forks that needed them
|
|
469
|
+
|
|
470
|
+
Every step below is "one definition, one choice, bind by name".
|
|
471
|
+
|
|
472
|
+
- **`INDIRECT_LIGHTING = ShaderSwitch.enum('indirect lighting', ShadeIndirectLightingMode)`**, the enum as it is, with IBL
|
|
473
|
+
as 0.
|
|
474
|
+
- **Forward fragment:** one `chunk_forward_shade_standard_fragment` calling `forward_sample_indirect(…)`. A choice
|
|
475
|
+
provides it: IBL → environment, Brick4 → `brick4_sample_forward_indirect`, LPV → environment. This replaces the
|
|
476
|
+
178/185-line twins.
|
|
477
|
+
- **AVBOIT and MBOIT:** one draw and one resolve, each with `brick4` in the view group. The `_ibl`/`_brick4` exports and
|
|
478
|
+
the branch on `indirect_lighting_mode` in both owners go.
|
|
479
|
+
- **Water:** one finalize shader. `chunk_water_gi` is a choice, and `finalize_body` lists it as a dependency, so the
|
|
480
|
+
hidden dependency becomes explicit.
|
|
481
|
+
- **SSR resolve:** one shader. `ssr_sample_radiance` (and `ssr_sample_hit_irradiance`) are choices, and
|
|
482
|
+
`build_ssr_resolve_shader` goes.
|
|
483
|
+
- **Froxel GI:** one shader whose per-froxel radiance lookup is a choice; the three modules become three alternatives.
|
|
484
|
+
- **`LOCAL_LIGHT_SHADING = ShaderSwitch.enum('local light shading', LocalLightShading)`**, `{ Clustered: 0, ReSTIR: 1 }`. The deferred body depends on a choice between
|
|
485
|
+
`chunk_shade_standard_material_direct` and `_restir`. `tRestirRadiance` defaults to black.
|
|
486
|
+
`build_deferred_main_shader` and `shader_deferred_main_restir` go. The forward paths keep linking the clustered chunk
|
|
487
|
+
directly, so they never depend on the switch.
|
|
488
|
+
- **The storage-buffer default convention** (§5.2), for LPV's buffers. *Built on the frame graph path only (§5.2).*
|
|
489
|
+
- **Measure:** the transparent pass and SSR before and after, by the paired method.
|
|
490
|
+
|
|
491
|
+
### Stage 3 (optional): declared bindings
|
|
492
|
+
|
|
493
|
+
`requireResource` and the link-time check (§5.3), then chunk by chunk, starting with the ones that say "relies on" or
|
|
494
|
+
"expects" in prose. *Built for every chunk the switched shaders link (§12.3).*
|
|
495
|
+
|
|
496
|
+
### What goes away, in total
|
|
497
|
+
|
|
498
|
+
- **Duplicate code:**
|
|
499
|
+
- the forward fragment twins;
|
|
500
|
+
- the AVBOIT and MBOIT export pairs;
|
|
501
|
+
- the water finalize pair;
|
|
502
|
+
- two per-mode SSR wrappers and three froxel GI modules, which become alternatives;
|
|
503
|
+
- `shader_deferred_main_restir`.
|
|
504
|
+
- **Factories:** `build_deferred_main_shader` and `build_ssr_resolve_shader`.
|
|
505
|
+
- **Owner branches:** five `switch`/`?:` on `indirect_lighting_mode`, two positional bind-entry pairs, and the
|
|
506
|
+
`indirect_lighting_mode` parameter threaded through those owners.
|
|
507
|
+
- **A runtime branch:** the per-light shadow technique branch, worth 4–6 % of the deferred pass.
|
|
508
|
+
|
|
509
|
+
## 7. Prototype and measurements
|
|
510
|
+
|
|
511
|
+
### Specs, 33 new tests
|
|
512
|
+
|
|
513
|
+
- `compiler/ShaderSwitch.spec.js`, 4 tests: an enum's members in declaration order with default 0; a bool's
|
|
514
|
+
`false`/`true` with default `false`; an enum without a 0 member refused; repeated values refused.
|
|
515
|
+
- `compiler/CodeChunkChoice.spec.js`, 16 tests:
|
|
516
|
+
- only the selected closure is linked;
|
|
517
|
+
- an unnamed enum switch is 0, an unnamed bool `false`;
|
|
518
|
+
- an enum with gaps between its values;
|
|
519
|
+
- a choice three chunks deep needs one copy of each chunk above it;
|
|
520
|
+
- a shared chunk stays one chunk;
|
|
521
|
+
- topological order;
|
|
522
|
+
- a static graph is its own specialization;
|
|
523
|
+
- the linker refuses a choice;
|
|
524
|
+
- discovery from above;
|
|
525
|
+
- a switch nested in one alternative, and one with 3 values;
|
|
526
|
+
- an alternative that is a choice;
|
|
527
|
+
- one switch at two places;
|
|
528
|
+
- a missing alternative names the switch and the member;
|
|
529
|
+
- cycles;
|
|
530
|
+
- identity.
|
|
531
|
+
- `compiler/ShaderSwitchSet.spec.js`, 5 tests: interning regardless of order; a default is not stored; a changed
|
|
532
|
+
value; restriction; `toString` names the members.
|
|
533
|
+
- `ShaderDescriptor.spec.js`, 4 tests: domain found two chunks down; `source` is the all-defaults variant; a variant
|
|
534
|
+
links one alternative, has no switches and is labelled `… technique=Virtual`; sets that agree share a variant, and
|
|
535
|
+
the empty set gives the descriptor itself.
|
|
536
|
+
- `ImageShader.spec.js`, 2 tests, and `ComputeShader.spec.js`, 2 tests: the variant's pipeline code and targets, caching,
|
|
537
|
+
`this` for all-defaults, and a variant with another `@workgroup_size` refused.
|
|
538
|
+
|
|
539
|
+
### The real deferred shader
|
|
540
|
+
|
|
541
|
+
A scratch probe (`scratchpad/probe/shadow_choice.probe.js`, not in the tree) rebuilds the four chunks above
|
|
542
|
+
`chunk_shadowmap_sample_directional` from their real `.text` and dependency lists, with the choice in its place. In the
|
|
543
|
+
engine they would not change at all.
|
|
544
|
+
|
|
545
|
+
| | characters | functions | engine validator | Tint (Chrome, RTX 4090) | vs shipped |
|
|
546
|
+
|---|---|---|---|---|---|
|
|
547
|
+
| shipped (both paths) | 69,917 | 96 | pass | 0 messages | |
|
|
548
|
+
| cascades | 59,892 | 82 | pass | 0 messages | −14 VSM functions, −4 VSM structs/consts; only `shadowmap_sample_directional` changed |
|
|
549
|
+
| virtual | 62,682 | 94 | pass | 0 messages | −`shadowmap_csm_compute_cascade_blended` and its row read, −2 structs; only `shadowmap_sample_directional` changed |
|
|
550
|
+
|
|
551
|
+
- **Link time**, median of 200 interleaved runs: today's `compile()` 0.079 / 0.083 ms in two runs; `specialize` +
|
|
552
|
+
`compile()` of a variant 0.075 / 0.083 ms.
|
|
553
|
+
- **`variant(set)` with a set already seen:** 0.1 µs.
|
|
554
|
+
- **Pipeline creation** (`tint_check.mjs`):
|
|
555
|
+
- **Method.** `createRenderPipelineAsync` with the deferred pass's vertex stage, target and depth state, and
|
|
556
|
+
`layout: 'auto'`. One at a time, rotating order, 8 rounds. A fresh seed constant per compile, so neither Dawn's
|
|
557
|
+
nor the driver's cache serves it.
|
|
558
|
+
- **Results.** Two runs: shipped 1251 / 1225 ms, cascades 1009 / 1017 ms (0.81× / 0.83×), virtual 877 / 810 ms
|
|
559
|
+
(0.70× / 0.66×).
|
|
560
|
+
- **Caveat.** This is wall time on a busy box, not the trace's `InitializeImpl`, so it compares with the earlier
|
|
561
|
+
twins (0.78× / 0.66×) by ratio only.
|
|
562
|
+
- **GPU time was not re-measured.** The 0.936× / 0.957× were measured on twins built by the same removals. The cascades
|
|
563
|
+
variant is that twin. The virtual variant is the twin's branch inverted (`== NULL → 1.0` first).
|
|
564
|
+
|
|
565
|
+
## 8. Costs
|
|
566
|
+
|
|
567
|
+
| part | size |
|
|
568
|
+
|---|---|
|
|
569
|
+
| prototype as it stands | 3 classes (540 lines with docs); `CodeChunk` +135; `ShaderDescriptor` +67/−1; `ImageShader` +51; `ComputeShader` +49; 6 spec files (504 lines) |
|
|
570
|
+
| rest of stage 1 (estimate) | `TemplatePassDescriptor` (~50), water builder, Renderer set + plumbing to the owners and the enquiries (~100), shadow split (1 file into 3), ~12 specs |
|
|
571
|
+
| stage 2 (estimate) | the steps of §6 stage 2, each mostly deletion. Expected net negative in lines, not counted. |
|
|
572
|
+
|
|
573
|
+
Runtime:
|
|
574
|
+
|
|
575
|
+
- No per-frame allocation once the set is steady.
|
|
576
|
+
- A lookup is 0.1 µs, and a variant costs 0.075–0.083 ms to specialize and link.
|
|
577
|
+
- A flip compiles the affected variants on first use (D6). The old ones stay cached.
|
|
578
|
+
|
|
579
|
+
Risks:
|
|
580
|
+
|
|
581
|
+
- **A forgotten set draws the all-defaults variant silently (§4.4).**
|
|
582
|
+
- **Errors move to first use.** A broken non-zero alternative only shows when a pipeline is made. The per-value specs
|
|
583
|
+
catch it.
|
|
584
|
+
|
|
585
|
+
## 9. Reuse map
|
|
586
|
+
|
|
587
|
+
| piece | reuses / generalises |
|
|
588
|
+
|---|---|
|
|
589
|
+
| specialization | `CodeChunk`'s own graph and private fields, with the same identity-based dedup the linker relies on. No second linker; `compile()` is untouched. |
|
|
590
|
+
| values | engine enums as they are (`ShadeIndirectLightingMode` unchanged), or a bool. The shape of Unreal's `SHADER_PERMUTATION_ENUM_CLASS`/`_BOOL`, and like its `SPARSE_INT` an enum need not be contiguous. |
|
|
591
|
+
| variant objects | `ShaderDescriptor`, `ImageShader`, `ComputeShader` and `TemplatePassDescriptor` themselves. A variant is one of them, so draw, dispatch, validation and the profiler need nothing new. |
|
|
592
|
+
| GPU pipeline cache | `RenderPipelineManager` / `ComputePipelineManager` unchanged. Text equality separates and shares variants. |
|
|
593
|
+
| preparation | `PipelineEnquiry` and `prepare()` at start-up, offering the selected variants. A flip uses `obtain` as anything made on first use does. |
|
|
594
|
+
| bind by name | `ShaderResourceGroupDescriptor.generateBindings`, and texture `default_value` (`BLACK_PIXEL_TEXTURE`). One new default convention, for storage buffers. |
|
|
595
|
+
| declared bindings (stage 3) | the `addExtension` / `addLanguageExtension` channel: collected at link, the same way. |
|
|
596
|
+
| `ProgrammableStage.constants` | left for what `override` is for: numbers. Not for choosing code. |
|
|
597
|
+
|
|
598
|
+
## 10. Candidates considered (revision a)
|
|
599
|
+
|
|
600
|
+
- **A: a switch is the choice.** The value is an alternative chunk, and each place where the graph chooses is its own
|
|
601
|
+
switch. It would make the renderer name every place a decision is made. Superseded by D1.
|
|
602
|
+
- **B: open slots filled by whoever builds the shader.** This is Unreal's vertex-factory include, naga_oil's
|
|
603
|
+
`override fn`, Slang's `extern`/`export`, and today's water GI. Nothing can enumerate a slot's implementations, so
|
|
604
|
+
preparation and specs cannot loop over variants. Material templates already are the engine's open interface.
|
|
605
|
+
- **C: a switch decided at choices in the graph.** This is the design above, now with enum and bool values (D1, D9), a
|
|
606
|
+
static graph per variant (D2) and a default (D3).
|
|
607
|
+
- **Rejected before this proposal:** WGSL `override` constants. They hide the dependency, and the spec keeps a function
|
|
608
|
+
reached through a false override `if` in the shader, its bindings included.
|
|
609
|
+
|
|
610
|
+
## 11. Open questions for Alex
|
|
611
|
+
|
|
612
|
+
The design questions are closed (D1–D9). An enum must have a member equal to 0, a rule Alex kept. Stage 1 landed as
|
|
613
|
+
four one-concern commits:
|
|
614
|
+
|
|
615
|
+
1. the compiler layer;
|
|
616
|
+
2. the shader classes' `variant`;
|
|
617
|
+
3. `TemplatePassDescriptor`'s;
|
|
618
|
+
4. the shadow switch with the renderer's set and its plumbing.
|
|
619
|
+
|
|
620
|
+
Stage 2 landed as seven, with the storage-buffer default as you chose it: option B, on the frame graph path only
|
|
621
|
+
(§5.2).
|
|
622
|
+
|
|
623
|
+
Stage 3 is built and checked (§12.3), uncommitted. Open: landing, proposed as five one-concern commits,
|
|
624
|
+
master-direct:
|
|
625
|
+
|
|
626
|
+
1. a resource's declaration apart from its placement (`ShaderResourceDescriptor`'s factories, `group.add`,
|
|
627
|
+
`isSatisfiedBy`);
|
|
628
|
+
2. chunks declare the bindings they read, and a shader's link checks them (`requireResource`);
|
|
629
|
+
3. six shaders bind what their chunks read: the SDF build, screen-space shadows, the four lightmap debug views;
|
|
630
|
+
4. the switched shaders' chunks declare their bindings, with the audit spec;
|
|
631
|
+
5. this document.
|
|
632
|
+
|
|
633
|
+
Also open from stage 3: how the sky reaches water's optics chunks, so they can list the GI they call (§12.3).
|
|
634
|
+
|
|
635
|
+
## 12. As built
|
|
636
|
+
|
|
637
|
+
### 12.1 Stage 1, as landed (2026-10-16)
|
|
638
|
+
|
|
639
|
+
#### What it contains
|
|
640
|
+
|
|
641
|
+
- **The mechanism:**
|
|
642
|
+
- `ShaderSwitch` (`enum` / `bool`), `ShaderSwitchSet` and `CodeChunkChoice`;
|
|
643
|
+
- `CodeChunk.specialize` and `collectSwitches`;
|
|
644
|
+
- `variant(set)` on `ShaderDescriptor`, `ImageShader`, `ComputeShader` and `TemplatePassDescriptor`.
|
|
645
|
+
|
|
646
|
+
A `TemplatePassDescriptor` build is now `(template, switches)`. The four transparent passes that light fragments
|
|
647
|
+
build `….variant(switches)`, and their pipeline labels carry the set. Owners read a template pass's layout through
|
|
648
|
+
`pipeline_layout`, so a variant needs no pipeline of its own.
|
|
649
|
+
- **The shadow switch:**
|
|
650
|
+
- `ShadowDirectionalTechnique { Cascades: 0, Virtual: 1 }`;
|
|
651
|
+
- `SHADOW_DIRECTIONAL_TECHNIQUE = ShaderSwitch.enum('shadow directional technique', ShadowDirectionalTechnique)`;
|
|
652
|
+
- `chunk_shadowmap_sample_directional_cascades` and `chunk_shadowmap_sample_directional_virtual`.
|
|
653
|
+
|
|
654
|
+
`chunk_shadowmap_sample_directional` is now the choice between those two alternatives. No chunk above it changed.
|
|
655
|
+
- **The renderer:**
|
|
656
|
+
- `Renderer.#shader_switches` follows `feature_virtual_shadow_maps`. It is updated in `#draw_to_target`, beside the
|
|
657
|
+
shadow context's own flag, and in `enquirePipelines`, and readable as `renderer.shader_switches`.
|
|
658
|
+
- It is handed to:
|
|
659
|
+
- the deferred pass;
|
|
660
|
+
- `GPUViewVolumetrics.graph_update`, which passes it to froxel irradiance and light scattering;
|
|
661
|
+
- the AVBOIT orchestrator, which passes it to the draw pass and to each side channel's `avboit_prepare` (water);
|
|
662
|
+
- the MBOIT orchestrator, for its resolve pass.
|
|
663
|
+
- **Water:** `create_water_finalize_pipeline_ibl/brick4(switches)`, and `GPUWaterRenderer` caches the result per GI mode
|
|
664
|
+
and set.
|
|
665
|
+
|
|
666
|
+
#### Tests
|
|
667
|
+
|
|
668
|
+
- **`shadow_directional_technique_consumers.spec.js`** covers all nine shaders under both techniques. In each, exactly
|
|
669
|
+
the selected technique's sampling is linked, the other's is absent, and the module passes the WGSL checks. With every
|
|
670
|
+
switch at its default, the result is cascades.
|
|
671
|
+
- **`TemplatePassDescriptor.spec.js`** (3 tests): a variant builds each template for its set; one variant per set, and
|
|
672
|
+
the pass itself for the empty set; a variant shares its original's attachments and layout.
|
|
673
|
+
- **The AVBOIT orchestrator spec** gained a test on the software device: water's optics pipeline, as recorded on the
|
|
674
|
+
device, links the technique of the set the orchestrator was handed. It fails if the orchestrator stops passing the set
|
|
675
|
+
to side channels (checked).
|
|
676
|
+
- **Five chunk-level harnesses now specialize before linking**, which the linker requires:
|
|
677
|
+
- the cascades harness to Cascades;
|
|
678
|
+
- the VSM harness to Virtual — 4 of its 6 tests fail if it is built for Cascades instead (checked);
|
|
679
|
+
- the normal-decode harness and the two water-optics harnesses to the default.
|
|
680
|
+
- **Gates:** the shade suite passes, 879 files and 6,744 tests. `check-types` reads 18 against the base's 18.
|
|
681
|
+
|
|
682
|
+
#### Device check (one-off, headless Chrome, RTX 4090)
|
|
683
|
+
|
|
684
|
+
The stage-1 tree and its base (`03d5816bd`) were served side by side.
|
|
685
|
+
|
|
686
|
+
- **VSM playground (deferred lighting).**
|
|
687
|
+
- Stage 1 makes two shadow-sampling pipelines: `Shade From G-Buffer`, cascades only, offered at start-up; and
|
|
688
|
+
`Shade From G-Buffer [shadow directional technique=Virtual]`, virtual only. No pipeline links both.
|
|
689
|
+
- The base makes one pipeline that links both.
|
|
690
|
+
- **Images.** Stage 1 against the base differs in no more pixels than the base against itself, with the playground's
|
|
691
|
+
movers animating and the filter jittered per frame:
|
|
692
|
+
|
|
693
|
+
| technique | stage 1 vs base | base vs base |
|
|
694
|
+
|---|---|---|
|
|
695
|
+
| cascades | 6.3 % of pixels | 7.4 % |
|
|
696
|
+
| virtual | 5.5 % of pixels | 7.8 % |
|
|
697
|
+
|
|
698
|
+
- **The same playground with a fog volume added from the page (deferred + volumetric lighting).**
|
|
699
|
+
- Stage 1 adds `Volumetrics / build lighting`, cascades only, and `Volumetrics / build lighting [shadow directional
|
|
700
|
+
technique=Virtual]`, virtual only. The base has one, which links both.
|
|
701
|
+
- The fog's per-frame jitter moves most pixels by a level or two, in both comparisons alike:
|
|
702
|
+
|
|
703
|
+
| technique | stage 1 vs base: pixels off by > 8 levels (mean max-channel difference) | base vs base |
|
|
704
|
+
|---|---|---|
|
|
705
|
+
| cascades | 5.97 % (4.32) | 5.70 % (4.33) |
|
|
706
|
+
| virtual | 6.00 % (4.38) | 5.81 % (4.44) |
|
|
707
|
+
- **Console errors.** `vsm: feedback readback failed` appears only after a tab is closed, on the base as on stage 1.
|
|
708
|
+
It is a readback cut short by the close.
|
|
709
|
+
|
|
710
|
+
Not checked on the device:
|
|
711
|
+
|
|
712
|
+
- **water and MBOIT,** whose playground does not expose its renderer for the flip. They are covered on the software
|
|
713
|
+
device and by the consumer spec.
|
|
714
|
+
- **GPU time of the variants.** The 0.936× / 0.957× of revision (a) were measured on equivalent twins.
|
|
715
|
+
|
|
716
|
+
### 12.2 Stage 2, as landed (2026-10-16, `6e263855d`..`e354def85`)
|
|
717
|
+
|
|
718
|
+
#### What it contains
|
|
719
|
+
|
|
720
|
+
- **Two switches,** set by the Renderer's `#update_shader_switches` beside the shadow technique:
|
|
721
|
+
- `INDIRECT_LIGHTING = ShaderSwitch.enum('indirect lighting', ShadeIndirectLightingMode)`, from
|
|
722
|
+
`indirect_lighting_mode`;
|
|
723
|
+
- `LOCAL_LIGHT_SHADING = ShaderSwitch.enum('local light shading', LocalLightShading)`, `{ Clustered: 0, ReSTIR: 1 }`,
|
|
724
|
+
from `feature_restir_di_enabled`.
|
|
725
|
+
- **Six choices,** each where a graph asks for the light:
|
|
726
|
+
|
|
727
|
+
| choice | IBL | Brick4 | LPV |
|
|
728
|
+
|---|---|---|---|
|
|
729
|
+
| `chunk_forward_sample_indirect` | environment | `brick4_sample_forward_indirect` | environment |
|
|
730
|
+
| `chunk_water_gi` (now listed by `finalize_body`) | `chunk_water_gi_ibl` | `chunk_water_gi_brick4` | `chunk_water_gi_ibl` |
|
|
731
|
+
| `chunk_ssr_sample_radiance` | environment | `brick4_sample_specular` | `lpv_sample_radiance` |
|
|
732
|
+
| `chunk_ssr_add_hit_irradiance` | nothing | nothing | the LPV bounce at the hit |
|
|
733
|
+
| `chunk_volumetrics_gi_sample` | `environment_sh` | `brick4_sample_sh` | the LPV mesh |
|
|
734
|
+
|
|
735
|
+
and `chunk_shade_standard_material_direct_deferred` on `LOCAL_LIGHT_SHADING`: the clustered chunk, or `_restir`.
|
|
736
|
+
- **One definition each:** `chunk_forward_shade_standard_fragment`, `shader_avboit_draw`, `shader_oit_resolve_moments`,
|
|
737
|
+
`water_finalize_shader` (`create_water_finalize_pipeline(switches)`), `ssr_resolve_shader`, `shader_volumetrics_gi`,
|
|
738
|
+
`shader_deferred_main`. Each declares the union of its alternatives' bindings.
|
|
739
|
+
- **Gone:** the forward twins; `shader_avboit_draw_ibl`/`_brick4`; `shader_oit_resolve_moments_ibl`; water's `_ibl`/
|
|
740
|
+
`_brick4` shaders, pipelines and resource sets; `build_ssr_resolve_shader` and the three per-mode resolves; the
|
|
741
|
+
three froxel GI modules; `build_deferred_main_shader` and `shader_deferred_main_restir`.
|
|
742
|
+
- **Owners:** no pass below the Renderer takes `indirect_lighting_mode` any more. The AVBOIT orchestrator, its side
|
|
743
|
+
channels' `avboit_prepare`, the MBOIT orchestrator, `GPUViewVolumetrics.graph_update` and `SSR.graph_pass` take the
|
|
744
|
+
set alone.
|
|
745
|
+
- AVBOIT and MBOIT bind their view group by name (`AVBOIT_DRAW_VIEW_GROUP`, `OIT_RESOLVE_VIEW_GROUP`, through
|
|
746
|
+
`generateBindings`). The positional pairs are gone.
|
|
747
|
+
- SSR and froxel GI take Brick4's map and the light probe volume as optional sources, and the Renderer hands them
|
|
748
|
+
the running mode's alone. Another mode's bindings are the shader's defaults (§5.2).
|
|
749
|
+
- Water binds Brick4's buffer and the view in every mode, by hand: both exist in every mode.
|
|
750
|
+
- SSR restarts its history when its resolve variant changes, where it used to compare modes.
|
|
751
|
+
- The Renderer's own branches on the mode stay: they pick passes, not shaders (the diffuse/specular pair, Brick4's
|
|
752
|
+
fused pass, the enquiry, the LPV update).
|
|
753
|
+
- **Defaults** (§5.2): storage buffers with a transient default (`brick4` in SSR and froxel GI, and the LPV's three
|
|
754
|
+
buffers through `LPV_SHADER_RESOURCE_GROUP_WITH_DEFAULTS`, a twin of the shared group that the passes which always
|
|
755
|
+
bind the volume keep using); `lpv_metadata` a volume of no probes; `tRestirRadiance` and `lpv_atlas_depth`
|
|
756
|
+
`BLACK_PIXEL_TEXTURE`; `lpv_atlas_radiance` the new `ZERO_UINT_PIXEL_TEXTURE`.
|
|
757
|
+
|
|
758
|
+
#### What changed in the code
|
|
759
|
+
|
|
760
|
+
Every variant was diffed against the shader it replaces, declaration by declaration, with the order-dependent
|
|
761
|
+
`Struct_N` names normalised:
|
|
762
|
+
|
|
763
|
+
- **Same code:** water's optics under Brick4, the AVBOIT Brick4 vertex stage, and deferred ReSTIR.
|
|
764
|
+
- **One wrapper function more** (`forward_sample_indirect`, `volumetrics_gi_sample`, `ssr_add_hit_irradiance`), which
|
|
765
|
+
the caller now calls in place of the code it wrapped: the transparent passes, SSR and froxel GI.
|
|
766
|
+
- **Declarations only:** the union's bindings, and binding numbers shifted to make room for them. Deferred
|
|
767
|
+
(clustered) gains `tRestirRadiance`.
|
|
768
|
+
|
|
769
|
+
#### Tests
|
|
770
|
+
|
|
771
|
+
- **`indirect_lighting_consumers.spec.js`** (5 tests): the AVBOIT draw and MBOIT resolve for the standard template,
|
|
772
|
+
water's optics, SSR's resolve and froxel GI, under every mode. Each variant links only its mode's sampling, passes
|
|
773
|
+
the WGSL checks, and has the same layout or resources as every other mode's; with every switch at its default the
|
|
774
|
+
result is IBL.
|
|
775
|
+
- **`shader_deferred_main.spec.js`** (3 tests): each way of shading local lights links its own code, and the two bind
|
|
776
|
+
alike with `tRestirRadiance` black by default.
|
|
777
|
+
- **`storage_buffer_transient_default.spec.js`** (4 tests, software device): a pass given nothing binds a transient
|
|
778
|
+
buffer of the minimum binding size; a pass given the buffer binds it; a shader that reads a binding left to its
|
|
779
|
+
default is refused; binding by hand, the default is no default. Each fails with its piece of the mechanism
|
|
780
|
+
disabled (checked).
|
|
781
|
+
- **Owners pass the running mode's source alone:** `SSR.spec.js` and `graph_build_froxel_gi.spec.js` check, per mode,
|
|
782
|
+
that the pass binds that mode's source and no other's, and that the frame then submits on the software device.
|
|
783
|
+
An owner binding another mode's source, as option A would have, fails them (checked).
|
|
784
|
+
- **Water's dependency is pinned:** taking `chunk_water_gi` back out of `finalize_body` fails the consumer spec's water
|
|
785
|
+
test and both water optics rows of `water_shaders_wgsl_validity.spec.js` (checked).
|
|
786
|
+
- **The AVBOIT orchestrator spec** gained a test on the software device: water's optics are drawn with the mode of the
|
|
787
|
+
set the orchestrator is handed, and bind every mode's resources by name without an error.
|
|
788
|
+
- **`shadow_directional_technique_consumers.spec.js`** now crosses the shadow technique with every indirect lighting
|
|
789
|
+
mode and both ways of shading local lights. Fifteen other specs follow the renames.
|
|
790
|
+
- **Gates:** the shade suite passes, 894 files and 6,787 tests. `check-types` reads 18, the same as the base.
|
|
791
|
+
|
|
792
|
+
#### Device checks (one-off, headless Chrome, RTX 4090)
|
|
793
|
+
|
|
794
|
+
- **One mode per pipeline.** A probe recorded every pipeline's WGSL while the avboit, water_refraction and
|
|
795
|
+
particle_ecs playgrounds were switched through IBL, Brick4 and LPV, AVBOIT and MBOIT, with SSR and then ReSTIR on.
|
|
796
|
+
Every pipeline of a switched shader links exactly one mode's sampling:
|
|
797
|
+
|
|
798
|
+
| shader | pipelines |
|
|
799
|
+
|---|---|
|
|
800
|
+
| AVBOIT draw, MBOIT resolve, water optics | the default (environment), `[indirect lighting=Brick4]` (Brick4), `[indirect lighting=LPV]` (environment) |
|
|
801
|
+
| SSR resolve | one per mode, each linking only its own |
|
|
802
|
+
| Volumetrics / GI | one per mode, each linking only its own |
|
|
803
|
+
| Shade From G-Buffer | the default (clustered), `[local light shading=ReSTIR]` (ReSTIR) |
|
|
804
|
+
|
|
805
|
+
No compilation or validation errors came from these shaders, with option B's defaults standing in for the other
|
|
806
|
+
modes' sources in SSR and froxel GI (run again after B).
|
|
807
|
+
- **GPU time, before and after.** A bench copy of the tree held both paths, the old per-mode shader with its own
|
|
808
|
+
bindings and the new one with the union, and its owners picked one per frame. Arms alternated in blocks of four
|
|
809
|
+
frames inside one capture, the first frame of each block dropped, with four captures per setting in alternating
|
|
810
|
+
order (`ab_drive`). Frames were checked to have drawn the arm's own pass. Spans are quantised to 1.024 µs, so the
|
|
811
|
+
medians are what can be read:
|
|
812
|
+
|
|
813
|
+
| pass | setting | median, old / new | captures |
|
|
814
|
+
|---|---|---|---|
|
|
815
|
+
| AVBOIT draw | IBL, avboit playground | 1.000 | 4 of 4 |
|
|
816
|
+
| AVBOIT draw | Brick4 | 1.000 | 4 of 4 |
|
|
817
|
+
| SSR resolve | IBL, ssr_reprojection, lateral and still, 1280 | 1.000 | 7 of 8; the eighth 0.976, one quantum |
|
|
818
|
+
| SSR resolve | Brick4, lateral | 1.000 in one capture, 1.018 (one quantum) in three | 4 |
|
|
819
|
+
|
|
820
|
+
Pass times were about 59 µs (AVBOIT IBL), 66–69 µs (AVBOIT Brick4), 42 µs (SSR IBL) and 56–57 µs (SSR Brick4).
|
|
821
|
+
The avboit playground found no environment map on this machine and lit the scene by its own lights alone.
|
|
822
|
+
These were taken before option B, with the scene's buffers in the entries the variant does not read; B puts
|
|
823
|
+
transient buffers there instead, which changes nothing the shader reads.
|
|
824
|
+
|
|
825
|
+
#### Found along the way, not changed
|
|
826
|
+
|
|
827
|
+
- **ReSTIR DI's resample and spatial passes do not compile in Chrome.** `WEIGHT_LIMIT = 3.4028235e38` in
|
|
828
|
+
`restir/reservoir/shader.js` rounds above the largest f32, and Tint refuses it. This predates stage 2 (`57e2f80b2`).
|
|
829
|
+
The deferred pass's ReSTIR variant itself compiles.
|
|
830
|
+
- **`chunk_water_inscatter` and `chunk_water_receiver_downwelling`** still call `water_gi_irradiance` without listing
|
|
831
|
+
a dependency. Their spec harnesses supply a stub. `finalize_body` lists `chunk_water_gi`, so the shader's graph
|
|
832
|
+
is explicit.
|
|
833
|
+
- **LPV's transparent and water variants** are separate pipelines with the same code as IBL's (§4.5's correction).
|
|
834
|
+
|
|
835
|
+
### 12.3 Stage 3, as built (2026-10-16, uncommitted)
|
|
836
|
+
|
|
837
|
+
#### What it contains
|
|
838
|
+
|
|
839
|
+
- **A declaration apart from its placement.** `ShaderResourceDescriptor.uniform`, `.storageBuffer`, `.texture`,
|
|
840
|
+
`.storageTexture` and `.sampler` make a declaration alone: name, kind, type, default. The group's `addX` methods call
|
|
841
|
+
them, and `group.add(declaration)` places a copy (`clone_declaration`), so one declaration sits in any number of
|
|
842
|
+
groups at their own binding indices and visibilities.
|
|
843
|
+
- **What satisfies a declaration** (`isSatisfiedBy`): a binding of the same name and WGSL type with at least the
|
|
844
|
+
declared access. A read-only storage buffer is satisfied by a read-write one, a `float` texture by an
|
|
845
|
+
`unfilterable-float` one; `depth` is a type of its own; a sampler is a comparison sampler or not; a storage texture
|
|
846
|
+
keeps its format and dimension, with its access a subset. Placement, visibility and defaults do not count.
|
|
847
|
+
- **The channel,** beside `addExtension`: `CodeChunk.requireResource(declaration)`, read back through
|
|
848
|
+
`required_resources`. `specialize` and `copy` carry it, and a choice refuses one, since it has no text to read
|
|
849
|
+
with. `compile()` returns `resources`: each declaration once, with the first chunk in link order that declared it.
|
|
850
|
+
- **The check.** `ShaderDescriptor.compile()` looks each declaration up in its resource set by name:
|
|
851
|
+
- unbound: `'light_count' reads 'light_data', which 'test unbound' does not bind`;
|
|
852
|
+
- mistyped: `… reads 'light_data' as a read-only-storage buffer of array< u32 >, which 'test mistyped' binds as a
|
|
853
|
+
2d unfilterable-float texture`.
|
|
854
|
+
|
|
855
|
+
Image, compute and template shaders all compile through it, so a variant checks only what its selected
|
|
856
|
+
alternatives declare. It throws rather than asserts: it runs once per variant, at link.
|
|
857
|
+
- **`ShaderDescriptor.body`,** the graph a shader links, choices still in it.
|
|
858
|
+
- **Declarations, exported where the data lives:**
|
|
859
|
+
|
|
860
|
+
| file | declarations |
|
|
861
|
+
|---|---|
|
|
862
|
+
| `camera/CAMERA_RESOURCE.js`, `view/VIEW_RESOURCE.js` | `camera`, `view` |
|
|
863
|
+
| `light/LIGHT_DATA_RESOURCE.js`, `light/cluster/LIGHT_CLUSTER_RESOURCES.js` | `light_data`; `cluster_parameters`, `cluster_lookup`, `cluster_data` |
|
|
864
|
+
| `light/environment/ENVIRONMENT_MAP_RESOURCE.js`, `ENVIRONMENT_SH_RESOURCE.js` | `tEnvironment`, `environment_sh` |
|
|
865
|
+
| `shadow/map/SHADOWMAP_RESOURCES.js` | `shadowmapAtlas`, `sCompareLinear` |
|
|
866
|
+
| `global_illumination/brick4/gpu/BRICK4_RESOURCE.js`, `…/octahedral/LPV_SHADER_RESOURCE_GROUP.js` | `brick4`; the light probe volume's six |
|
|
867
|
+
| `STATIC_GRAPHICS_ENGINE_ASSET_RESOURCES.js`, `texture/SAMPLER_LINEAR_RESOURCE.js` | `tSTBN_vec2`, `tSTBN_vec3`, `tSplitSum`; `sLinear` |
|
|
868
|
+
| `deferred/GBUFFER_RESOURCES.js`, `restir/di/RESTIR_RADIANCE_RESOURCE.js` | `gBufferPBR`, `gBufferAlbedo`, `gBufferEmissive`, `tAlbedoAO`; `tRestirRadiance` |
|
|
869
|
+
| `volumetrics/VOLUMETRICS_RESOURCES.js`, `…/gi/volumetrics_gi_resources.js`, `chunk_volumetrics_sun_optical_depth.js` | `volumetrics_metadata`, `tVolumetrics`, `tParticipatingMedia1`; `tGIY`, `tGICoCg`; the sun's cascades |
|
|
870
|
+
| `shader/chunk/screen_space/SCREEN_SPACE_RESOURCES.js` | `tDepth`, `tHZB`, `tNormal` |
|
|
871
|
+
| `geometry/GEOMETRY_ATTRIBUTE_DATA_RESOURCE.js`, `geometry/meshlet/MESHLET_METADATA_RESOURCE.js`, `scene/SCENE_DATABASE_RESOURCE.js` | `meshlet_data`, `meshlet_metadata`, `scene_database` |
|
|
872
|
+
| `material/standard/SHADING_MATERIAL_RESOURCE_GROUP.js`, `water/surface/WATER_SURFACE_RESOURCES.js`, `water/shader_water.js` | the standard material's nine; the surface interface's five; water's trace and LOD |
|
|
873
|
+
|
|
874
|
+
- **Migrated:** every chunk the eight switched shaders link in any variant declares what its own functions read,
|
|
875
|
+
and so do the sibling chunks in the same files: 56 chunks in 52 files. The prose lists of bindings they replace are gone ("relies on the `light_data` storage
|
|
876
|
+
binding…", "Bindings it reads: …").
|
|
877
|
+
- **Groups built from the declarations:** `SHADING_LIGHT_RESOURCE_GROUP`, `LPV_SHADER_RESOURCE_GROUP`,
|
|
878
|
+
`SHADING_MATERIAL_RESOURCE_GROUP`, the froxel GI group, water's resources and the sun's cascades in the lighting pass.
|
|
879
|
+
Every other group keeps its `addX` calls, which satisfy the declarations by name and type.
|
|
880
|
+
|
|
881
|
+
#### What changed in the code
|
|
882
|
+
|
|
883
|
+
Every exported shader and every variant of the switched ones, 406 modules, was linked on the base and on stage 3
|
|
884
|
+
and compared with the `Struct_N` names normalised. 399 are identical. The rest are the six shaders below, which gain
|
|
885
|
+
the bindings their chunks read, and one script's error message (a path).
|
|
886
|
+
|
|
887
|
+
#### Found and fixed: six shaders that could not compile
|
|
888
|
+
|
|
889
|
+
A migrated chunk is checked wherever it is linked, and six shaders link one that reads a binding they never bound.
|
|
890
|
+
Tint (headless Chrome, RTX 4090) refuses master's sources for all six: `unresolved value 'meshlet_data'` in the
|
|
891
|
+
geometry SDF build and the four lightmap debug views (`density`, `uv_checker`, `view_flat`, `view_sh`), and
|
|
892
|
+
`unresolved value 'tHZB'` in screen-space shadows. Until now they failed at `createShaderModule`; the check fails
|
|
893
|
+
them at link, and their modules threw on import. None is reached in-tree: `GPUGeometryManager.sdf` throws "Not
|
|
894
|
+
implemented", and nothing imports the other five. Each now binds what its chunks read, appended to its group:
|
|
895
|
+
|
|
896
|
+
- **Screen-space shadows:** `tHZB`. Compiles on Tint.
|
|
897
|
+
- **Geometry SDF build:** `meshlet_metadata` and `meshlet_data`, and `GPUGeometrySDFManager` passes
|
|
898
|
+
`geometries.meshlets`' buffers as every other dispatch does. Compiles on Tint.
|
|
899
|
+
- **The lightmap debug views:** the same two buffers, so they import again. On Tint they now stop at `struct member
|
|
900
|
+
lightmap_uvs not found`: the mesh struct no longer has the field. Not changed.
|
|
901
|
+
|
|
902
|
+
#### Tests
|
|
903
|
+
|
|
904
|
+
- **`ShaderResourceDescriptor.spec.js`** (6 tests): what satisfies a declaration, per kind.
|
|
905
|
+
- **`ShaderResourceGroupDescriptor.spec.js`** (+1): one declaration in two groups sits at each group's index, and
|
|
906
|
+
visibility is the group's.
|
|
907
|
+
- **`CodeChunk.spec.js`** (+1) and **`CodeChunkChoice.spec.js`** (+1): collection at link; a choice refuses a
|
|
908
|
+
declaration.
|
|
909
|
+
- **`ShaderDescriptor.spec.js`** (+4): unbound and mistyped name the chunk, the binding and the shader; a binding read
|
|
910
|
+
as declared, or read-write, links the same source as no declaration; a variant checks only its selected alternative.
|
|
911
|
+
- **`switched_shaders_declare_bindings.spec.js`** (7 tests), the audit: every chunk of the eight switched shaders,
|
|
912
|
+
in every variant, declares exactly the module-scope bindings its own functions read, parsed, with parameters and
|
|
913
|
+
locals excluded. The shader's body is where its bindings are written, and declares nothing. It failed with 106
|
|
914
|
+
findings over 50 chunks before the migration.
|
|
915
|
+
- **`GPUGeometrySDFManager.spec.js`:** its geometry manager stand-in gains the meshlet buffers.
|
|
916
|
+
- **Gates:** the shade suite passes, 901 files and 6,833 tests. `check-types` reads 18, the same as the base.
|
|
917
|
+
|
|
918
|
+
#### Device check (one-off, in-app browser)
|
|
919
|
+
|
|
920
|
+
The modules are the same text, so the check is that the renderer's pipelines still link and run. The avboit
|
|
921
|
+
playground compiled its nine AVBOIT modules and drew AVBOIT and MBOIT, under IBL and Brick4 each, for 2,038 frames;
|
|
922
|
+
the vsm playground drew cascades and then virtual shadow maps. No uncaptured device error came from either.
|
|
923
|
+
|
|
924
|
+
#### Found along the way, not changed
|
|
925
|
+
|
|
926
|
+
- **Water's optics still call `water_gi_irradiance` without a dependency.** Making `chunk_water_gi` their dependency
|
|
927
|
+
was tried: the shader is unchanged, but the in-scatter oracle and the downwelling spec harnesses supply their own
|
|
928
|
+
stub through that name, and would then link two definitions, which the emulator tolerates and WGSL does not.
|
|
929
|
+
Fixing it means a choice of how the sky reaches these chunks: an argument, or a stub chunk the harness specializes in.
|
|
930
|
+
- **The lightmap debug views' `lightmap_uvs`,** above.
|
|
931
|
+
- **Placement derived from the declarations,** the larger change to the shader class this stage anticipated (§5.3):
|
|
932
|
+
not built. Groups still place their bindings by hand, and declarations only check them.
|