@woosh/meep-engine 3.69.0 → 3.71.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/CHANGELOG.md +45 -1
- package/MIGRATION_2_TO_3.md +1 -1
- package/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/src/core/bvh8/build/BVH8Converter.d.ts +16 -0
- package/src/core/bvh8/build/BVH8Converter.d.ts.map +1 -1
- package/src/core/bvh8/build/BVH8Converter.js +64 -37
- package/src/core/bvh8/build/bvh8_assign_slots_greedy.d.ts +25 -0
- package/src/core/bvh8/build/bvh8_assign_slots_greedy.d.ts.map +1 -0
- package/src/core/bvh8/build/bvh8_assign_slots_greedy.js +68 -0
- package/src/core/bvh8/build/bvh8_from_proxy.d.ts.map +1 -1
- package/src/core/bvh8/build/bvh8_from_proxy.js +2 -33
- package/src/core/bvh8/build/bvh8_node_fit_slots.d.ts +22 -0
- package/src/core/bvh8/build/bvh8_node_fit_slots.d.ts.map +1 -0
- package/src/core/bvh8/build/bvh8_node_fit_slots.js +115 -0
- package/src/core/bvh8/bvh8_depth.d.ts +8 -0
- package/src/core/bvh8/bvh8_depth.d.ts.map +1 -0
- package/src/core/bvh8/bvh8_depth.js +39 -0
- package/src/core/math/complex/complex_fft_radix2.d.ts +19 -0
- package/src/core/math/complex/complex_fft_radix2.d.ts.map +1 -0
- package/src/core/math/complex/complex_fft_radix2.js +71 -0
- package/src/engine/graphics3/GPUFluidSystem.d.ts +17 -4
- package/src/engine/graphics3/GPUFluidSystem.d.ts.map +1 -1
- package/src/engine/graphics3/GPUFluidSystem.js +113 -16
- package/src/engine/graphics3/VolumetricLightMapSystem.d.ts +1 -1
- package/src/engine/graphics3/VolumetricLightMapSystem.js +261 -261
- package/src/engine/physics/cloth/playground/wind_main.js +7 -6
- package/src/engine/physics/cloth/wind/AbstractClothWind.d.ts +2 -2
- package/src/engine/physics/cloth/wind/AbstractClothWind.js +2 -2
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts +3 -3
- package/src/engine/physics/cloth/wind/ClothFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothFluidWind.js +7 -9
- package/src/engine/physics/cloth/wind/ClothGPUFluidWind.d.ts +10 -10
- package/src/engine/physics/cloth/wind/ClothGPUFluidWind.d.ts.map +1 -1
- package/src/engine/physics/cloth/wind/ClothGPUFluidWind.js +14 -22
- package/src/engine/physics/fluid/FluidAtmosphere.d.ts +16 -2
- package/src/engine/physics/fluid/FluidAtmosphere.d.ts.map +1 -1
- package/src/engine/physics/fluid/FluidAtmosphere.js +17 -3
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponentSerializationAdapter.d.ts +1 -2
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponentSerializationAdapter.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidEffectorsComponentSerializationAdapter.js +1 -2
- package/src/engine/physics/fluid/ecs/FluidEffectorsSystem.d.ts +8 -5
- package/src/engine/physics/fluid/ecs/FluidEffectorsSystem.d.ts.map +1 -1
- package/src/engine/physics/fluid/ecs/FluidEffectorsSystem.js +60 -17
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.d.ts +1 -1
- package/src/engine/physics/fluid/effector/AbstractFluidEffector.js +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts +33 -47
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffector.js +38 -176
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationAdapter.d.ts +8 -11
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationAdapter.d.ts.map +1 -1
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationAdapter.js +13 -24
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationUpgrader_0_1.d.ts +16 -0
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/physics/fluid/effector/GlobalFluidEffectorSerializationUpgrader_0_1.js +35 -0
- package/src/engine/physics/fluid/fluid_apply_atmosphere.d.ts +1 -1
- package/src/engine/physics/fluid/fluid_apply_atmosphere.js +1 -1
- package/src/engine/physics/fluid/turbulence/FLUID_TURBULENCE_TILE.d.ts +28 -0
- package/src/engine/physics/fluid/turbulence/FLUID_TURBULENCE_TILE.d.ts.map +1 -0
- package/src/engine/physics/fluid/turbulence/FLUID_TURBULENCE_TILE.js +29 -0
- package/src/engine/physics/fluid/turbulence/fluid_atmosphere_velocity_at.d.ts +16 -0
- package/src/engine/physics/fluid/turbulence/fluid_atmosphere_velocity_at.d.ts.map +1 -0
- package/src/engine/physics/fluid/turbulence/fluid_atmosphere_velocity_at.js +49 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_inverse_tile_size.d.ts +11 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_inverse_tile_size.d.ts.map +1 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_inverse_tile_size.js +18 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_data.d.ts +25 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_data.d.ts.map +1 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_data.js +65 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_generate.d.ts +56 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_generate.d.ts.map +1 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_generate.js +313 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_sample.d.ts +16 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_sample.d.ts.map +1 -0
- package/src/engine/physics/fluid/turbulence/fluid_turbulence_tile_sample.js +69 -0
- package/src/engine/sound/simulation/probe/probe_place_sdf_cover.d.ts +1 -2
- package/src/engine/sound/simulation/probe/probe_place_sdf_cover.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/probe_place_sdf_cover.js +1 -2
- package/src/generation/foliage/mesh/branch_ring_triangulate.d.ts +1 -1
- package/src/generation/foliage/mesh/branch_ring_triangulate.js +1 -1
- package/src/shade/playground/bvh_repro/README.md +8 -6
- package/src/shade/playground/bvh_repro/index.html +125 -124
- package/src/shade/playground/bvh_repro/main.js +259 -254
- package/src/shade/playground/foliage_wind/foliage_world.d.ts.map +1 -1
- package/src/shade/playground/foliage_wind/foliage_world.js +7 -4
- package/src/shade/playground/grass_surfaces/main.js +3 -2
- package/src/shade/playground/particle_ecs/bonfire_wind.d.ts +23 -13
- package/src/shade/playground/particle_ecs/bonfire_wind.d.ts.map +1 -1
- package/src/shade/playground/particle_ecs/bonfire_wind.js +30 -33
- package/src/shade/playground/skinned_blas_refit/README.md +26 -14
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_leaf_triangles.d.ts +14 -9
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_leaf_triangles.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_leaf_triangles.js +126 -127
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_points.js +95 -95
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_visibility.d.ts +9 -1
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_visibility.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_visibility.js +146 -135
- package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.d.ts +6 -6
- package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.js +148 -134
- package/src/shade/playground/skinned_blas_refit/verify_leaf_triangles.d.ts +11 -8
- package/src/shade/playground/skinned_blas_refit/verify_leaf_triangles.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_leaf_triangles.js +342 -202
- package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.d.ts +12 -13
- 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 +136 -116
- package/src/shade/playground/skinned_blas_refit/verify_traversal_reachability.d.ts +4 -4
- package/src/shade/playground/skinned_blas_refit/verify_traversal_reachability.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_traversal_reachability.js +255 -249
- package/src/shade/playground/water_surface/main.js +6 -3
- package/src/shade/renderer/Renderer.d.ts +0 -12
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +0 -101
- package/src/shade/renderer/ShadeIndirectLightingMode.d.ts +0 -1
- package/src/shade/renderer/ShadeIndirectLightingMode.js +0 -2
- package/src/shade/renderer/animation/GPUAnimationManager.js +2 -2
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +7 -8
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/ATMOSPHERE_PARAMETERS_STRUCT.js +7 -0
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +1 -4
- package/src/shade/renderer/fluid/FLUID_FAR_FIELD_STRUCT.d.ts +111 -0
- package/src/shade/renderer/fluid/FLUID_FAR_FIELD_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/fluid/FLUID_FAR_FIELD_STRUCT.js +162 -0
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +40 -11
- package/src/shade/renderer/fluid/GPUFluidCascade.d.ts.map +1 -1
- package/src/shade/renderer/fluid/GPUFluidCascade.js +149 -47
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +11 -4
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts.map +1 -1
- package/src/shade/renderer/fluid/GPUFluidCascadeStack.js +69 -10
- package/src/shade/renderer/fluid/chunk_fluid_far_field.d.ts +19 -0
- package/src/shade/renderer/fluid/chunk_fluid_far_field.d.ts.map +1 -0
- package/src/shade/renderer/fluid/chunk_fluid_far_field.js +43 -0
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_PARENT_STRUCT.d.ts +10 -9
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_PARENT_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_PARENT_STRUCT.js +14 -12
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_RESTRICT_STRUCT.d.ts +3 -2
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_RESTRICT_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/FLUID_CASCADE_RESTRICT_STRUCT.js +7 -5
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_epilogue.d.ts +17 -9
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_epilogue.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_epilogue.js +58 -18
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.d.ts +23 -11
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/chunk_fluid_cascade_parent.js +371 -335
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_fill.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_fill.js +2 -1
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_ghosts.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_ghosts.js +109 -108
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_restrict.d.ts +5 -3
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_restrict.d.ts.map +1 -1
- package/src/shade/renderer/fluid/coupling/shader_fluid_cascade_restrict.js +24 -12
- package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +7 -7
- package/src/shade/renderer/fluid/mac/FLUID_MAC_STEP_STRUCT.d.ts +6 -2
- package/src/shade/renderer/fluid/mac/FLUID_MAC_STEP_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/FLUID_MAC_STEP_STRUCT.js +10 -5
- package/src/shade/renderer/fluid/mac/FluidMacPasses.d.ts +20 -21
- package/src/shade/renderer/fluid/mac/FluidMacPasses.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/FluidMacPasses.js +453 -427
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.d.ts.map +1 -1
- package/src/shade/renderer/fluid/mac/shader_fluid_mac_advect_correct.js +2 -1
- package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
- package/src/shade/renderer/fluid/publish/FluidWindPublish.d.ts +13 -5
- package/src/shade/renderer/fluid/publish/FluidWindPublish.d.ts.map +1 -1
- package/src/shade/renderer/fluid/publish/FluidWindPublish.js +20 -10
- package/src/shade/renderer/fluid/publish/chunk_fluid_wind_publish_cell.d.ts +2 -2
- package/src/shade/renderer/fluid/publish/chunk_fluid_wind_publish_cell.js +2 -2
- package/src/shade/renderer/fluid/publish/shader_fluid_wind_publish.d.ts +5 -3
- package/src/shade/renderer/fluid/publish/shader_fluid_wind_publish.d.ts.map +1 -1
- package/src/shade/renderer/fluid/publish/shader_fluid_wind_publish.js +147 -142
- package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
- package/src/shade/renderer/fluid/query/GPUFluidQueries.js +2 -2
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +5 -7
- package/src/shade/renderer/geometry/MeshletGeometry.d.ts +4 -1
- package/src/shade/renderer/geometry/MeshletGeometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/MeshletGeometry.js +4 -1
- package/src/shade/renderer/geometry/MeshletGeometrySerializationAdapter.d.ts +20 -0
- package/src/shade/renderer/geometry/MeshletGeometrySerializationAdapter.d.ts.map +1 -1
- package/src/shade/renderer/geometry/MeshletGeometrySerializationAdapter.js +35 -3
- package/src/shade/renderer/geometry/blas_from_meshlets.d.ts +9 -3
- package/src/shade/renderer/geometry/blas_from_meshlets.d.ts.map +1 -1
- package/src/shade/renderer/geometry/blas_from_meshlets.js +16 -30
- package/src/shade/renderer/geometry/bvh/BLAS8_REFIT_TARGET_STRUCT.d.ts +14 -0
- package/src/shade/renderer/geometry/bvh/BLAS8_REFIT_TARGET_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/BLAS8_REFIT_TARGET_STRUCT.js +33 -0
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.d.ts +18 -21
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.js +78 -158
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +18 -39
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +39 -398
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts +6 -7
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.js +5 -7
- package/src/shade/renderer/geometry/bvh/bvh8_build_for_meshlets.d.ts +36 -0
- package/src/shade/renderer/geometry/bvh/bvh8_build_for_meshlets.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/bvh8_build_for_meshlets.js +179 -0
- package/src/shade/renderer/geometry/bvh/meshlet_batch_to_clustered_bvh.d.ts +30 -0
- package/src/shade/renderer/geometry/bvh/meshlet_batch_to_clustered_bvh.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/meshlet_batch_to_clustered_bvh.js +207 -0
- package/src/shade/renderer/geometry/bvh/shader_blas8_refit_batch.d.ts +52 -0
- package/src/shade/renderer/geometry/bvh/shader_blas8_refit_batch.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/shader_blas8_refit_batch.js +464 -0
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts +12 -0
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +37 -0
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +4 -4
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +2 -2
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +2 -2
- package/src/shade/renderer/geometry/sdf/shader_sdf_visualize.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/shader_sdf_visualize.js +4 -4
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/surface/shader_mesh_surface_trace.js +2 -2
- package/src/shade/renderer/geometry/sr_create_group_RTX.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sr_create_group_RTX.js +4 -4
- 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 +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts +9 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MESH_BRICK.js +10 -11
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.d.ts +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_walk.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts +12 -8
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/shader_mesh_brick_gather.js +109 -60
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_sdf.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/debug/graph_probe_clipmap_debug_mesh_surfaces.js +2 -2
- package/src/shade/renderer/gpu_primitive/bvh/BVH_BUFFER_LAYOUT.d.ts +2 -2
- package/src/shade/renderer/gpu_primitive/bvh/BVH_BUFFER_LAYOUT.js +70 -70
- package/src/shade/renderer/gpu_primitive/bvh/BVH_BUILD_SETTINGS_STRUCT.d.ts +6 -7
- package/src/shade/renderer/gpu_primitive/bvh/BVH_BUILD_SETTINGS_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/BVH_BUILD_SETTINGS_STRUCT.js +6 -7
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts +3 -3
- package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.js +3 -3
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.js +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts +2 -2
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.js +3 -3
- package/src/shade/renderer/gpu_primitive/bvh8/BVH8_TREE_BUFFER_LAYOUT.d.ts +69 -0
- package/src/shade/renderer/gpu_primitive/bvh8/BVH8_TREE_BUFFER_LAYOUT.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/BVH8_TREE_BUFFER_LAYOUT.js +89 -0
- package/src/shade/renderer/gpu_primitive/bvh8/bvh8_encode_from_bvh2.d.ts +41 -0
- package/src/shade/renderer/gpu_primitive/bvh8/bvh8_encode_from_bvh2.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/bvh8_encode_from_bvh2.js +348 -0
- package/src/shade/renderer/gpu_primitive/bvh8/check_bvh8_tree.d.ts +34 -0
- package/src/shade/renderer/gpu_primitive/bvh8/check_bvh8_tree.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/check_bvh8_tree.js +291 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_assign.d.ts +31 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_assign.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_assign.js +175 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_depth.d.ts +27 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_depth.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_depth.js +48 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_gather.d.ts +26 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_gather.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_gather.js +118 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_node.d.ts +22 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_node.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_node.js +143 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_sums.d.ts +36 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_sums.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_sums.js +97 -0
- package/src/shade/renderer/gpu_primitive/bvh8/graph_bvh8_encode_from_bvh2.d.ts +49 -0
- package/src/shade/renderer/gpu_primitive/bvh8/graph_bvh8_encode_from_bvh2.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/graph_bvh8_encode_from_bvh2.js +265 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_assign.d.ts +37 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_assign.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_assign.js +109 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_count.d.ts +15 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_count.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_count.js +85 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_count_single_workgroup.d.ts +26 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_count_single_workgroup.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_count_single_workgroup.js +200 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_parents.d.ts +19 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_parents.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_parents.js +81 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_write.d.ts +14 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_write.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/shader_bvh8_encode_write.js +101 -0
- package/src/shade/renderer/gpu_primitive/bvh8/verify_gpu_bvh8_encode.d.ts +19 -0
- package/src/shade/renderer/gpu_primitive/bvh8/verify_gpu_bvh8_encode.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh8/verify_gpu_bvh8_encode.js +361 -0
- package/src/shade/renderer/grass/surface/shader_grass_surface_bake.d.ts.map +1 -1
- package/src/shade/renderer/grass/surface/shader_grass_surface_bake.js +5 -6
- package/src/shade/renderer/light/GPULightCollection.d.ts +3 -2
- package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
- package/src/shade/renderer/light/GPULightCollection.js +28 -2
- package/src/shade/renderer/light/environment/shader_project_environment_sh.d.ts +2 -2
- package/src/shade/renderer/light/environment/shader_project_environment_sh.js +2 -2
- package/src/shade/renderer/light/make_sunlight.d.ts +14 -0
- package/src/shade/renderer/light/make_sunlight.d.ts.map +1 -1
- package/src/shade/renderer/light/make_sunlight.js +16 -2
- package/src/shade/renderer/light/model/DirectionalLight.d.ts +9 -0
- package/src/shade/renderer/light/model/DirectionalLight.d.ts.map +1 -1
- package/src/shade/renderer/light/model/DirectionalLight.js +10 -1
- package/src/shade/renderer/light/model/Light.d.ts +4 -2
- package/src/shade/renderer/light/model/Light.d.ts.map +1 -1
- package/src/shade/renderer/light/model/Light.js +4 -2
- package/src/shade/renderer/light/model/io/light_record_directional.d.ts.map +1 -1
- package/src/shade/renderer/light/model/io/light_record_directional.js +3 -0
- package/src/shade/renderer/light/shader_refresh_light_poses.d.ts +16 -1
- package/src/shade/renderer/light/shader_refresh_light_poses.d.ts.map +1 -1
- package/src/shade/renderer/light/shader_refresh_light_poses.js +211 -154
- package/src/shade/renderer/lightmap/GPULightMap.d.ts.map +1 -1
- package/src/shade/renderer/lightmap/GPULightMap.js +1 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +1 -0
- 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 +1 -0
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts +2 -5
- package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/SSR.js +1 -13
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts +2 -9
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_add_hit_irradiance.js +2 -38
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +0 -5
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +0 -16
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +3 -10
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts +0 -2
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect.js +0 -3
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +8 -4
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +60 -33
- package/src/shade/renderer/scene/GPUSceneContext.d.ts +0 -6
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +0 -19
- package/src/shade/renderer/scene/Scene.d.ts +1 -7
- package/src/shade/renderer/scene/Scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/Scene.js +1 -8
- package/src/shade/renderer/scene/bvh/sdf_build_from_scene.d.ts.map +1 -0
- package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_build_from_scene.js +6 -6
- package/src/shade/renderer/scene/bvh/sdf_find_local_maxima.d.ts.map +1 -0
- package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_find_local_maxima.js +1 -1
- package/src/shade/renderer/scene/verify_gpu_tlas_build.d.ts +6 -6
- package/src/shade/renderer/scene/verify_gpu_tlas_build.d.ts.map +1 -1
- package/src/shade/renderer/scene/verify_gpu_tlas_build.js +23 -53
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/BVH8_INODE_STRUCT.d.ts +3 -1
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/BVH8_INODE_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/BVH8_INODE_STRUCT.js +5 -3
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/BVH8_MAX_DEPTH.d.ts +28 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/BVH8_MAX_DEPTH.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/BVH8_MAX_DEPTH.js +29 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_grid.d.ts +25 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_grid.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_grid.js +97 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_intersect.d.ts +8 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_intersect.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_intersect.js +23 -14
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_slot_distances.d.ts +36 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_slot_distances.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_slot_distances.js +222 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_ray_direction_rcp.d.ts +20 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_ray_direction_rcp.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_ray_direction_rcp.js +30 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_tree_read.d.ts +30 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_tree_read.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_tree_read.js +91 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_waiting_slots.d.ts +23 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_waiting_slots.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_waiting_slots.js +40 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_blas_nearest.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_blas_nearest.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_blas_nearest.js +121 -70
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_blas_occluded.d.ts +13 -1
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_blas_occluded.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_blas_occluded.js +117 -61
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_nearest.d.ts +21 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_nearest.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_nearest.js +111 -72
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_nearest_among.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_nearest_among.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_nearest_among.js +83 -54
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_occluded.d.ts +14 -0
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_occluded.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/ray/chunk_ray_query_occluded.js +92 -60
- package/src/shade/renderer/shader/chunk/light/DIRECTIONAL_LIGHT_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/light/DIRECTIONAL_LIGHT_STRUCT.js +12 -2
- package/src/shade/renderer/shader/chunk/light/io/chunk_point_lights_iterate.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/light/io/chunk_point_lights_iterate.js +1 -1
- package/src/shade/renderer/{global_illumination/probe/octahedral/sample → shader/chunk/light/probe}/chunk_parallax_correct_spherical_probe.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/light/probe/chunk_parallax_correct_spherical_probe.d.ts.map +1 -0
- package/src/shade/renderer/{global_illumination/probe/octahedral/sample → shader/chunk/light/probe}/chunk_parallax_correct_spherical_probe.js +2 -2
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/light/probe/chunk_probe_visibility_weight.js +1 -1
- package/src/shade/renderer/shader/chunk/sdf/chunk_point_query_blas_nearest.d.ts +22 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_point_query_blas_nearest.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/sdf/chunk_point_query_blas_nearest.js +153 -106
- package/src/shade/renderer/shader/chunk/sdf/chunk_scene_point_query_nearest.d.ts +21 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_scene_point_query_nearest.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/sdf/chunk_scene_point_query_nearest.js +115 -74
- package/src/shade/renderer/shader/chunk/sdf/chunk_scene_sdf_raymarch.d.ts +5 -2
- 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 +89 -63
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf_query_distance.d.ts +15 -0
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf_query_distance.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/sdf/chunk_sdf_query_distance.js +108 -63
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh2_dering_optimize_positive.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh2_dering_optimize_positive.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/spherical_harmonics/dering/chunk_sh2_dering_optimize_positive.js +1 -2
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_raycast.d.ts +14 -0
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_raycast.d.ts.map +1 -1
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_raycast.js +94 -60
- package/src/shade/renderer/shadow/sdf/graph_draw_sdf_shadows.d.ts.map +1 -1
- package/src/shade/renderer/shadow/sdf/graph_draw_sdf_shadows.js +4 -4
- package/src/shade/renderer/trails/GPUTrailSystem.d.ts +4 -0
- package/src/shade/renderer/trails/GPUTrailSystem.d.ts.map +1 -1
- package/src/shade/renderer/trails/GPUTrailSystem.js +9 -3
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +1 -3
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +0 -3
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.d.ts +2 -2
- package/src/shade/renderer/volumetrics/chunk_volumetrics_irradiance_sh.js +2 -2
- package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +2 -2
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +1 -3
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +0 -9
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +0 -5
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +0 -29
- package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/irradiance_clipmap/shader_irradiance_clipmap_build.js +0 -2
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +11 -6
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_scattering_lut.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_scattering_lut.js +10 -4
- package/src/shade/renderer/water/chunk_water_gi.d.ts +1 -1
- package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
- package/src/shade/renderer/water/chunk_water_gi.js +1 -3
- package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
- package/src/shade/renderer/water/query/shader_water_surface_query.d.ts.map +1 -1
- package/src/shade/renderer/water/query/shader_water_surface_query.js +227 -227
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.d.ts.map +1 -1
- package/src/shade/renderer/water/surface/particles/chunk_water_particle_step.js +7 -4
- package/src/shade/renderer/water/surface/particles/shader_water_particles.js +2 -2
- package/src/shade/renderer/wind/GPUSceneWind.d.ts +37 -5
- package/src/shade/renderer/wind/GPUSceneWind.d.ts.map +1 -1
- package/src/shade/renderer/wind/GPUSceneWind.js +150 -4
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts +9 -3
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/wind/WIND_FIELD_STRUCT.js +13 -3
- package/src/shade/renderer/wind/WIND_FIELD_UNIFORM.d.ts +6 -6
- package/src/shade/renderer/wind/WIND_FIELD_UNIFORM.js +6 -6
- package/src/shade/renderer/wind/chunk_fluid_turbulence.d.ts +39 -0
- package/src/shade/renderer/wind/chunk_fluid_turbulence.d.ts.map +1 -0
- package/src/shade/renderer/wind/chunk_fluid_turbulence.js +63 -0
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts +10 -7
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.d.ts.map +1 -1
- package/src/shade/renderer/wind/chunk_wind_field_sample_cascades.js +34 -11
- package/src/shade/renderer/wind/chunk_wind_field_sample_uniform.d.ts +2 -2
- package/src/shade/renderer/wind/chunk_wind_field_sample_uniform.js +2 -2
- package/src/shade/renderer/wind/wind_field_add_resources.d.ts +6 -4
- package/src/shade/renderer/wind/wind_field_add_resources.d.ts.map +1 -1
- package/src/shade/renderer/wind/wind_field_add_resources.js +9 -6
- package/src/shade/renderer/deferred/indirect/chunk_gi_sample_lpv_cache.d.ts +0 -3
- package/src/shade/renderer/deferred/indirect/chunk_gi_sample_lpv_cache.d.ts.map +0 -1
- package/src/shade/renderer/deferred/indirect/chunk_gi_sample_lpv_cache.js +0 -41
- package/src/shade/renderer/deferred/indirect/chunk_lpv_2d_cache_sample_irradiance.d.ts +0 -6
- package/src/shade/renderer/deferred/indirect/chunk_lpv_2d_cache_sample_irradiance.d.ts.map +0 -1
- package/src/shade/renderer/deferred/indirect/chunk_lpv_2d_cache_sample_irradiance.js +0 -108
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.d.ts +0 -6
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.d.ts.map +0 -1
- package/src/shade/renderer/deferred/indirect/chunk_lpv_sample_light.js +0 -100
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.d.ts +0 -18
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.js +0 -50
- package/src/shade/renderer/geometry/bvh/bvh2_derive_topology.d.ts +0 -23
- package/src/shade/renderer/geometry/bvh/bvh2_derive_topology.d.ts.map +0 -1
- package/src/shade/renderer/geometry/bvh/bvh2_derive_topology.js +0 -87
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.d.ts +0 -42
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.d.ts.map +0 -1
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.js +0 -141
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch_seed.d.ts +0 -21
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch_seed.d.ts.map +0 -1
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch_seed.js +0 -75
- package/src/shade/renderer/geometry/meshlet_batch_to_bvh.d.ts +0 -17
- package/src/shade/renderer/geometry/meshlet_batch_to_bvh.d.ts.map +0 -1
- package/src/shade/renderer/geometry/meshlet_batch_to_bvh.js +0 -247
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts +0 -51
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/GPULightProbeVolume.js +0 -384
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_STRUCT.js +0 -20
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_VOLUME_METADATA_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_VOLUME_METADATA_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/LIGHT_PROBE_VOLUME_METADATA_STRUCT.js +0 -10
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.d.ts +0 -63
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.js +0 -177
- package/src/shade/renderer/global_illumination/lpv/TETRAHEDRAL_MESH_CELL_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/TETRAHEDRAL_MESH_CELL_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/TETRAHEDRAL_MESH_CELL_STRUCT.js +0 -7
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts +0 -68
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.js +0 -409
- package/src/shade/renderer/global_illumination/lpv/bake/PROBE_RAYS_PER_WORKGROUP.d.ts +0 -2
- package/src/shade/renderer/global_illumination/lpv/bake/PROBE_RAYS_PER_WORKGROUP.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/bake/PROBE_RAYS_PER_WORKGROUP.js +0 -1
- package/src/shade/renderer/global_illumination/lpv/debug/shader_visualize_probe_depth.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/debug/shader_visualize_probe_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/debug/shader_visualize_probe_depth.js +0 -38
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_RESOLUTION.d.ts +0 -8
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_RESOLUTION.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_RESOLUTION.js +0 -7
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_STRUCT.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_STRUCT.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/LIGHT_PROBE_DEPTH_STRUCT.js +0 -8
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_get_visibility_mask.js +0 -48
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_coordinate_to_address.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_coordinate_to_address.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_coordinate_to_address.js +0 -11
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_get_pixel.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_get_pixel.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/chunk_lpv_probe_depth_get_pixel.js +0 -20
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts +0 -5
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.js +0 -206
- package/src/shade/renderer/global_illumination/lpv/edit/AddProbeAction.d.ts +0 -14
- package/src/shade/renderer/global_illumination/lpv/edit/AddProbeAction.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/edit/AddProbeAction.js +0 -39
- package/src/shade/renderer/global_illumination/lpv/graph_bake_irradiance_lookup_2d.d.ts +0 -16
- package/src/shade/renderer/global_illumination/lpv/graph_bake_irradiance_lookup_2d.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/graph_bake_irradiance_lookup_2d.js +0 -201
- package/src/shade/renderer/global_illumination/lpv/lpv_jitter_points.d.ts +0 -10
- package/src/shade/renderer/global_illumination/lpv/lpv_jitter_points.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/lpv_jitter_points.js +0 -27
- package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.d.ts +0 -18
- package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/lpv_visualise_probes.js +0 -265
- package/src/shade/renderer/global_illumination/lpv/placement/chunk_refine_probe_placement.d.ts +0 -7
- package/src/shade/renderer/global_illumination/lpv/placement/chunk_refine_probe_placement.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/chunk_refine_probe_placement.js +0 -126
- package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.d.ts +0 -13
- package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/graph_generate_probe_locations.js +0 -377
- package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.d.ts +0 -14
- package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/software/lpv_generate_probe_locations2.js +0 -225
- package/src/shade/renderer/global_illumination/lpv/placement/software/sdf_build_from_scene.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/placement/software/sdf_find_local_maxima.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/shader_diffuse_LPV.d.ts +0 -3
- package/src/shade/renderer/global_illumination/lpv/shader_diffuse_LPV.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/lpv/shader_diffuse_LPV.js +0 -91
- package/src/shade/renderer/global_illumination/probe/chunk_compute_probe_dering.d.ts +0 -5
- package/src/shade/renderer/global_illumination/probe/chunk_compute_probe_dering.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/chunk_compute_probe_dering.js +0 -45
- package/src/shade/renderer/global_illumination/probe/compute_pipeline_probe_dering.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/compute_pipeline_probe_dering.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/compute_pipeline_probe_dering.js +0 -17
- package/src/shade/renderer/global_illumination/probe/lpv_dering_software.d.ts +0 -6
- package/src/shade/renderer/global_illumination/probe/lpv_dering_software.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/lpv_dering_software.js +0 -21
- package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.d.ts +0 -79
- package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/GPUProbeAtlas.js +0 -437
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_ACCUMULATION_PUSH_CONSTANTS.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_ACCUMULATION_PUSH_CONSTANTS.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_ACCUMULATION_PUSH_CONSTANTS.js +0 -14
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.d.ts +0 -42
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/LPV_SHADER_RESOURCE_GROUP.js +0 -68
- package/src/shade/renderer/global_illumination/probe/octahedral/ProbeGBufferTypes.d.ts +0 -9
- package/src/shade/renderer/global_illumination/probe/octahedral/ProbeGBufferTypes.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/ProbeGBufferTypes.js +0 -20
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_map_index_to_border.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_map_index_to_border.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_map_index_to_border.js +0 -47
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_paint_borders_body.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_paint_borders_body.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/chunk_lpv_paint_borders_body.js +0 -55
- package/src/shade/renderer/global_illumination/probe/octahedral/border/graph_lpv_paint_border_depth.d.ts +0 -19
- package/src/shade/renderer/global_illumination/probe/octahedral/border/graph_lpv_paint_border_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/graph_lpv_paint_border_depth.js +0 -85
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_border_read.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_border_read.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_border_read.js +0 -78
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_depth.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_depth.js +0 -70
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_radiance.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_radiance.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/border/shader_lpv_atlas_paint_borders_radiance.js +0 -20
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/chunk_compute_coefficient_address.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/chunk_compute_coefficient_address.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/chunk_compute_coefficient_address.js +0 -20
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lpv_store_sh.d.ts +0 -19
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lpv_store_sh.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lpv_store_sh.js +0 -128
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lvp_atlas_to_sh.d.ts +0 -22
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lvp_atlas_to_sh.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_lvp_atlas_to_sh.js +0 -200
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.d.ts +0 -23
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/convolve/graph_reduce_atlas_to_sh.js +0 -179
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.d.ts +0 -13
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_lpv_shade.js +0 -416
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts +0 -16
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.js +0 -268
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_patch_texel_coord.d.ts +0 -17
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_patch_texel_coord.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_patch_texel_coord.js +0 -38
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_read_patch_texel.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_read_patch_texel.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_read_patch_texel.js +0 -34
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance.js +0 -62
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance_nearest.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance_nearest.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_atlas_sample_probe_radiance_nearest.js +0 -37
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_mesh_interpolate_radiance_via_atlas.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_mesh_interpolate_radiance_via_atlas.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_mesh_interpolate_radiance_via_atlas.js +0 -62
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.d.ts +0 -7
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_lpv_radiance_sample_reflection.js +0 -61
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe_iterative.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe_iterative.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/sample/chunk_parallax_correct_spherical_probe_iterative.js +0 -80
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_accumulate_depth.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_accumulate_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_accumulate_depth.js +0 -143
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_atlas_write_depth.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_atlas_write_depth.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_atlas_write_depth.js +0 -59
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.d.ts +0 -3
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.d.ts.map +0 -1
- package/src/shade/renderer/global_illumination/probe/octahedral/shader_lpv_build_gbuffer.js +0 -227
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_ray_query_blas_occlusion.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_ray_query_blas_occlusion.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_ray_query_blas_occlusion.js +0 -226
- package/src/shade/renderer/shader/chunk/light/lpv/INVALID_TET_DECLARATION.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/INVALID_TET_DECLARATION.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/INVALID_TET_DECLARATION.js +0 -12
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_interpolate_probe_irradiance8.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_interpolate_probe_irradiance8.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_interpolate_probe_irradiance8.js +0 -37
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mask_visibility_via_rays.d.ts +0 -8
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mask_visibility_via_rays.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mask_visibility_via_rays.js +0 -45
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_barycentric_coordinates.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_barycentric_coordinates.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_barycentric_coordinates.js +0 -29
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_neighbours.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_neighbours.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_neighbours.js +0 -20
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_get_vertices.js +0 -22
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe.d.ts +0 -4
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe.js +0 -53
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance.js +0 -48
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance_pre.d.ts +0 -7
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance_pre.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolate_probe_irradiance_pre.js +0 -35
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolation_probe_sh.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolation_probe_sh.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_interpolation_probe_sh.js +0 -38
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_lookup_nearest_cell.js +0 -67
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_walk_to_tetrahedron.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_walk_to_tetrahedron.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_mesh_walk_to_tetrahedron.js +0 -52
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_data.js +0 -22
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_probe_get_position.js +0 -17
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance.js +0 -48
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_8.d.ts +0 -9
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_8.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_8.js +0 -126
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_no_depth.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_no_depth.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_irradiance_no_depth.js +0 -45
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_radiance.js +0 -61
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_sh3_at.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_sh3_at.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/chunk_lpv_sample_sh3_at.js +0 -33
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.d.ts +0 -4
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_mask_weights_by_visibility.js +0 -161
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_probe_sample_depth_array.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_probe_sample_depth_array.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_probe_sample_depth_array.js +0 -59
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.d.ts +0 -4
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/lpv/depth/chunk_lpv_sample_depth_atlas.js +0 -97
- package/src/shade/renderer/shader/chunk/light/sample/chunk_ray_sample_light.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/light/sample/chunk_ray_sample_light.d.ts.map +0 -1
- package/src/shade/renderer/shader/chunk/light/sample/chunk_ray_sample_light.js +0 -105
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_distance.d.ts +0 -6
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_distance.d.ts.map +0 -1
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_distance.js +0 -86
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_raycast_traversal_count.d.ts +0 -2
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_raycast_traversal_count.d.ts.map +0 -1
- package/src/shade/renderer/shadow/sdf/chunk_ray_query_sdf_raycast_traversal_count.js +0 -136
- /package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_build_from_scene.d.ts +0 -0
- /package/src/shade/renderer/{global_illumination/lpv/placement/software → scene/bvh}/sdf_find_local_maxima.d.ts +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slot each child of a wide node is given by the encode of a binary tree as a BVH8
|
|
3
|
+
* ({@link bvh8_encode_from_bvh2}):
|
|
4
|
+
*
|
|
5
|
+
* ```wgsl
|
|
6
|
+
* struct BVH8EncodeAssignment { slots: u32, internal: u32 }
|
|
7
|
+
*
|
|
8
|
+
* fn bvh8_encode_assign(node: u32, children: BVH8EncodeChildren) -> BVH8EncodeAssignment
|
|
9
|
+
* fn bvh8_encode_slot_of(slots: u32, child: u32) -> u32
|
|
10
|
+
* fn bvh8_encode_rank(internal: u32, slot: u32) -> u32
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* `slots` holds a slot a child, three bits each, in the order `bvh8_encode_gather` lists the
|
|
14
|
+
* children; `bvh8_encode_slot_of` reads one out. `internal` has a bit per slot that holds a child
|
|
15
|
+
* node, which is the node's child mask; `bvh8_encode_rank` is how many of those sit below a slot:
|
|
16
|
+
* where the child node in that slot stands in the node's block of child nodes.
|
|
17
|
+
*
|
|
18
|
+
* Cheapest (child, slot) pair first, where a child costs a slot the distance its box's centre lies
|
|
19
|
+
* from the node's, taken with the slot's signs. Of equal costs the first met wins, children in order
|
|
20
|
+
* and for a child its slots in order. A child whose box is not a number costs nothing a comparison
|
|
21
|
+
* can rank; it takes the lowest slot left, so that a tree's shape never depends on what its boxes
|
|
22
|
+
* hold.
|
|
23
|
+
*
|
|
24
|
+
* The enclosing shader declares what {@link chunk_bvh8_encode_gather} reads, and the binary tree is
|
|
25
|
+
* fitted.
|
|
26
|
+
*
|
|
27
|
+
* @type {CodeChunk}
|
|
28
|
+
*/
|
|
29
|
+
export const chunk_bvh8_encode_assign: CodeChunk;
|
|
30
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
31
|
+
//# sourceMappingURL=chunk_bvh8_encode_assign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_bvh8_encode_assign.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_assign.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,uCAFU,SAAS,CAgJjB;0BA7KwB,oCAAoC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { F32_MAX_DEFINITION } from "../../shader/chunk/math/F32_MAX_DEFINITION.js";
|
|
2
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
3
|
+
import { chunk_bvh8_encode_gather } from "./chunk_bvh8_encode_gather.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The slot each child of a wide node is given by the encode of a binary tree as a BVH8
|
|
7
|
+
* ({@link bvh8_encode_from_bvh2}):
|
|
8
|
+
*
|
|
9
|
+
* ```wgsl
|
|
10
|
+
* struct BVH8EncodeAssignment { slots: u32, internal: u32 }
|
|
11
|
+
*
|
|
12
|
+
* fn bvh8_encode_assign(node: u32, children: BVH8EncodeChildren) -> BVH8EncodeAssignment
|
|
13
|
+
* fn bvh8_encode_slot_of(slots: u32, child: u32) -> u32
|
|
14
|
+
* fn bvh8_encode_rank(internal: u32, slot: u32) -> u32
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* `slots` holds a slot a child, three bits each, in the order `bvh8_encode_gather` lists the
|
|
18
|
+
* children; `bvh8_encode_slot_of` reads one out. `internal` has a bit per slot that holds a child
|
|
19
|
+
* node, which is the node's child mask; `bvh8_encode_rank` is how many of those sit below a slot:
|
|
20
|
+
* where the child node in that slot stands in the node's block of child nodes.
|
|
21
|
+
*
|
|
22
|
+
* Cheapest (child, slot) pair first, where a child costs a slot the distance its box's centre lies
|
|
23
|
+
* from the node's, taken with the slot's signs. Of equal costs the first met wins, children in order
|
|
24
|
+
* and for a child its slots in order. A child whose box is not a number costs nothing a comparison
|
|
25
|
+
* can rank; it takes the lowest slot left, so that a tree's shape never depends on what its boxes
|
|
26
|
+
* hold.
|
|
27
|
+
*
|
|
28
|
+
* The enclosing shader declares what {@link chunk_bvh8_encode_gather} reads, and the binary tree is
|
|
29
|
+
* fitted.
|
|
30
|
+
*
|
|
31
|
+
* @type {CodeChunk}
|
|
32
|
+
*/
|
|
33
|
+
export const chunk_bvh8_encode_assign = CodeChunk.from(
|
|
34
|
+
//language=WGSL
|
|
35
|
+
`
|
|
36
|
+
const BVH8_ENCODE_SLOT_UNASSIGNED = 0xffffffffu;
|
|
37
|
+
|
|
38
|
+
struct BVH8EncodeAssignment {
|
|
39
|
+
// a slot a child, three bits each, in the children's order
|
|
40
|
+
slots: u32,
|
|
41
|
+
// a bit per slot that holds a child node
|
|
42
|
+
internal: u32,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
fn bvh8_encode_slot_of(slots: u32, child: u32) -> u32 {
|
|
46
|
+
return (slots >> (child * 3u)) & 7u;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// how many child nodes sit in the slots below this one
|
|
50
|
+
fn bvh8_encode_rank(internal: u32, slot: u32) -> u32 {
|
|
51
|
+
return countOneBits(internal & ((1u << slot) - 1u));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
struct BVH8EncodeCheapest {
|
|
55
|
+
cost: f32,
|
|
56
|
+
// BVH8_ENCODE_SLOT_UNASSIGNED when no open slot has a cost that can be ranked
|
|
57
|
+
slot: u32,
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// The cheapest of the slots still open to a child whose centre lies 'offset' from its node's, and of
|
|
61
|
+
// equal costs the lowest slot.
|
|
62
|
+
fn bvh8_encode_cheapest_slot(offset: vec3<f32>, filled: u32) -> BVH8EncodeCheapest {
|
|
63
|
+
// the slots still open, the low four and the high four
|
|
64
|
+
let open_low = (vec4<u32>(filled) & vec4<u32>(1u, 2u, 4u, 8u)) == vec4<u32>(0u);
|
|
65
|
+
let open_high = (vec4<u32>(filled) & vec4<u32>(16u, 32u, 64u, 128u)) == vec4<u32>(0u);
|
|
66
|
+
|
|
67
|
+
// What the child costs each slot, (±x + ±y) + ±z: x is taken against the slot's bit 2, y against
|
|
68
|
+
// bit 1, z against bit 0.
|
|
69
|
+
let y = vec4<f32>(offset.y, offset.y, -offset.y, -offset.y);
|
|
70
|
+
let z = vec4<f32>(offset.z, -offset.z, offset.z, -offset.z);
|
|
71
|
+
|
|
72
|
+
let cost_low = (vec4<f32>(offset.x) + y) + z;
|
|
73
|
+
let cost_high = (vec4<f32>(-offset.x) + y) + z;
|
|
74
|
+
|
|
75
|
+
// an open slot, at a cost that is a number below infinity
|
|
76
|
+
let ranked_low = open_low & (cost_low <= vec4<f32>(F32_MAX));
|
|
77
|
+
let ranked_high = open_high & (cost_high <= vec4<f32>(F32_MAX));
|
|
78
|
+
|
|
79
|
+
let least_of = min(
|
|
80
|
+
select(vec4<f32>(F32_MAX), cost_low, ranked_low),
|
|
81
|
+
select(vec4<f32>(F32_MAX), cost_high, ranked_high)
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
let least = min(min(least_of.x, least_of.y), min(least_of.z, least_of.w));
|
|
85
|
+
|
|
86
|
+
// the slots at that cost
|
|
87
|
+
let at = select(vec4<u32>(0u), vec4<u32>(1u, 2u, 4u, 8u), ranked_low & (cost_low == vec4<f32>(least)))
|
|
88
|
+
| select(vec4<u32>(0u), vec4<u32>(16u, 32u, 64u, 128u), ranked_high & (cost_high == vec4<f32>(least)));
|
|
89
|
+
|
|
90
|
+
let slots_at = at.x | at.y | at.z | at.w;
|
|
91
|
+
|
|
92
|
+
return BVH8EncodeCheapest(least, select(countTrailingZeros(slots_at), BVH8_ENCODE_SLOT_UNASSIGNED, slots_at == 0u));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
fn bvh8_encode_assign(node: u32, children: BVH8EncodeChildren) -> BVH8EncodeAssignment {
|
|
96
|
+
// each child's centre from the node's, both doubled
|
|
97
|
+
var offsets: array<vec3<f32>, 8>;
|
|
98
|
+
|
|
99
|
+
// each child's cheapest open slot, and what it costs
|
|
100
|
+
var cheapest_cost: array<f32, 8>;
|
|
101
|
+
var cheapest_slot: array<u32, 8>;
|
|
102
|
+
|
|
103
|
+
let centre = bvh8_encode_low(node) + bvh8_encode_high(node);
|
|
104
|
+
|
|
105
|
+
for (var c = 0u; c < children.count; c++) {
|
|
106
|
+
let child = children.nodes[c];
|
|
107
|
+
|
|
108
|
+
let offset = (bvh8_encode_low(child) + bvh8_encode_high(child)) - centre;
|
|
109
|
+
|
|
110
|
+
let cheapest = bvh8_encode_cheapest_slot(offset, 0u);
|
|
111
|
+
|
|
112
|
+
offsets[c] = offset;
|
|
113
|
+
cheapest_cost[c] = cheapest.cost;
|
|
114
|
+
cheapest_slot[c] = cheapest.slot;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
var assignment = BVH8EncodeAssignment(0u, 0u);
|
|
118
|
+
|
|
119
|
+
// children with a slot, and slots with a child
|
|
120
|
+
var placed = 0u;
|
|
121
|
+
var filled = 0u;
|
|
122
|
+
|
|
123
|
+
// a child a turn: the cheapest (child, slot) pair still open
|
|
124
|
+
for (var turn = 0u; turn < children.count; turn++) {
|
|
125
|
+
var min_cost = 0.0;
|
|
126
|
+
var min_slot = BVH8_ENCODE_SLOT_UNASSIGNED;
|
|
127
|
+
var min_child = BVH8_ENCODE_SLOT_UNASSIGNED;
|
|
128
|
+
|
|
129
|
+
for (var c = 0u; c < children.count; c++) {
|
|
130
|
+
if ((placed & (1u << c)) != 0u || cheapest_slot[c] == BVH8_ENCODE_SLOT_UNASSIGNED) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// the first child that can be ranked, and after it any that is cheaper
|
|
135
|
+
if (min_slot == BVH8_ENCODE_SLOT_UNASSIGNED || cheapest_cost[c] < min_cost) {
|
|
136
|
+
min_cost = cheapest_cost[c];
|
|
137
|
+
min_slot = cheapest_slot[c];
|
|
138
|
+
min_child = c;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (min_slot == BVH8_ENCODE_SLOT_UNASSIGNED) {
|
|
143
|
+
// no cost can be ranked: the first child still without a slot, into the lowest slot left
|
|
144
|
+
min_child = countTrailingZeros(~placed);
|
|
145
|
+
min_slot = countTrailingZeros(~filled);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
placed |= 1u << min_child;
|
|
149
|
+
filled |= 1u << min_slot;
|
|
150
|
+
|
|
151
|
+
assignment.slots |= min_slot << (min_child * 3u);
|
|
152
|
+
|
|
153
|
+
if ((children.internal & (1u << min_child)) != 0u) {
|
|
154
|
+
assignment.internal |= 1u << min_slot;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// A child's cheapest open slot stays its cheapest until that slot is taken; whoever had that
|
|
158
|
+
// one looks again.
|
|
159
|
+
for (var c = 0u; c < children.count; c++) {
|
|
160
|
+
if ((placed & (1u << c)) == 0u && cheapest_slot[c] == min_slot) {
|
|
161
|
+
let cheapest = bvh8_encode_cheapest_slot(offsets[c], filled);
|
|
162
|
+
|
|
163
|
+
cheapest_cost[c] = cheapest.cost;
|
|
164
|
+
cheapest_slot[c] = cheapest.slot;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return assignment;
|
|
170
|
+
}
|
|
171
|
+
`, [
|
|
172
|
+
F32_MAX_DEFINITION,
|
|
173
|
+
chunk_bvh8_encode_gather,
|
|
174
|
+
]
|
|
175
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Levels a binary tree handed to the GPU's encode may have below its root.
|
|
3
|
+
*
|
|
4
|
+
* A Karras tree splits on a bit of a 30-bit Morton code or, among equal codes, on a bit of a 32-bit
|
|
5
|
+
* leaf index, and every level down splits on a later bit.
|
|
6
|
+
*
|
|
7
|
+
* @type {number}
|
|
8
|
+
*/
|
|
9
|
+
export const BVH8_ENCODE_MAX_BINARY_DEPTH: number;
|
|
10
|
+
/**
|
|
11
|
+
* How many nodes lie above an internal node of a binary tree:
|
|
12
|
+
*
|
|
13
|
+
* ```wgsl
|
|
14
|
+
* fn bvh8_encode_depth(node: u32) -> u32
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* The encode of a binary tree as a BVH8 ({@link bvh8_encode_from_bvh2}) makes a node of the wide
|
|
18
|
+
* tree of every internal node whose depth is a multiple of three.
|
|
19
|
+
*
|
|
20
|
+
* The enclosing shader declares `parents`, an array of `u32` an internal node: its parent,
|
|
21
|
+
* `BVH_NULL_NODE` at the root. The tree is at most {@link BVH8_ENCODE_MAX_BINARY_DEPTH} deep.
|
|
22
|
+
*
|
|
23
|
+
* @type {CodeChunk}
|
|
24
|
+
*/
|
|
25
|
+
export const chunk_bvh8_encode_depth: CodeChunk;
|
|
26
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
27
|
+
//# sourceMappingURL=chunk_bvh8_encode_depth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_bvh8_encode_depth.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_depth.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,2CAFU,MAAM,CAEoC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,sCAFU,SAAS,CAqBjB;0BA9CwB,oCAAoC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BVH_NULL_NODE_DEFINITION } from "../../shader/chunk/bvh/BVH_NULL_NODE_DEFINITION.js";
|
|
2
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Levels a binary tree handed to the GPU's encode may have below its root.
|
|
6
|
+
*
|
|
7
|
+
* A Karras tree splits on a bit of a 30-bit Morton code or, among equal codes, on a bit of a 32-bit
|
|
8
|
+
* leaf index, and every level down splits on a later bit.
|
|
9
|
+
*
|
|
10
|
+
* @type {number}
|
|
11
|
+
*/
|
|
12
|
+
export const BVH8_ENCODE_MAX_BINARY_DEPTH = 30 + 32;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* How many nodes lie above an internal node of a binary tree:
|
|
16
|
+
*
|
|
17
|
+
* ```wgsl
|
|
18
|
+
* fn bvh8_encode_depth(node: u32) -> u32
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* The encode of a binary tree as a BVH8 ({@link bvh8_encode_from_bvh2}) makes a node of the wide
|
|
22
|
+
* tree of every internal node whose depth is a multiple of three.
|
|
23
|
+
*
|
|
24
|
+
* The enclosing shader declares `parents`, an array of `u32` an internal node: its parent,
|
|
25
|
+
* `BVH_NULL_NODE` at the root. The tree is at most {@link BVH8_ENCODE_MAX_BINARY_DEPTH} deep.
|
|
26
|
+
*
|
|
27
|
+
* @type {CodeChunk}
|
|
28
|
+
*/
|
|
29
|
+
export const chunk_bvh8_encode_depth = CodeChunk.from(
|
|
30
|
+
//language=WGSL
|
|
31
|
+
`
|
|
32
|
+
const BVH8_ENCODE_MAX_BINARY_DEPTH = ${BVH8_ENCODE_MAX_BINARY_DEPTH}u;
|
|
33
|
+
|
|
34
|
+
fn bvh8_encode_depth(node: u32) -> u32 {
|
|
35
|
+
var depth = 0u;
|
|
36
|
+
var at = parents[node];
|
|
37
|
+
|
|
38
|
+
while (at != BVH_NULL_NODE && depth < BVH8_ENCODE_MAX_BINARY_DEPTH) {
|
|
39
|
+
depth++;
|
|
40
|
+
at = parents[at];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return depth;
|
|
44
|
+
}
|
|
45
|
+
`, [
|
|
46
|
+
BVH_NULL_NODE_DEFINITION,
|
|
47
|
+
]
|
|
48
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the encode of a binary tree as a BVH8 ({@link bvh8_encode_from_bvh2}) reads of the binary
|
|
3
|
+
* tree, for one of its nodes:
|
|
4
|
+
*
|
|
5
|
+
* ```wgsl
|
|
6
|
+
* fn bvh8_encode_child_1(node: u32) -> u32
|
|
7
|
+
* fn bvh8_encode_child_2(node: u32) -> u32 // on a leaf, its payload
|
|
8
|
+
* fn bvh8_encode_low(node: u32) -> vec3<f32>
|
|
9
|
+
* fn bvh8_encode_high(node: u32) -> vec3<f32>
|
|
10
|
+
* fn bvh8_encode_gather(node: u32, internal_count: u32) -> BVH8EncodeChildren
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* `bvh8_encode_gather` is the children a node of the binary tree has as a node of the wide one:
|
|
14
|
+
* what lies `BVH8_ENCODE_LEVELS` below it and the leaves met sooner, with which of them are
|
|
15
|
+
* nodes of the wide tree themselves.
|
|
16
|
+
*
|
|
17
|
+
* The enclosing shader declares `tree`, `array<u32>`: the binary tree, `[root][nodes]` in
|
|
18
|
+
* the layout of {@link BVH_BUFFER_LAYOUT}, in the order `graph_bvh_build_lbvh` writes one: its
|
|
19
|
+
* `internal_count` internal nodes first, the root node 0. A node is internal by its index, with no
|
|
20
|
+
* word of it read.
|
|
21
|
+
*
|
|
22
|
+
* @type {CodeChunk}
|
|
23
|
+
*/
|
|
24
|
+
export const chunk_bvh8_encode_gather: CodeChunk;
|
|
25
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
26
|
+
//# sourceMappingURL=chunk_bvh8_encode_gather.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_bvh8_encode_gather.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_gather.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,uCAFU,SAAS,CA2FjB;0BArHwB,oCAAoC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
2
|
+
import { BVH_HEADER_WORDS } from "../bvh/BVH_BUFFER_LAYOUT.js";
|
|
3
|
+
import { BVH_NODE_LAYOUT_DEFINITION } from "../bvh/BVH_NODE_LAYOUT_DEFINITION.js";
|
|
4
|
+
import { BVH8_ENCODE_LEVELS } from "./bvh8_encode_from_bvh2.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What the encode of a binary tree as a BVH8 ({@link bvh8_encode_from_bvh2}) reads of the binary
|
|
8
|
+
* tree, for one of its nodes:
|
|
9
|
+
*
|
|
10
|
+
* ```wgsl
|
|
11
|
+
* fn bvh8_encode_child_1(node: u32) -> u32
|
|
12
|
+
* fn bvh8_encode_child_2(node: u32) -> u32 // on a leaf, its payload
|
|
13
|
+
* fn bvh8_encode_low(node: u32) -> vec3<f32>
|
|
14
|
+
* fn bvh8_encode_high(node: u32) -> vec3<f32>
|
|
15
|
+
* fn bvh8_encode_gather(node: u32, internal_count: u32) -> BVH8EncodeChildren
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* `bvh8_encode_gather` is the children a node of the binary tree has as a node of the wide one:
|
|
19
|
+
* what lies `BVH8_ENCODE_LEVELS` below it and the leaves met sooner, with which of them are
|
|
20
|
+
* nodes of the wide tree themselves.
|
|
21
|
+
*
|
|
22
|
+
* The enclosing shader declares `tree`, `array<u32>`: the binary tree, `[root][nodes]` in
|
|
23
|
+
* the layout of {@link BVH_BUFFER_LAYOUT}, in the order `graph_bvh_build_lbvh` writes one: its
|
|
24
|
+
* `internal_count` internal nodes first, the root node 0. A node is internal by its index, with no
|
|
25
|
+
* word of it read.
|
|
26
|
+
*
|
|
27
|
+
* @type {CodeChunk}
|
|
28
|
+
*/
|
|
29
|
+
export const chunk_bvh8_encode_gather = CodeChunk.from(
|
|
30
|
+
//language=WGSL
|
|
31
|
+
`
|
|
32
|
+
const BVH8_ENCODE_LEVELS = ${BVH8_ENCODE_LEVELS}u;
|
|
33
|
+
|
|
34
|
+
// node 0 of the binary tree, in words
|
|
35
|
+
const BVH8_ENCODE_TREE_NODES = ${BVH_HEADER_WORDS}u;
|
|
36
|
+
|
|
37
|
+
struct BVH8EncodeChildren {
|
|
38
|
+
// nodes of the binary tree, child 1 before child 2 all the way down
|
|
39
|
+
nodes: array<u32, 8>,
|
|
40
|
+
count: u32,
|
|
41
|
+
// a bit per entry of 'nodes' that is internal, and so a wide node itself
|
|
42
|
+
internal: u32,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
fn bvh8_encode_child_1(node: u32) -> u32 {
|
|
46
|
+
return tree[BVH8_ENCODE_TREE_NODES + node * BVH_NODE_STRIDE + BVH_NODE_CHILD_1];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// on a leaf, its payload
|
|
50
|
+
fn bvh8_encode_child_2(node: u32) -> u32 {
|
|
51
|
+
return tree[BVH8_ENCODE_TREE_NODES + node * BVH_NODE_STRIDE + BVH_NODE_CHILD_2];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
fn bvh8_encode_low(node: u32) -> vec3<f32> {
|
|
55
|
+
let at = BVH8_ENCODE_TREE_NODES + node * BVH_NODE_STRIDE + BVH_NODE_BOUNDS;
|
|
56
|
+
|
|
57
|
+
return bitcast<vec3<f32>>(vec3<u32>(tree[at], tree[at + 1u], tree[at + 2u]));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
fn bvh8_encode_high(node: u32) -> vec3<f32> {
|
|
61
|
+
let at = BVH8_ENCODE_TREE_NODES + node * BVH_NODE_STRIDE + BVH_NODE_BOUNDS + 3u;
|
|
62
|
+
|
|
63
|
+
return bitcast<vec3<f32>>(vec3<u32>(tree[at], tree[at + 1u], tree[at + 2u]));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// The children of a wide node: what lies BVH8_ENCODE_LEVELS below it in the binary tree, and the
|
|
67
|
+
// leaves met sooner. A node that is a leaf is the whole tree, and its own only child.
|
|
68
|
+
fn bvh8_encode_gather(node: u32, internal_count: u32) -> BVH8EncodeChildren {
|
|
69
|
+
var children: BVH8EncodeChildren;
|
|
70
|
+
|
|
71
|
+
if (node >= internal_count) {
|
|
72
|
+
children.nodes[0] = node;
|
|
73
|
+
children.count = 1u;
|
|
74
|
+
children.internal = 0u;
|
|
75
|
+
|
|
76
|
+
return children;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
children.nodes[0] = bvh8_encode_child_1(node);
|
|
80
|
+
children.nodes[1] = bvh8_encode_child_2(node);
|
|
81
|
+
children.count = 2u;
|
|
82
|
+
|
|
83
|
+
// a level at a time, an internal node gives way to its two children where it stands
|
|
84
|
+
for (var level = 1u; level < BVH8_ENCODE_LEVELS; level++) {
|
|
85
|
+
var next: array<u32, 8>;
|
|
86
|
+
var next_count = 0u;
|
|
87
|
+
|
|
88
|
+
for (var c = 0u; c < children.count; c++) {
|
|
89
|
+
let at = children.nodes[c];
|
|
90
|
+
|
|
91
|
+
if (at >= internal_count) {
|
|
92
|
+
next[next_count] = at;
|
|
93
|
+
next_count++;
|
|
94
|
+
} else {
|
|
95
|
+
next[next_count] = bvh8_encode_child_1(at);
|
|
96
|
+
next[next_count + 1u] = bvh8_encode_child_2(at);
|
|
97
|
+
next_count += 2u;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
children.nodes = next;
|
|
102
|
+
children.count = next_count;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
children.internal = 0u;
|
|
106
|
+
|
|
107
|
+
for (var c = 0u; c < children.count; c++) {
|
|
108
|
+
if (children.nodes[c] < internal_count) {
|
|
109
|
+
children.internal |= 1u << c;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return children;
|
|
114
|
+
}
|
|
115
|
+
`, [
|
|
116
|
+
BVH_NODE_LAYOUT_DEFINITION,
|
|
117
|
+
]
|
|
118
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the encode of a binary tree as a BVH8 ({@link bvh8_encode_from_bvh2}) writes, for one node of
|
|
3
|
+
* the binary tree that becomes a node of the wide one:
|
|
4
|
+
*
|
|
5
|
+
* ```wgsl
|
|
6
|
+
* fn bvh8_encode_write_node(node: u32, internal_count: u32, slots: u32, index: u32, child_base: u32, leaf_base: u32, order_offset: u32)
|
|
7
|
+
* fn bvh8_encode_write_header(leaf_count: u32, order_offset: u32)
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* `bvh8_encode_write_node` writes the twenty words of the node at `index` and the payloads of its
|
|
11
|
+
* leaves, in the run that starts `leaf_base` into the payloads at word `order_offset`. `slots` is
|
|
12
|
+
* the slot each of the node's children was given, three bits a child in the order
|
|
13
|
+
* `bvh8_encode_gather` lists them ({@link chunk_bvh8_encode_assign}).
|
|
14
|
+
*
|
|
15
|
+
* The enclosing shader declares what {@link chunk_bvh8_encode_gather} reads, fitted, and
|
|
16
|
+
* `out`, `array<u32>`: the BVH8, in the layout of {@link BVH8_TREE_BUFFER_LAYOUT}.
|
|
17
|
+
*
|
|
18
|
+
* @type {CodeChunk}
|
|
19
|
+
*/
|
|
20
|
+
export const chunk_bvh8_encode_node: CodeChunk;
|
|
21
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
22
|
+
//# sourceMappingURL=chunk_bvh8_encode_node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_bvh8_encode_node.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_node.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qCAFU,SAAS,CAiHjB;0BA7IwB,oCAAoC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { chunk_bvh8_node_grid } from "../../shader/chunk/bvh/bvh8/webgpu/chunk_bvh8_node_grid.js";
|
|
2
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
3
|
+
import {
|
|
4
|
+
BVH8_TREE_BOUNDS_HIGH_WORD,
|
|
5
|
+
BVH8_TREE_BOUNDS_LOW_WORD,
|
|
6
|
+
BVH8_TREE_HEADER_WORDS,
|
|
7
|
+
BVH8_TREE_LEAF_COUNT_WORD,
|
|
8
|
+
BVH8_TREE_NODE_STRIDE_WORDS,
|
|
9
|
+
BVH8_TREE_ORDER_OFFSET_WORD
|
|
10
|
+
} from "./BVH8_TREE_BUFFER_LAYOUT.js";
|
|
11
|
+
import { chunk_bvh8_encode_gather } from "./chunk_bvh8_encode_gather.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* What the encode of a binary tree as a BVH8 ({@link bvh8_encode_from_bvh2}) writes, for one node of
|
|
15
|
+
* the binary tree that becomes a node of the wide one:
|
|
16
|
+
*
|
|
17
|
+
* ```wgsl
|
|
18
|
+
* fn bvh8_encode_write_node(node: u32, internal_count: u32, slots: u32, index: u32, child_base: u32, leaf_base: u32, order_offset: u32)
|
|
19
|
+
* fn bvh8_encode_write_header(leaf_count: u32, order_offset: u32)
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* `bvh8_encode_write_node` writes the twenty words of the node at `index` and the payloads of its
|
|
23
|
+
* leaves, in the run that starts `leaf_base` into the payloads at word `order_offset`. `slots` is
|
|
24
|
+
* the slot each of the node's children was given, three bits a child in the order
|
|
25
|
+
* `bvh8_encode_gather` lists them ({@link chunk_bvh8_encode_assign}).
|
|
26
|
+
*
|
|
27
|
+
* The enclosing shader declares what {@link chunk_bvh8_encode_gather} reads, fitted, and
|
|
28
|
+
* `out`, `array<u32>`: the BVH8, in the layout of {@link BVH8_TREE_BUFFER_LAYOUT}.
|
|
29
|
+
*
|
|
30
|
+
* @type {CodeChunk}
|
|
31
|
+
*/
|
|
32
|
+
export const chunk_bvh8_encode_node = CodeChunk.from(
|
|
33
|
+
//language=WGSL
|
|
34
|
+
`
|
|
35
|
+
const BVH8_ENCODE_OUT_NODES = ${BVH8_TREE_HEADER_WORDS}u;
|
|
36
|
+
const BVH8_ENCODE_OUT_NODE_STRIDE = ${BVH8_TREE_NODE_STRIDE_WORDS}u;
|
|
37
|
+
|
|
38
|
+
fn bvh8_encode_write_node(node: u32, internal_count: u32, slots: u32, index: u32, child_base: u32, leaf_base: u32, order_offset: u32) {
|
|
39
|
+
let children = bvh8_encode_gather(node, internal_count);
|
|
40
|
+
|
|
41
|
+
let low = bvh8_encode_low(node);
|
|
42
|
+
|
|
43
|
+
let grid = bvh8_node_grid(low, bvh8_encode_high(node));
|
|
44
|
+
|
|
45
|
+
var boxes: array<u32, 12>;
|
|
46
|
+
|
|
47
|
+
// the node of the binary tree in each slot
|
|
48
|
+
var held: array<u32, 8>;
|
|
49
|
+
|
|
50
|
+
var occupied = 0u;
|
|
51
|
+
var internal = 0u;
|
|
52
|
+
|
|
53
|
+
for (var c = 0u; c < children.count; c++) {
|
|
54
|
+
let child = children.nodes[c];
|
|
55
|
+
let slot = (slots >> (c * 3u)) & 7u;
|
|
56
|
+
|
|
57
|
+
occupied |= 1u << slot;
|
|
58
|
+
held[slot] = child;
|
|
59
|
+
|
|
60
|
+
if ((children.internal & (1u << c)) != 0u) {
|
|
61
|
+
internal |= 1u << slot;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let q_low = bvh8_node_grid_low(grid, bvh8_encode_low(child));
|
|
65
|
+
let q_high = bvh8_node_grid_high(grid, bvh8_encode_high(child));
|
|
66
|
+
|
|
67
|
+
let word = slot >> 2u;
|
|
68
|
+
let shift = (slot & 3u) * 8u;
|
|
69
|
+
|
|
70
|
+
// per axis: two words of low bytes, then two of high
|
|
71
|
+
boxes[word] |= q_low.x << shift;
|
|
72
|
+
boxes[2u + word] |= q_high.x << shift;
|
|
73
|
+
boxes[4u + word] |= q_low.y << shift;
|
|
74
|
+
boxes[6u + word] |= q_high.y << shift;
|
|
75
|
+
boxes[8u + word] |= q_low.z << shift;
|
|
76
|
+
boxes[10u + word] |= q_high.z << shift;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var metas = vec2<u32>(0u);
|
|
80
|
+
|
|
81
|
+
// leaves in slot order, a run of one each
|
|
82
|
+
var leaves = 0u;
|
|
83
|
+
|
|
84
|
+
for (var slot = 0u; slot < 8u; slot++) {
|
|
85
|
+
if ((occupied & (1u << slot)) == 0u) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
var slot_meta = 0x20u | (24u + slot);
|
|
90
|
+
|
|
91
|
+
if ((internal & (1u << slot)) == 0u) {
|
|
92
|
+
slot_meta = 0x20u | leaves;
|
|
93
|
+
|
|
94
|
+
// a leaf's second child word is its payload
|
|
95
|
+
out[order_offset + leaf_base + leaves] = bvh8_encode_child_2(held[slot]);
|
|
96
|
+
|
|
97
|
+
leaves++;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
let shift = (slot & 3u) * 8u;
|
|
101
|
+
|
|
102
|
+
if (slot < 4u) {
|
|
103
|
+
metas.x |= slot_meta << shift;
|
|
104
|
+
} else {
|
|
105
|
+
metas.y |= slot_meta << shift;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
let at = BVH8_ENCODE_OUT_NODES + index * BVH8_ENCODE_OUT_NODE_STRIDE;
|
|
110
|
+
|
|
111
|
+
out[at] = bitcast<u32>(low.x);
|
|
112
|
+
out[at + 1u] = bitcast<u32>(low.y);
|
|
113
|
+
out[at + 2u] = bitcast<u32>(low.z);
|
|
114
|
+
out[at + 3u] = grid.exponent.x | (grid.exponent.y << 8u) | (grid.exponent.z << 16u) | (internal << 24u);
|
|
115
|
+
out[at + 4u] = child_base;
|
|
116
|
+
out[at + 5u] = leaf_base;
|
|
117
|
+
out[at + 6u] = metas.x;
|
|
118
|
+
out[at + 7u] = metas.y;
|
|
119
|
+
|
|
120
|
+
for (var i = 0u; i < 12u; i++) {
|
|
121
|
+
out[at + 8u + i] = boxes[i];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// what stands before the nodes: the root's box, the leaves, and where their payloads start
|
|
126
|
+
fn bvh8_encode_write_header(leaf_count: u32, order_offset: u32) {
|
|
127
|
+
let low = bvh8_encode_low(0u);
|
|
128
|
+
let high = bvh8_encode_high(0u);
|
|
129
|
+
|
|
130
|
+
out[${BVH8_TREE_BOUNDS_LOW_WORD}u] = bitcast<u32>(low.x);
|
|
131
|
+
out[${BVH8_TREE_BOUNDS_LOW_WORD + 1}u] = bitcast<u32>(low.y);
|
|
132
|
+
out[${BVH8_TREE_BOUNDS_LOW_WORD + 2}u] = bitcast<u32>(low.z);
|
|
133
|
+
out[${BVH8_TREE_LEAF_COUNT_WORD}u] = leaf_count;
|
|
134
|
+
out[${BVH8_TREE_BOUNDS_HIGH_WORD}u] = bitcast<u32>(high.x);
|
|
135
|
+
out[${BVH8_TREE_BOUNDS_HIGH_WORD + 1}u] = bitcast<u32>(high.y);
|
|
136
|
+
out[${BVH8_TREE_BOUNDS_HIGH_WORD + 2}u] = bitcast<u32>(high.z);
|
|
137
|
+
out[${BVH8_TREE_ORDER_OFFSET_WORD}u] = order_offset;
|
|
138
|
+
}
|
|
139
|
+
`, [
|
|
140
|
+
chunk_bvh8_node_grid,
|
|
141
|
+
chunk_bvh8_encode_gather,
|
|
142
|
+
]
|
|
143
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Counts the encode of a binary tree as a BVH8 keeps of each internal node of the binary tree, laid
|
|
3
|
+
* end to end a kind at a time and summed by one scan: its child nodes, its leaves, and whether it is
|
|
4
|
+
* a node of the wide tree at all.
|
|
5
|
+
*
|
|
6
|
+
* @type {number}
|
|
7
|
+
*/
|
|
8
|
+
export const BVH8_ENCODE_COUNTS_PER_NODE: number;
|
|
9
|
+
/**
|
|
10
|
+
* What the running sums of {@link shader_bvh8_encode_count}'s counts say:
|
|
11
|
+
*
|
|
12
|
+
* ```wgsl
|
|
13
|
+
* fn bvh8_encode_child_nodes(internal_count: u32) -> u32
|
|
14
|
+
* fn bvh8_encode_child_nodes_before(node: u32) -> u32
|
|
15
|
+
* fn bvh8_encode_leaves_before(node: u32, internal_count: u32) -> u32
|
|
16
|
+
* fn bvh8_encode_wide_node(ordinal: u32, internal_count: u32) -> u32
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* `bvh8_encode_child_nodes` is every child node of the wide tree, which is every node of it but the
|
|
20
|
+
* root. The two `before` are what the internal nodes before one hold between them: with the root's
|
|
21
|
+
* one node, where that node's block of child nodes starts, and where its run of payloads does.
|
|
22
|
+
*
|
|
23
|
+
* `bvh8_encode_wide_node` is the internal node that is the `ordinal`th node of the wide tree, counted
|
|
24
|
+
* in the binary tree's order, for an ordinal below the wide tree's node count. A pass that takes a
|
|
25
|
+
* lane per node of the wide tree finds its node by it, and so has no lane without one.
|
|
26
|
+
*
|
|
27
|
+
* `internal_count` is the binary tree's internal nodes; a tree that is one leaf has none, and nothing
|
|
28
|
+
* of the sums is read for it. The enclosing shader declares `sums`,
|
|
29
|
+
* `array<u32>`: what `graph_prefix_scan_csdldf` makes of the counts, each sum including its own
|
|
30
|
+
* element.
|
|
31
|
+
*
|
|
32
|
+
* @type {CodeChunk}
|
|
33
|
+
*/
|
|
34
|
+
export const chunk_bvh8_encode_sums: CodeChunk;
|
|
35
|
+
import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
|
|
36
|
+
//# sourceMappingURL=chunk_bvh8_encode_sums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk_bvh8_encode_sums.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/gpu_primitive/bvh8/chunk_bvh8_encode_sums.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,0CAFU,MAAM,CAE6B;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qCAFU,SAAS,CA6DhB;0BAhGuB,oCAAoC"}
|