@woosh/meep-engine 3.78.3 → 3.79.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 +80 -13
- package/editor/view/node-graph/NodeGraphView.d.ts +1 -1
- package/editor/view/node-graph/NodeGraphView.js +1 -1
- package/package.json +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts +2 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts.map +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.js +2 -1
- package/src/core/math/snap_to_integer.d.ts +13 -0
- package/src/core/math/snap_to_integer.d.ts.map +1 -0
- package/src/core/math/snap_to_integer.js +20 -0
- package/src/core/model/node-graph/NodeGraph.d.ts +0 -1
- package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
- package/src/core/model/node-graph/NodeGraph.js +0 -1
- package/src/engine/asset/GameAssetType.d.ts +2 -0
- package/src/engine/asset/GameAssetType.js +10 -0
- package/src/engine/asset/guessAssetType.d.ts.map +1 -1
- package/src/engine/asset/guessAssetType.js +4 -0
- package/src/engine/asset/load_model_scene_bundle.d.ts +1 -1
- package/src/engine/asset/load_model_scene_bundle.js +2 -2
- package/src/engine/asset/loaders/MTFSceneBundleAssetLoader.d.ts +42 -0
- package/src/engine/asset/loaders/MTFSceneBundleAssetLoader.d.ts.map +1 -0
- package/src/engine/asset/loaders/MTFSceneBundleAssetLoader.js +83 -0
- package/src/engine/asset/loaders/MTFTextureAssetLoader.d.ts +36 -0
- package/src/engine/asset/loaders/MTFTextureAssetLoader.d.ts.map +1 -0
- package/src/engine/asset/loaders/MTFTextureAssetLoader.js +78 -0
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.d.ts +6 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.d.ts.map +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +8 -2
- package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +1 -1
- package/src/engine/graphics/hair/groom_bind_to_mesh.js +1 -1
- package/src/engine/graphics/hair/groom_build_guides.d.ts +1 -1
- package/src/engine/graphics/hair/groom_build_guides.js +1 -1
- package/src/engine/graphics/impostors/voxel/README.md +11 -11
- package/src/engine/physics/cloth/collider/ClothColliderKind.js +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +2 -3
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +2 -3
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts +0 -2
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +0 -5
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.js +5 -3
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js +5 -3
- package/src/generation/grid/coords/grid_to_texel.d.ts +7 -1
- package/src/generation/grid/coords/grid_to_texel.d.ts.map +1 -1
- package/src/generation/grid/coords/grid_to_texel.js +11 -1
- package/src/generation/grid/coords/grid_to_texel_span.d.ts +15 -0
- package/src/generation/grid/coords/grid_to_texel_span.d.ts.map +1 -0
- package/src/generation/grid/coords/grid_to_texel_span.js +38 -0
- package/src/generation/grid/coords/texel_to_grid.d.ts +2 -1
- package/src/generation/grid/coords/texel_to_grid.d.ts.map +1 -1
- package/src/generation/grid/coords/texel_to_grid.js +6 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts +32 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.js +114 -9
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts +8 -0
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +91 -29
- package/src/generation/grid/layers/GridDataLayer.d.ts +21 -2
- package/src/generation/grid/layers/GridDataLayer.d.ts.map +1 -1
- package/src/generation/grid/layers/GridDataLayer.js +43 -4
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts +7 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.js +42 -16
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts +5 -0
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +32 -9
- package/src/generation/rules/CellMatcherLayerBitMaskTest.d.ts.map +1 -1
- package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -2
- package/src/generation/wfc/GridWFCCompiledTileSet.d.ts +4 -2
- package/src/generation/wfc/GridWFCCompiledTileSet.d.ts.map +1 -1
- package/src/generation/wfc/GridWFCCompiledTileSet.js +2 -2
- package/src/generation/wfc/GridWFCTileSet.d.ts +16 -7
- package/src/generation/wfc/GridWFCTileSet.d.ts.map +1 -1
- package/src/generation/wfc/GridWFCTileSet.js +32 -8
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +2 -2
- package/src/shade/playground/particle_editor/README.md +2 -2
- package/src/shade/playground/probe_clipmap/index.html +1 -1
- package/src/shade/playground/screen_probes/README.md +5 -5
- package/src/shade/playground/screen_probes/main.js +1 -1
- package/src/shade/playground/tonemap_sdr/README.md +3 -2
- package/src/shade/playground/vgeo_scene/README.md +1 -3
- package/src/shade/playground/vgeo_scene/main.js +3 -3
- package/src/shade/renderer/Renderer.d.ts +3 -3
- package/src/shade/renderer/Renderer.js +4 -4
- package/src/shade/renderer/ShadeIndirectLightingMode.js +1 -1
- package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
- package/src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.d.ts +33 -0
- package/src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.js +196 -0
- package/src/shade/renderer/animation/SkinSerializationAdapter.d.ts +25 -0
- package/src/shade/renderer/animation/SkinSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/animation/SkinSerializationAdapter.js +85 -0
- package/src/shade/renderer/camera/PerspectiveCamera.js +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts +11 -13
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.js +11 -13
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js +6 -7
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +1 -1
- package/src/shade/renderer/deferred/tonemap/ToneMapper.js +1 -1
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts +6 -8
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.js +7 -10
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF.js +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +1 -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 +1 -2
- package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.js +2 -1
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.js +1 -1
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +4 -4
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +3 -3
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +3 -3
- package/src/shade/renderer/global_illumination/brick4/README.md +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +28 -35
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +28 -35
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +21 -24
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +21 -24
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +8 -8
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +8 -8
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +3 -5
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +3 -5
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +2 -3
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +2 -3
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +13 -17
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +13 -17
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +11 -14
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +11 -14
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +2 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +2 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +9 -9
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +9 -9
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +15 -18
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +16 -19
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +10 -11
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +11 -12
- package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -1
- package/src/shade/renderer/hair/GPUHairSystem.js +16 -7
- package/src/shade/renderer/hair/HAIR.d.ts +5 -3
- package/src/shade/renderer/hair/HAIR.d.ts.map +1 -1
- package/src/shade/renderer/hair/HAIR.js +6 -4
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +9 -8
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -1
- package/src/shade/renderer/hair/chunk_hair_bsdf.js +10 -9
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +5 -6
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -1
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +5 -6
- package/src/shade/renderer/hair/hair_lighting.d.ts +3 -3
- package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -1
- package/src/shade/renderer/hair/hair_lighting.js +4 -5
- package/src/shade/renderer/hair/hair_scattering_lut.d.ts +5 -5
- package/src/shade/renderer/hair/hair_scattering_lut.js +5 -5
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts +10 -10
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts.map +1 -1
- package/src/shade/renderer/hair/hair_shadow_draw.js +21 -17
- package/src/shade/renderer/hair/shader_hair_cull.d.ts.map +1 -1
- package/src/shade/renderer/hair/shader_hair_cull.js +6 -2
- package/src/shade/renderer/hair/shader_hair_roots.d.ts +2 -2
- package/src/shade/renderer/hair/shader_hair_roots.js +2 -2
- package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts +5 -4
- package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts.map +1 -1
- package/src/shade/renderer/hair/shader_hair_shadow_list.js +10 -12
- package/src/shade/renderer/light/environment/DEFINES.d.ts +1 -1
- package/src/shade/renderer/light/environment/DEFINES.js +1 -1
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +2 -2
- package/src/shade/renderer/loader/SceneNodeSerializationAdapter.d.ts +38 -0
- package/src/shade/renderer/loader/SceneNodeSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/loader/SceneNodeSerializationAdapter.js +198 -0
- package/src/shade/renderer/loader/mtf/MTFTexture.d.ts +88 -0
- package/src/shade/renderer/loader/mtf/MTFTexture.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTFTexture.js +159 -0
- package/src/shade/renderer/loader/mtf/MTFTextureSerializationAdapter.d.ts +30 -0
- package/src/shade/renderer/loader/mtf/MTFTextureSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTFTextureSerializationAdapter.js +136 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_MAGIC.d.ts +7 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_MAGIC.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_MAGIC.js +6 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_VERSION.d.ts +8 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_VERSION.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_VERSION.js +7 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_MAGIC.d.ts +7 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_MAGIC.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_MAGIC.js +6 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_VERSION.d.ts +7 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_VERSION.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_VERSION.js +6 -0
- package/src/shade/renderer/loader/mtf/load_mtf.d.ts +41 -0
- package/src/shade/renderer/loader/mtf/load_mtf.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/load_mtf.js +73 -0
- package/src/shade/renderer/loader/mtf/mtf_bundle_textures.d.ts +19 -0
- package/src/shade/renderer/loader/mtf/mtf_bundle_textures.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_bundle_textures.js +57 -0
- package/src/shade/renderer/loader/mtf/mtf_encode_texture.d.ts +9 -0
- package/src/shade/renderer/loader/mtf/mtf_encode_texture.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_encode_texture.js +78 -0
- package/src/shade/renderer/loader/mtf/mtf_export.d.ts +45 -0
- package/src/shade/renderer/loader/mtf/mtf_export.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_export.js +161 -0
- package/src/shade/renderer/loader/mtf/mtf_is_texture.d.ts +9 -0
- package/src/shade/renderer/loader/mtf/mtf_is_texture.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_is_texture.js +12 -0
- package/src/shade/renderer/loader/mtf/mtf_read_collection.d.ts +24 -0
- package/src/shade/renderer/loader/mtf/mtf_read_collection.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_read_collection.js +37 -0
- package/src/shade/renderer/loader/mtf/mtf_read_scene.d.ts +27 -0
- package/src/shade/renderer/loader/mtf/mtf_read_scene.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_read_scene.js +121 -0
- package/src/shade/renderer/loader/mtf/mtf_read_textures.d.ts +18 -0
- package/src/shade/renderer/loader/mtf/mtf_read_textures.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_read_textures.js +51 -0
- package/src/shade/renderer/loader/mtf/mtf_resolve_uri.d.ts +21 -0
- package/src/shade/renderer/loader/mtf/mtf_resolve_uri.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_resolve_uri.js +98 -0
- package/src/shade/renderer/loader/mtf/mtf_serialization_registry.d.ts +25 -0
- package/src/shade/renderer/loader/mtf/mtf_serialization_registry.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_serialization_registry.js +51 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_read.d.ts +20 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_read.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_read.js +80 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_select.d.ts +24 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_select.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_select.js +42 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_write.d.ts +31 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_write.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_write.js +87 -0
- package/src/shade/renderer/loader/mtf/mtf_write.d.ts +36 -0
- package/src/shade/renderer/loader/mtf/mtf_write.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_write.js +161 -0
- package/src/shade/renderer/material/StandardShadeMaterialSerializationAdapter.d.ts +39 -0
- package/src/shade/renderer/material/StandardShadeMaterialSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/material/StandardShadeMaterialSerializationAdapter.js +207 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts +1 -2
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts.map +1 -1
- package/src/shade/renderer/material/dispatch/MaterialDispatch.js +1 -2
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.js +2 -1
- package/src/shade/renderer/material/util/dielectric_specular_color.d.ts +1 -1
- package/src/shade/renderer/material/util/dielectric_specular_color.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_PRESETS.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +3 -4
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +3 -4
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +2 -3
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts +1 -2
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js +1 -2
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +2 -3
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +2 -3
- package/src/shade/renderer/postprocess/taa/filter_blackman_harris.d.ts +1 -1
- package/src/shade/renderer/postprocess/taa/filter_blackman_harris.js +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +1 -1
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +3 -3
- package/src/shade/renderer/restir/di/ReSTIRDI.js +3 -3
- package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.d.ts +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.js +1 -1
- package/src/shade/renderer/scene/optimization/source_to_sampler2d.d.ts.map +1 -1
- package/src/shade/renderer/scene/optimization/source_to_sampler2d.js +3 -1
- package/src/shade/renderer/scene/serialization/STANDARD_MATERIAL_SERIALIZED_BYTE_SIZE.d.ts +5 -5
- package/src/shade/renderer/scene/serialization/STANDARD_MATERIAL_SERIALIZED_BYTE_SIZE.js +5 -5
- package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/deserialize_scene.js +491 -528
- package/src/shade/renderer/scene/serialization/serialize_scene.d.ts +0 -10
- package/src/shade/renderer/scene/serialization/serialize_scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/serialize_scene.js +15 -71
- package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.js +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +1 -2
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts +4 -5
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js +4 -5
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +14 -17
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +18 -21
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +3 -4
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +3 -4
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +3 -3
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +6 -8
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +8 -10
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +5 -7
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +5 -7
- package/src/shade/renderer/texture/format/gpu_texture_format_without_srgb.d.ts +11 -0
- package/src/shade/renderer/texture/format/gpu_texture_format_without_srgb.d.ts.map +1 -0
- package/src/shade/renderer/texture/format/gpu_texture_format_without_srgb.js +14 -0
- package/src/shade/renderer/texture/texture_role_image_quality.d.ts +10 -0
- package/src/shade/renderer/texture/texture_role_image_quality.d.ts.map +1 -0
- package/src/shade/renderer/texture/texture_role_image_quality.js +29 -0
- package/src/shade/renderer/texture/virtual/README.md +257 -257
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +2 -2
|
@@ -138,7 +138,7 @@ export const SCREEN_PROBE_FRAME_RESOURCE = ShaderResourceDescriptor.uniform("scr
|
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* The factor the display multiplies radiance by ahead of its tone curve, as the last frame was shown: what the
|
|
141
|
-
* probes' radiance is pre-exposed by
|
|
141
|
+
* probes' radiance is pre-exposed by.
|
|
142
142
|
* @type {ShaderResourceDescriptor}
|
|
143
143
|
*/
|
|
144
144
|
export const SCREEN_PROBE_EXPOSURE_RESOURCE = ShaderResourceDescriptor.uniform("screen_probe_exposure", F32_CONTAINER_STRUCT);
|
|
@@ -215,7 +215,7 @@ export const SCREEN_PROBE_TRACE_HIT_READ_RESOURCE = ShaderResourceDescriptor.tex
|
|
|
215
215
|
export const SCREEN_PROBE_TRACE_HIT_WRITE_RESOURCE = ShaderResourceDescriptor.storageTexture("screen_probe_trace_hit", "r32uint", "2d", "write-only");
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
* Probe addressing, the probes' records and their rays' words
|
|
218
|
+
* Probe addressing, the probes' records and their rays' words:
|
|
219
219
|
*
|
|
220
220
|
* ```wgsl
|
|
221
221
|
* fn screen_probe_atlas(probe: u32) -> vec2<u32> // the probe's place in the atlas, in probes
|
|
@@ -237,8 +237,8 @@ export const SCREEN_PROBE_TRACE_HIT_WRITE_RESOURCE = ShaderResourceDescriptor.st
|
|
|
237
237
|
* - **The atlas**: probe i at (i mod tile_count.x, i div tile_count.x), the uniform probes on their tiles and the
|
|
238
238
|
* adaptive ones in the rows below, a probe's n² texels at n times its place in every per-ray and per-texel texture.
|
|
239
239
|
* - **The plane weight**: `exp2(−k·(|n·p − d| / depth)²)`, `SCREEN_PROBE_PLANE_WEIGHT_SCALE`, the distance of a point
|
|
240
|
-
* from a receiver's plane over the receiver's depth
|
|
241
|
-
*
|
|
240
|
+
* from a receiver's plane over the receiver's depth, the plane the face normal's rather than the shading normal's, so
|
|
241
|
+
* a normal map does not part probes on one flat surface.
|
|
242
242
|
* - **A ray's info**: the texel at its level's resolution, 2n at level 0 and n at level 1, and the level.
|
|
243
243
|
* - **A ray's direction**: Clarberg's equal-area map at its texel plus the probe's jitter over the level's resolution,
|
|
244
244
|
* so a probe's texels all hold the same solid angle, 4π/n², and a child a quarter of it.
|
|
@@ -360,10 +360,10 @@ chunk_screen_probe.requireResource(SCREEN_PROBE_FRAME_RESOURCE);
|
|
|
360
360
|
* fn screen_probe_ray_jitter(tile: vec2<u32>) -> vec2<f32>
|
|
361
361
|
* ```
|
|
362
362
|
*
|
|
363
|
-
* The spatio-temporal blue noise at the probe's tile and the frame
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
363
|
+
* The spatio-temporal blue noise at the probe's tile and the frame, shared by the tile's probes: neighbouring probes'
|
|
364
|
+
* jitters are spread apart, and a probe's spread over the frames the temporal filter averages. A uniform probe's tile
|
|
365
|
+
* is its place in the atlas; an adaptive probe's, the tile its pixel stands in (`pixel`, its record's), so a probe's
|
|
366
|
+
* noise is keyed by its screen tile. Every pass that places a probe's
|
|
367
367
|
* rays or reads them back by direction takes the tile from here.
|
|
368
368
|
*
|
|
369
369
|
* @type {CodeChunk}
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* - **The density** at a direction: `max(0, Σ brdf·Y(ω))`, the mean of the probe's pixels' clamped cosine lobes there.
|
|
11
11
|
* - **A texel keeps its ray** where any of its directions reaches `SCREEN_PROBE_MIN_PDF`: its density at nine points,
|
|
12
12
|
* its corners, the middles of its edges and its centre, the most of a smooth function over the small patch the
|
|
13
|
-
* texel is.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* texel is. A surface's horizon runs through texel centres wherever the surface faces the equal-area map's pole, ±z,
|
|
14
|
+
* and a lobe's density there is 0.094, under the minimum, though the texel's upper half reaches cosines of 0.4 and
|
|
15
|
+
* more: tested at the centre alone, those texels gave their rays away, taking 7.3% of the surface's irradiance at
|
|
16
|
+
* n = 8 (29% at 4, 2% at 16) and none of a surface facing ±x or ±y. A texel no point of which reaches the
|
|
17
17
|
* minimum lies below the lobes' horizon, where they weigh almost nothing.
|
|
18
18
|
*
|
|
19
19
|
* @type {CodeChunk}
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js
CHANGED
|
@@ -15,10 +15,10 @@ import { SCREEN_PROBE_MIN_PDF } from "./SCREEN_PROBE.js";
|
|
|
15
15
|
* - **The density** at a direction: `max(0, Σ brdf·Y(ω))`, the mean of the probe's pixels' clamped cosine lobes there.
|
|
16
16
|
* - **A texel keeps its ray** where any of its directions reaches `SCREEN_PROBE_MIN_PDF`: its density at nine points,
|
|
17
17
|
* its corners, the middles of its edges and its centre, the most of a smooth function over the small patch the
|
|
18
|
-
* texel is.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* texel is. A surface's horizon runs through texel centres wherever the surface faces the equal-area map's pole, ±z,
|
|
19
|
+
* and a lobe's density there is 0.094, under the minimum, though the texel's upper half reaches cosines of 0.4 and
|
|
20
|
+
* more: tested at the centre alone, those texels gave their rays away, taking 7.3% of the surface's irradiance at
|
|
21
|
+
* n = 8 (29% at 4, 2% at 16) and none of a surface facing ±x or ±y. A texel no point of which reaches the
|
|
22
22
|
* minimum lies below the lobes' horizon, where they weigh almost nothing.
|
|
23
23
|
*
|
|
24
24
|
* @type {CodeChunk}
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Which probes light a point on the screen, and by how much
|
|
2
|
+
* Which probes light a point on the screen, and by how much:
|
|
3
3
|
*
|
|
4
4
|
* ```wgsl
|
|
5
5
|
* struct ScreenProbeSample { probes: vec4<u32>, weights: vec4<f32> }
|
|
@@ -12,10 +12,8 @@
|
|
|
12
12
|
* - **The uniform corners**: the four uniform probes around the pixel, its place less the frame's jitter, by bilinear
|
|
13
13
|
* weights over a tile widened by a pixel each side, `(p − D·tile + 1) / (D + 2)` an axis, so no corner's weight is
|
|
14
14
|
* ever exactly one or zero. The place is held to the grid: past the last row or column of probes a pixel takes the
|
|
15
|
-
* weights of one standing on them, so no weight is extrapolated.
|
|
16
|
-
*
|
|
17
|
-
* multiplied by the corner's plane weight from the point's plane (`screen_probe_plane_weight`); a corner on no
|
|
18
|
-
* surface weighs nothing.
|
|
15
|
+
* weights of one standing on them, so no weight is extrapolated. Each is multiplied by the corner's plane weight
|
|
16
|
+
* from the point's plane (`screen_probe_plane_weight`); a corner on no surface weighs nothing.
|
|
19
17
|
* - **Adaptive probes**: a corner weighing no more than `SCREEN_PROBE_WEIGHT_EPSILON` looks among its tile's adaptive
|
|
20
18
|
* probes for one weighing more: its plane weight times `1 − min(|dx|, |dy|) / D`, the pixels between it and the
|
|
21
19
|
* point. The heaviest takes the corner's place.
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_screen_probe_interpolate.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"chunk_screen_probe_interpolate.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,6CAFU,SAAS,CAgFZ;0BAxHmB,oCAAoC"}
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import { SCREEN_PROBE_WEIGHT_EPSILON } from "./SCREEN_PROBE.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Which probes light a point on the screen, and by how much
|
|
10
|
+
* Which probes light a point on the screen, and by how much:
|
|
11
11
|
*
|
|
12
12
|
* ```wgsl
|
|
13
13
|
* struct ScreenProbeSample { probes: vec4<u32>, weights: vec4<f32> }
|
|
@@ -20,10 +20,8 @@ import { SCREEN_PROBE_WEIGHT_EPSILON } from "./SCREEN_PROBE.js";
|
|
|
20
20
|
* - **The uniform corners**: the four uniform probes around the pixel, its place less the frame's jitter, by bilinear
|
|
21
21
|
* weights over a tile widened by a pixel each side, `(p − D·tile + 1) / (D + 2)` an axis, so no corner's weight is
|
|
22
22
|
* ever exactly one or zero. The place is held to the grid: past the last row or column of probes a pixel takes the
|
|
23
|
-
* weights of one standing on them, so no weight is extrapolated.
|
|
24
|
-
*
|
|
25
|
-
* multiplied by the corner's plane weight from the point's plane (`screen_probe_plane_weight`); a corner on no
|
|
26
|
-
* surface weighs nothing.
|
|
23
|
+
* weights of one standing on them, so no weight is extrapolated. Each is multiplied by the corner's plane weight
|
|
24
|
+
* from the point's plane (`screen_probe_plane_weight`); a corner on no surface weighs nothing.
|
|
27
25
|
* - **Adaptive probes**: a corner weighing no more than `SCREEN_PROBE_WEIGHT_EPSILON` looks among its tile's adaptive
|
|
28
26
|
* probes for one weighing more: its plane weight times `1 − min(|dx|, |dy|) / D`, the pixels between it and the
|
|
29
27
|
* point. The heaviest takes the corner's place.
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Last frame's probes a probe's lighting density takes its history from
|
|
2
|
+
* Last frame's probes a probe's lighting density takes its history from:
|
|
3
3
|
*
|
|
4
4
|
* ```wgsl
|
|
5
5
|
* const SCREEN_PROBE_HISTORY_NONE = 0xFFFFFFFFu;
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
9
|
* Where the probe's surface point stood last frame (`screen_probe_point_before`: the velocity buffer, the surface's
|
|
10
|
-
* own motion with the camera's
|
|
10
|
+
* own motion with the camera's); last frame's four uniform probes around its
|
|
11
11
|
* place then, on last frame's grid and jitter, in the order (0, 0), (1, 0), (0, 1), (1, 1). Each that stood on the
|
|
12
12
|
* plane the surface stood in then, through that point, its plane weight past `SCREEN_PROBE_BRDF_PIXEL_WEIGHT` of the
|
|
13
13
|
* depth then, is its place in last frame's grid; any other, and all four where there is no history or the point was
|
|
14
|
-
* off last frame's screen, is `SCREEN_PROBE_HISTORY_NONE`.
|
|
15
|
-
*
|
|
14
|
+
* off last frame's screen, is `SCREEN_PROBE_HISTORY_NONE`. Weighing them against last frame's plane rather than this
|
|
15
|
+
* frame's keeps the history of a surface moving along its normal.
|
|
16
16
|
*
|
|
17
17
|
* @type {CodeChunk}
|
|
18
18
|
*/
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js
CHANGED
|
@@ -5,7 +5,7 @@ import { chunk_screen_probe_point_before } from "./chunk_screen_probe_surface.js
|
|
|
5
5
|
import { SCREEN_PROBE_BRDF_PIXEL_WEIGHT } from "./SCREEN_PROBE.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Last frame's probes a probe's lighting density takes its history from
|
|
8
|
+
* Last frame's probes a probe's lighting density takes its history from:
|
|
9
9
|
*
|
|
10
10
|
* ```wgsl
|
|
11
11
|
* const SCREEN_PROBE_HISTORY_NONE = 0xFFFFFFFFu;
|
|
@@ -13,12 +13,12 @@ import { SCREEN_PROBE_BRDF_PIXEL_WEIGHT } from "./SCREEN_PROBE.js";
|
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* Where the probe's surface point stood last frame (`screen_probe_point_before`: the velocity buffer, the surface's
|
|
16
|
-
* own motion with the camera's
|
|
16
|
+
* own motion with the camera's); last frame's four uniform probes around its
|
|
17
17
|
* place then, on last frame's grid and jitter, in the order (0, 0), (1, 0), (0, 1), (1, 1). Each that stood on the
|
|
18
18
|
* plane the surface stood in then, through that point, its plane weight past `SCREEN_PROBE_BRDF_PIXEL_WEIGHT` of the
|
|
19
19
|
* depth then, is its place in last frame's grid; any other, and all four where there is no history or the point was
|
|
20
|
-
* off last frame's screen, is `SCREEN_PROBE_HISTORY_NONE`.
|
|
21
|
-
*
|
|
20
|
+
* off last frame's screen, is `SCREEN_PROBE_HISTORY_NONE`. Weighing them against last frame's plane rather than this
|
|
21
|
+
* frame's keeps the history of a surface moving along its normal.
|
|
22
22
|
*
|
|
23
23
|
* @type {CodeChunk}
|
|
24
24
|
*/
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A pixel's rough specular from the screen probes
|
|
2
|
+
* A pixel's rough specular from the screen probes:
|
|
3
3
|
*
|
|
4
4
|
* ```wgsl
|
|
5
5
|
* fn screen_probe_rough_specular_world_share(roughness: f32) -> f32
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* irradiance over π: 1 below `…_SAMPLED_ROUGHNESS − …_SAMPLED_FADE`, 0 from `…_SAMPLED_ROUGHNESS`.
|
|
15
15
|
* - **Radiance at a direction**: the probe's filtered radiance (`screen_probe_radiance`, pre-exposed), bilinear over its
|
|
16
16
|
* octahedron's texels: the equal-area map folds as the octahedral one does, so a tap past an edge reads the texel
|
|
17
|
-
* that edge joins (`texture_octahedral_wrap_texel_coordinates`) and the read has no seam.
|
|
18
|
-
* atlas, bilinear, at a mip; there are no mips here.
|
|
17
|
+
* that edge joins (`texture_octahedral_wrap_texel_coordinates`) and the read has no seam. There are no mips.
|
|
19
18
|
* - **Lobe radiance**: `SCREEN_PROBE_ROUGH_SPECULAR_SAMPLES` reflections drawn from the GGX distribution of visible
|
|
20
19
|
* normals at `alpha` around the shading normal (`sample_reflection_vector`), each by the frame's blue noise at the
|
|
21
20
|
* pixel in its own slice (8, 24, 40 and 56 past the frame), weighed by Smith's G1 of its direction, the BRDF over
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_screen_probe_rough_specular.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js"],"names":[],"mappings":"AAgBA
|
|
1
|
+
{"version":3,"file":"chunk_screen_probe_rough_specular.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,gDAFU,SAAS,CA2DZ;0BA5FmB,oCAAoC"}
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./SCREEN_PROBE.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* A pixel's rough specular from the screen probes
|
|
18
|
+
* A pixel's rough specular from the screen probes:
|
|
19
19
|
*
|
|
20
20
|
* ```wgsl
|
|
21
21
|
* fn screen_probe_rough_specular_world_share(roughness: f32) -> f32
|
|
@@ -30,8 +30,7 @@ import {
|
|
|
30
30
|
* irradiance over π: 1 below `…_SAMPLED_ROUGHNESS − …_SAMPLED_FADE`, 0 from `…_SAMPLED_ROUGHNESS`.
|
|
31
31
|
* - **Radiance at a direction**: the probe's filtered radiance (`screen_probe_radiance`, pre-exposed), bilinear over its
|
|
32
32
|
* octahedron's texels: the equal-area map folds as the octahedral one does, so a tap past an edge reads the texel
|
|
33
|
-
* that edge joins (`texture_octahedral_wrap_texel_coordinates`) and the read has no seam.
|
|
34
|
-
* atlas, bilinear, at a mip; there are no mips here.
|
|
33
|
+
* that edge joins (`texture_octahedral_wrap_texel_coordinates`) and the read has no seam. There are no mips.
|
|
35
34
|
* - **Lobe radiance**: `SCREEN_PROBE_ROUGH_SPECULAR_SAMPLES` reflections drawn from the GGX distribution of visible
|
|
36
35
|
* normals at `alpha` around the shading normal (`sample_reflection_vector`), each by the frame's blue noise at the
|
|
37
36
|
* pixel in its own slice (8, 24, 40 and 56 past the frame), weighed by Smith's G1 of its direction, the BRDF over
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* The march is `ffx_sssr_hierarchical_raymarch` from the full-resolution level, `SCREEN_PROBE_SCREEN_TRACE_STEPS`
|
|
11
11
|
* steps at most. `reached` is where it stopped, `t` its place on the segment held to [0, 1].
|
|
12
12
|
*
|
|
13
|
-
* `hit` is whether it converged, short of the segment's end: went below the full-resolution level's surface
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* `hit` is whether it converged, short of the segment's end: went below the full-resolution level's surface. A march
|
|
14
|
+
* that spent its steps, left the screen or reached the sky stopped where it was, on no surface, though the march's
|
|
15
|
+
* `valid_hit` reports one that did so on the full-resolution level; one converging on its very last step is taken for
|
|
16
|
+
* one that spent them, and left to what traces the ray on.
|
|
17
17
|
*
|
|
18
18
|
* @type {CodeChunk}
|
|
19
19
|
*/
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js
CHANGED
|
@@ -17,10 +17,10 @@ import { SCREEN_PROBE_SCREEN_TRACE_STEPS } from "./SCREEN_PROBE.js";
|
|
|
17
17
|
* The march is `ffx_sssr_hierarchical_raymarch` from the full-resolution level, `SCREEN_PROBE_SCREEN_TRACE_STEPS`
|
|
18
18
|
* steps at most. `reached` is where it stopped, `t` its place on the segment held to [0, 1].
|
|
19
19
|
*
|
|
20
|
-
* `hit` is whether it converged, short of the segment's end: went below the full-resolution level's surface
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* `hit` is whether it converged, short of the segment's end: went below the full-resolution level's surface. A march
|
|
21
|
+
* that spent its steps, left the screen or reached the sky stopped where it was, on no surface, though the march's
|
|
22
|
+
* `valid_hit` reports one that did so on the full-resolution level; one converging on its very last step is taken for
|
|
23
|
+
* one that spent them, and left to what traces the ray on.
|
|
24
24
|
*
|
|
25
25
|
* @type {CodeChunk}
|
|
26
26
|
*/
|
|
@@ -27,8 +27,7 @@ export const SCREEN_PROBE_VELOCITY_RESOURCE: ShaderResourceDescriptor;
|
|
|
27
27
|
*/
|
|
28
28
|
export const chunk_screen_probe_point_before: CodeChunk;
|
|
29
29
|
/**
|
|
30
|
-
* How fast a pixel's surface point moves of itself, apart from the camera
|
|
31
|
-
* length):
|
|
30
|
+
* How fast a pixel's surface point moves of itself, apart from the camera:
|
|
32
31
|
*
|
|
33
32
|
* ```wgsl
|
|
34
33
|
* fn screen_probe_object_speed(pixel: vec2<u32>, position: vec3<f32>, depth: f32) -> f32 // metres a frame
|
|
@@ -43,8 +42,7 @@ export const chunk_screen_probe_point_before: CodeChunk;
|
|
|
43
42
|
*/
|
|
44
43
|
export const chunk_screen_probe_object_speed: CodeChunk;
|
|
45
44
|
/**
|
|
46
|
-
* The record of a probe standing on a pixel of the G-buffer
|
|
47
|
-
* `WriteDownsampledProbeMaterial`):
|
|
45
|
+
* The record of a probe standing on a pixel of the G-buffer:
|
|
48
46
|
*
|
|
49
47
|
* ```wgsl
|
|
50
48
|
* fn screen_probe_surface_at(pixel: vec2<u32>) -> ScreenProbe
|
package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk_screen_probe_surface.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js"],"names":[],"mappings":"AAeA,qEAAqE;AACrE,2CADyC,wBAAwB,CAC6C;AAE9G,qEAAqE;AACrE,oDADyC,wBAAwB,CAC+D;AAEhI,oEAAoE;AACpE,0CADwC,wBAAwB,CACsB;AAEtF,gGAAgG;AAChG,wCADoE,wBAAwB,CACV;AAElF,uKAAuK;AACvK,6CAD2I,wBAAwB,CACvE;AAE5F;;;;;;;;;;;;;;;;GAgBG;AACH,8CAFU,SAAS,CA8BZ;AAKP
|
|
1
|
+
{"version":3,"file":"chunk_screen_probe_surface.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js"],"names":[],"mappings":"AAeA,qEAAqE;AACrE,2CADyC,wBAAwB,CAC6C;AAE9G,qEAAqE;AACrE,oDADyC,wBAAwB,CAC+D;AAEhI,oEAAoE;AACpE,0CADwC,wBAAwB,CACsB;AAEtF,gGAAgG;AAChG,wCADoE,wBAAwB,CACV;AAElF,uKAAuK;AACvK,6CAD2I,wBAAwB,CACvE;AAE5F;;;;;;;;;;;;;;;;GAgBG;AACH,8CAFU,SAAS,CA8BZ;AAKP;;;;;;;;;;;;;GAaG;AACH,8CAFU,SAAS,CAUZ;AAEP;;;;;;;;;;;;GAYG;AACH,yCAFU,SAAS,CAkCZ;yCAzIkC,mDAAmD;0BADlE,oCAAoC"}
|
|
@@ -79,8 +79,7 @@ chunk_screen_probe_point_before.requireResource(SCREEN_PROBE_VELOCITY_RESOURCE);
|
|
|
79
79
|
chunk_screen_probe_point_before.requireResource(SCREEN_PROBE_CAMERA_PREVIOUS_RESOURCE);
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* How fast a pixel's surface point moves of itself, apart from the camera
|
|
83
|
-
* length):
|
|
82
|
+
* How fast a pixel's surface point moves of itself, apart from the camera:
|
|
84
83
|
*
|
|
85
84
|
* ```wgsl
|
|
86
85
|
* fn screen_probe_object_speed(pixel: vec2<u32>, position: vec3<f32>, depth: f32) -> f32 // metres a frame
|
|
@@ -104,8 +103,7 @@ fn screen_probe_object_speed(pixel: vec2<u32>, position: vec3<f32>, depth: f32)
|
|
|
104
103
|
]);
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
|
-
* The record of a probe standing on a pixel of the G-buffer
|
|
108
|
-
* `WriteDownsampledProbeMaterial`):
|
|
106
|
+
* The record of a probe standing on a pixel of the G-buffer:
|
|
109
107
|
*
|
|
110
108
|
* ```wgsl
|
|
111
109
|
* fn screen_probe_surface_at(pixel: vec2<u32>) -> ScreenProbe
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The bricks' trace of the rays the screen left
|
|
3
|
-
* through its command.
|
|
2
|
+
* The bricks' trace of the rays the screen left: a thread a ray of their list, through its command.
|
|
4
3
|
*
|
|
5
4
|
* - From the probe's origin (`ScreenProbePick#origin`) to the probe's reach (`brick_clipmap_trace`), starting a
|
|
6
5
|
* voxel short of where the screen showed the ray clear. The screen's ray left the surface point, so that distance
|
|
7
|
-
* moves by the origin's offset along this ray
|
|
8
|
-
* distance, the most their biases move the start along the ray.
|
|
6
|
+
* moves by the origin's offset along this ray.
|
|
9
7
|
* - **A front-face hit** takes E_dir from the directional lights, shadowed by rays through the bricks
|
|
10
8
|
* (`probe_clipmap_sun_irradiance`), each light's point of its disk drawn from the ray's id and direction.
|
|
11
9
|
* - **A back face** is a hit whose field's gradient runs along the ray: the ray started inside a solid.
|
package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_screen_probe_brick.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js"],"names":[],"mappings":"AAkGA
|
|
1
|
+
{"version":3,"file":"shader_screen_probe_brick.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js"],"names":[],"mappings":"AAkGA;;;;;;;;;;;;;;GAcG;AACH,8CAFU,aAAa,CA+DpB;AAYH;;;;;;;;;;;;;GAaG;AACH,8CAFU,aAAa,CAiEpB;AAUH;;;;;;GAMG;AACH,8CAFU,aAAa,CA0DpB;AA4BH;;;;;;;;;;;;;GAaG;AACH,+CAFU,aAAa,CAwEpB;AAWH;;;;;;;GAOG;AACH,6CAFU,aAAa,CA2CpB;8BAne2B,+BAA+B"}
|
|
@@ -97,13 +97,11 @@ trace_resources.addGroup(rays_group().add(SCREEN_PROBES_READ_RESOURCE).add(LIGHT
|
|
|
97
97
|
trace_resources.addGroup(brick_group());
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* The bricks' trace of the rays the screen left
|
|
101
|
-
* through its command.
|
|
100
|
+
* The bricks' trace of the rays the screen left: a thread a ray of their list, through its command.
|
|
102
101
|
*
|
|
103
102
|
* - From the probe's origin (`ScreenProbePick#origin`) to the probe's reach (`brick_clipmap_trace`), starting a
|
|
104
103
|
* voxel short of where the screen showed the ray clear. The screen's ray left the surface point, so that distance
|
|
105
|
-
* moves by the origin's offset along this ray
|
|
106
|
-
* distance, the most their biases move the start along the ray.
|
|
104
|
+
* moves by the origin's offset along this ray.
|
|
107
105
|
* - **A front-face hit** takes E_dir from the directional lights, shadowed by rays through the bricks
|
|
108
106
|
* (`probe_clipmap_sun_irradiance`), each light's point of its disk drawn from the ray's id and direction.
|
|
109
107
|
* - **A back face** is a hit whose field's gradient runs along the ray: the ray started inside a solid.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A probe's radiance from its rays
|
|
3
|
-
* over its n² rays, then over its n² texels.
|
|
2
|
+
* A probe's radiance from its rays: a workgroup a probe, its lanes over its n² rays, then over its n² texels.
|
|
4
3
|
*
|
|
5
4
|
* - **A ray's weight** is its texel's share of the probe's texel, (n / its level's resolution)²: one, or a quarter
|
|
6
5
|
* for a child of a split texel, which holds a quarter of the solid angle (the map is equal-area).
|
|
@@ -17,10 +16,10 @@
|
|
|
17
16
|
* (`shader_screen_probe_integrate`).
|
|
18
17
|
* - **Accumulated** in workgroup memory, fixed point with the scale that keeps n² of the largest radiance in a word;
|
|
19
18
|
* each texel keeps the nearest hit among the rays that landed, and whether any did.
|
|
20
|
-
* - **The texels**: the sum, not normalised
|
|
21
|
-
*
|
|
22
|
-
* - **The probe's moving share**: the moving rays' weight over n²,
|
|
23
|
-
*
|
|
19
|
+
* - **The texels**: the sum, not normalised: a texel takes about one ray's weight on average; the nearest hit in
|
|
20
|
+
* alpha, negative where none landed.
|
|
21
|
+
* - **The probe's moving share**: the moving rays' weight over n², which its thresholds are set against (the filter's
|
|
22
|
+
* 1%, the fast update's 10%). With importance sampling the rays' weights sum to less than n², so a share
|
|
24
23
|
* of their sum would pass those thresholds at less motion.
|
|
25
24
|
* - Rays that ended unresolved, or of no ray, bring nothing; a probe on no surface is zero.
|
|
26
25
|
*
|
|
@@ -28,9 +27,8 @@
|
|
|
28
27
|
*/
|
|
29
28
|
export const shader_screen_probe_composite: ComputeShader;
|
|
30
29
|
/**
|
|
31
|
-
* One pass of the filter between probes
|
|
32
|
-
*
|
|
33
|
-
* changes.
|
|
30
|
+
* One pass of the filter between probes: a thread a texel of the frame's probes, through the thread-a-ray command; its
|
|
31
|
+
* result in alpha keeps the texel's own nearest hit, which no pass changes.
|
|
34
32
|
*
|
|
35
33
|
* - **The texel itself** weighs one where a ray landed in it, and nothing where none did.
|
|
36
34
|
* - **Its neighbours**: the uniform probes of the four tiles beside its probe's, the same texel of each; with the
|
|
@@ -40,22 +38,20 @@ export const shader_screen_probe_composite: ComputeShader;
|
|
|
40
38
|
* rays saw something moving, an angle weight: where the neighbour's ray in the texel hit, at the nearer of its own
|
|
41
39
|
* and the probe's nearest hits, seen from the probe, against the texel's direction, `1 − angle / θ`. θ is the half
|
|
42
40
|
* angle of the cone with a texel's solid angle, acos(1 − 2/n²), 14.4° at n = 8: a neighbour's light is the
|
|
43
|
-
* texel's when what it saw lies inside the texel's cone from here.
|
|
44
|
-
* solid angle at n = 8.
|
|
41
|
+
* texel's when what it saw lies inside the texel's cone from here.
|
|
45
42
|
* - A neighbour on no surface, or whose texel no ray landed in, gives nothing. The mean of what is given; zero where
|
|
46
43
|
* nothing is.
|
|
47
44
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
45
|
+
* The plane weight is interpolation's, not a difference of depths: on it a neighbour further along a slanted surface is
|
|
46
|
+
* still the same surface.
|
|
50
47
|
*
|
|
51
48
|
* @type {ComputeShader}
|
|
52
49
|
*/
|
|
53
50
|
export const shader_screen_probe_filter: ComputeShader;
|
|
54
51
|
/**
|
|
55
|
-
* A probe's radiance as SH3
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* each texel's centre; a texel no ray landed in adds nothing. Stored as the probe clipmap's records store theirs
|
|
52
|
+
* A probe's radiance as SH3: a workgroup a probe, its lanes over its texels. The radiance is pre-exposed, and so is
|
|
53
|
+
* the SH. Each texel holds 4π/n² of the sphere, so the projection is `Σ L(ωᵢ)·Y(ωᵢ)·4π/n²` over the texels, at each
|
|
54
|
+
* texel's centre; a texel no ray landed in adds nothing. Stored as the probe clipmap's records store theirs
|
|
59
55
|
* (`probe_record_sh_encode`), seven words a probe; readers resolve E with `sh3_color_get_irradiance_at`.
|
|
60
56
|
*
|
|
61
57
|
* @type {ComputeShader}
|
package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_screen_probe_gather.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js"],"names":[],"mappings":"AAmDA
|
|
1
|
+
{"version":3,"file":"shader_screen_probe_gather.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,4CAFU,aAAa,CAqIpB;AAaH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,yCAFU,aAAa,CAgIpB;AAWH;;;;;;;GAOG;AACH,6CAFU,aAAa,CA0FpB;8BApd2B,+BAA+B"}
|
|
@@ -50,8 +50,7 @@ composite_resources.createGroup()
|
|
|
50
50
|
.add(SCREEN_PROBE_RADIANCE_WRITE_RESOURCE);
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* A probe's radiance from its rays
|
|
54
|
-
* over its n² rays, then over its n² texels.
|
|
53
|
+
* A probe's radiance from its rays: a workgroup a probe, its lanes over its n² rays, then over its n² texels.
|
|
55
54
|
*
|
|
56
55
|
* - **A ray's weight** is its texel's share of the probe's texel, (n / its level's resolution)²: one, or a quarter
|
|
57
56
|
* for a child of a split texel, which holds a quarter of the solid angle (the map is equal-area).
|
|
@@ -68,10 +67,10 @@ composite_resources.createGroup()
|
|
|
68
67
|
* (`shader_screen_probe_integrate`).
|
|
69
68
|
* - **Accumulated** in workgroup memory, fixed point with the scale that keeps n² of the largest radiance in a word;
|
|
70
69
|
* each texel keeps the nearest hit among the rays that landed, and whether any did.
|
|
71
|
-
* - **The texels**: the sum, not normalised
|
|
72
|
-
*
|
|
73
|
-
* - **The probe's moving share**: the moving rays' weight over n²,
|
|
74
|
-
*
|
|
70
|
+
* - **The texels**: the sum, not normalised: a texel takes about one ray's weight on average; the nearest hit in
|
|
71
|
+
* alpha, negative where none landed.
|
|
72
|
+
* - **The probe's moving share**: the moving rays' weight over n², which its thresholds are set against (the filter's
|
|
73
|
+
* 1%, the fast update's 10%). With importance sampling the rays' weights sum to less than n², so a share
|
|
75
74
|
* of their sum would pass those thresholds at less motion.
|
|
76
75
|
* - Rays that ended unresolved, or of no ray, bring nothing; a probe on no surface is zero.
|
|
77
76
|
*
|
|
@@ -222,9 +221,8 @@ filter_resources.createGroup()
|
|
|
222
221
|
.add(SCREEN_PROBE_RADIANCE_WRITE_RESOURCE);
|
|
223
222
|
|
|
224
223
|
/**
|
|
225
|
-
* One pass of the filter between probes
|
|
226
|
-
*
|
|
227
|
-
* changes.
|
|
224
|
+
* One pass of the filter between probes: a thread a texel of the frame's probes, through the thread-a-ray command; its
|
|
225
|
+
* result in alpha keeps the texel's own nearest hit, which no pass changes.
|
|
228
226
|
*
|
|
229
227
|
* - **The texel itself** weighs one where a ray landed in it, and nothing where none did.
|
|
230
228
|
* - **Its neighbours**: the uniform probes of the four tiles beside its probe's, the same texel of each; with the
|
|
@@ -234,13 +232,12 @@ filter_resources.createGroup()
|
|
|
234
232
|
* rays saw something moving, an angle weight: where the neighbour's ray in the texel hit, at the nearer of its own
|
|
235
233
|
* and the probe's nearest hits, seen from the probe, against the texel's direction, `1 − angle / θ`. θ is the half
|
|
236
234
|
* angle of the cone with a texel's solid angle, acos(1 − 2/n²), 14.4° at n = 8: a neighbour's light is the
|
|
237
|
-
* texel's when what it saw lies inside the texel's cone from here.
|
|
238
|
-
* solid angle at n = 8.
|
|
235
|
+
* texel's when what it saw lies inside the texel's cone from here.
|
|
239
236
|
* - A neighbour on no surface, or whose texel no ray landed in, gives nothing. The mean of what is given; zero where
|
|
240
237
|
* nothing is.
|
|
241
238
|
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
239
|
+
* The plane weight is interpolation's, not a difference of depths: on it a neighbour further along a slanted surface is
|
|
240
|
+
* still the same surface.
|
|
244
241
|
*
|
|
245
242
|
* @type {ComputeShader}
|
|
246
243
|
*/
|
|
@@ -382,10 +379,9 @@ irradiance_resources.createGroup()
|
|
|
382
379
|
.add(SCREEN_PROBE_RADIANCE_READ_RESOURCE);
|
|
383
380
|
|
|
384
381
|
/**
|
|
385
|
-
* A probe's radiance as SH3
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* each texel's centre; a texel no ray landed in adds nothing. Stored as the probe clipmap's records store theirs
|
|
382
|
+
* A probe's radiance as SH3: a workgroup a probe, its lanes over its texels. The radiance is pre-exposed, and so is
|
|
383
|
+
* the SH. Each texel holds 4π/n² of the sphere, so the projection is `Σ L(ωᵢ)·Y(ωᵢ)·4π/n²` over the texels, at each
|
|
384
|
+
* texel's centre; a texel no ray landed in adds nothing. Stored as the probe clipmap's records store theirs
|
|
389
385
|
* (`probe_record_sh_encode`), seven words a probe; readers resolve E with `sh3_color_get_irradiance_at`.
|
|
390
386
|
*
|
|
391
387
|
* @type {ComputeShader}
|
package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts
CHANGED
|
@@ -11,29 +11,26 @@ export const SCREEN_PROBE_RADIANCE_HISTORY_RESOURCE: ShaderResourceDescriptor;
|
|
|
11
11
|
/** The G-buffer's shading normals. @type {ShaderResourceDescriptor} */
|
|
12
12
|
export const SCREEN_PROBE_NORMAL_RESOURCE: ShaderResourceDescriptor;
|
|
13
13
|
/**
|
|
14
|
-
* A probe's BRDF density
|
|
15
|
-
*
|
|
16
|
-
* lane takes the probe's own pixel.
|
|
14
|
+
* A probe's BRDF density: a workgroup a probe, a lane a pixel of an 8 × 8 grid over the square of 2D pixels about it,
|
|
15
|
+
* the pixels whose light interpolates from it. The centre lane takes the probe's own pixel.
|
|
17
16
|
*
|
|
18
17
|
* A pixel counts where it stands on the probe's surface: the probe's plane weight from the pixel's plane is past
|
|
19
18
|
* `SCREEN_PROBE_BRDF_PIXEL_WEIGHT` (the centre always counts). It adds its clamped cosine lobe about its shading normal
|
|
20
|
-
* as SH3 (`sh3_cosine_convolved_basis_at
|
|
21
|
-
* the
|
|
19
|
+
* as SH3 (`sh3_cosine_convolved_basis_at`), and the probe's density is the mean of the lobes: at a direction, how much
|
|
20
|
+
* the pixels' diffuse would weigh light from it.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
24
|
-
* pixels that read the probe are.
|
|
22
|
+
* The grid's cells are centred on the probe, as the pixels that read the probe are.
|
|
25
23
|
*
|
|
26
24
|
* @type {ComputeShader}
|
|
27
25
|
*/
|
|
28
26
|
export const shader_screen_probe_brdf_pdf: ComputeShader;
|
|
29
27
|
/**
|
|
30
|
-
* A probe's lighting density
|
|
31
|
-
* its lanes over its n² texels.
|
|
28
|
+
* A probe's lighting density: a workgroup a probe, its lanes over its n² texels.
|
|
32
29
|
*
|
|
33
30
|
* - **History**: last frame's four uniform probes around the probe's surface point that stood on its surface
|
|
34
31
|
* (`screen_probe_lighting_history`), each giving its filtered radiance in the same texel, since a texel is a
|
|
35
32
|
* direction in the world. They are averaged, pre-exposed as last frame's exposure left them and brought to this
|
|
36
|
-
* frame's (`screen_probe_exposure` over `screen_probe_exposure_previous`)
|
|
33
|
+
* frame's (`screen_probe_exposure` over `screen_probe_exposure_previous`).
|
|
37
34
|
* - **The rest**: the share of the four that gave nothing, 1 − accepted / 4, is the world-space probes' radiance the
|
|
38
35
|
* probe's pick reads (`screen_probe_picks`), along the texel's direction at this frame's jitter, pre-exposed by this
|
|
39
36
|
* frame's exposure. Where nothing was picked, the history alone, or one where there is none: a density that ranks
|
|
@@ -44,19 +41,19 @@ export const shader_screen_probe_brdf_pdf: ComputeShader;
|
|
|
44
41
|
*/
|
|
45
42
|
export const shader_screen_probe_lighting_pdf: ComputeShader;
|
|
46
43
|
/**
|
|
47
|
-
* A probe's rays
|
|
48
|
-
*
|
|
44
|
+
* A probe's rays: a workgroup a probe, its lanes over its n² rays, each written as the texel and level it falls in
|
|
45
|
+
* (`screen_probe_ray_info_pack`), a ray's slot its place in the sorted order.
|
|
49
46
|
*
|
|
50
47
|
* 1. **Density**: each texel's BRDF density at its centre, `max(0, Σ brdf·Y(ω))`; times its lighting density · n².
|
|
51
48
|
* A texel any of whose directions the BRDF density reaches `SCREEN_PROBE_MIN_PDF` is held there
|
|
52
49
|
* (`screen_probe_brdf_keeps`), so the light ranks texels and only the pixels' lobes cull one; another falls under
|
|
53
50
|
* it unless its light lifts it.
|
|
54
51
|
* 2. **Sort**: the probe's own rays, ascending by density, ties in index order (`screen_probe_ray_sort`: the engine's
|
|
55
|
-
* bitonic network in the workgroup's memory, O(n² log² n) a probe, where
|
|
52
|
+
* bitonic network in the workgroup's memory, O(n² log² n) a probe, where ranking every ray against every other is
|
|
56
53
|
* O(n⁴)).
|
|
57
54
|
* 3. **Reassignment**: the sorted rays in threes from the lowest; a three whose highest is under the minimum gives
|
|
58
55
|
* its rays to the highest texel not yet given, from the top: that texel splits into its four children at twice the
|
|
59
|
-
* resolution, the three take three children and the texel the fourth. One level only
|
|
56
|
+
* resolution, the three take three children and the texel the fourth. One level only.
|
|
60
57
|
* A child holds a quarter of its parent's solid angle (the map is equal-area), which the composite weighs it by.
|
|
61
58
|
*
|
|
62
59
|
* With importance sampling off, or where the probe stands on no surface, ray i is texel i at the probe's own n.
|
package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shader_screen_probe_importance.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js"],"names":[],"mappings":"AAgDA,4HAA4H;AAC5H,8CADgG,wBAAwB,CACM;AAC9H,uCAAuC;AACvC,+CADW,wBAAwB,CACkG;AAErI,8HAA8H;AAC9H,sDADkG,wBAAwB,CACiB;AAC3I,uCAAuC;AACvC,uDADW,wBAAwB,CAC0H;AAE7J,4GAA4G;AAC5G,qDADgF,wBAAwB,CACsC;AAE9I,uEAAuE;AACvE,2CAD2C,wBAAwB,CAC6B;AAchG
|
|
1
|
+
{"version":3,"file":"shader_screen_probe_importance.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js"],"names":[],"mappings":"AAgDA,4HAA4H;AAC5H,8CADgG,wBAAwB,CACM;AAC9H,uCAAuC;AACvC,+CADW,wBAAwB,CACkG;AAErI,8HAA8H;AAC9H,sDADkG,wBAAwB,CACiB;AAC3I,uCAAuC;AACvC,uDADW,wBAAwB,CAC0H;AAE7J,4GAA4G;AAC5G,qDADgF,wBAAwB,CACsC;AAE9I,uEAAuE;AACvE,2CAD2C,wBAAwB,CAC6B;AAchG;;;;;;;;;;;;GAYG;AACH,2CAFU,aAAa,CA6EpB;AAoBH;;;;;;;;;;;;;;GAcG;AACH,+CAFU,aAAa,CAiHpB;AAYH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,gDAFU,aAAa,CAiHpB;yCA1bsC,mDAAmD;8BAD9D,+BAA+B"}
|