@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
|
@@ -710,8 +710,8 @@ export class Renderer {
|
|
|
710
710
|
/**
|
|
711
711
|
* Which depth-of-field implementation runs when {@link feature_dof_enabled}
|
|
712
712
|
* is on. `"raymarch"` (default) is the screen-space ray-march
|
|
713
|
-
* ({@link DepthOfField}); `"unreal"` is the gather-based
|
|
714
|
-
*
|
|
713
|
+
* ({@link DepthOfField}); `"unreal"` is the gather-based diaphragm /
|
|
714
|
+
* cinematic DoF ({@link DepthOfFieldU}) — half-res near/far gather with a
|
|
715
715
|
* foreground coverage bleed. Mutually exclusive by construction (only one
|
|
716
716
|
* runs at the single DoF call site).
|
|
717
717
|
* @type {"raymarch"|"unreal"}
|
|
@@ -719,7 +719,7 @@ export class Renderer {
|
|
|
719
719
|
dof_algorithm = "raymarch";
|
|
720
720
|
|
|
721
721
|
/**
|
|
722
|
-
*
|
|
722
|
+
* Gather-based (diaphragm / cinematic) depth of field — a drop-in
|
|
723
723
|
* alternative to {@link #depth_of_field}, selected via {@link dof_algorithm}.
|
|
724
724
|
* Constructed in init.
|
|
725
725
|
* @type {DepthOfFieldU}
|
|
@@ -727,7 +727,7 @@ export class Renderer {
|
|
|
727
727
|
#depth_of_field_unreal;
|
|
728
728
|
|
|
729
729
|
/**
|
|
730
|
-
* The
|
|
730
|
+
* The gather-based depth-of-field subsystem. Configure it via
|
|
731
731
|
* `renderer.dof_unreal.*` and select it with `renderer.dof_algorithm = "unreal"`.
|
|
732
732
|
* @returns {DepthOfFieldU}
|
|
733
733
|
*/
|
|
@@ -16,7 +16,7 @@ export const ShadeIndirectLightingMode = {
|
|
|
16
16
|
*/
|
|
17
17
|
ProbeClipmap: 3,
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* A screen-space probe gather over the {@link ProbeClipmap}'s world: probes placed on the G-buffer every few
|
|
20
20
|
* pixels, more densely where interpolation between them would cross an edge, traced through the screen and
|
|
21
21
|
* then the SDF bricks, the world-space probes standing in for what lies past a probe's own reach, and
|
|
22
22
|
* reprojected from frame to frame (`global_illumination/screen_probe/GPUScreenProbeGI.js`). The opaque surfaces'
|
|
@@ -55,7 +55,7 @@ export class GPUAcousticLattice {
|
|
|
55
55
|
* @param {number} gz
|
|
56
56
|
* @returns {number} the point's storage index: storage wraps, as the clipmaps' does
|
|
57
57
|
*/
|
|
58
|
-
static "__#
|
|
58
|
+
static "__#612@#storage"(c: number, gx: number, gy: number, gz: number): number;
|
|
59
59
|
/**
|
|
60
60
|
* @param {GPUAcoustics} acoustics whose receivers the points are
|
|
61
61
|
* @param {number} radius metres: the default source's, which the points stand for
|
|
@@ -49,7 +49,7 @@ export class GPUAcousticProbes {
|
|
|
49
49
|
* @param {*} resources
|
|
50
50
|
* @param {{encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
|
|
51
51
|
*/
|
|
52
|
-
static "__#
|
|
52
|
+
static "__#396@#execute"(pass: object, resources: any, context: {
|
|
53
53
|
encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
|
|
54
54
|
}): void;
|
|
55
55
|
/**
|
|
@@ -39,7 +39,7 @@ export class GPUAcoustics {
|
|
|
39
39
|
* @param {*} resources
|
|
40
40
|
* @param {{encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext}} context
|
|
41
41
|
*/
|
|
42
|
-
static "__#
|
|
42
|
+
static "__#611@#execute"(pass: object, resources: any, context: {
|
|
43
43
|
encoder: import("../../device/ShadeGPUCommandContext.js").ShadeGPUCommandContext;
|
|
44
44
|
}): void;
|
|
45
45
|
/**
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A {@link ShadeAnimationClip} on disk, as a loader's bundle holds it: a channel's target is a place in the
|
|
3
|
+
* bundle's nodes.
|
|
4
|
+
*
|
|
5
|
+
* <pre>
|
|
6
|
+
* UTF8 name
|
|
7
|
+
* UintVar curve count
|
|
8
|
+
* curves each as {@link serialize_animation_curve} writes one: a key count, then time, value, in tangent
|
|
9
|
+
* and out tangent of every key as float32s
|
|
10
|
+
* UintVar channel count
|
|
11
|
+
* channels each: u32 target, u8 property ({@link Node3DProperty}), then u32 x 4 for x, y, z and w: a curve's
|
|
12
|
+
* place in this clip's curves, or 0xFFFFFFFF for a component that is not animated
|
|
13
|
+
* </pre>
|
|
14
|
+
*
|
|
15
|
+
* A curve is in the record once however many components it drives, and a clip read back shares exactly the
|
|
16
|
+
* curves the clip written did: a uniform scale is one curve under three axes, and the animation manager uploads a
|
|
17
|
+
* curve once by which object it is.
|
|
18
|
+
*
|
|
19
|
+
* @extends BinaryClassSerializationAdapter<ShadeAnimationClip>
|
|
20
|
+
*
|
|
21
|
+
* @author Alex Goldring
|
|
22
|
+
* @copyright Company Named Limited (c) 2026
|
|
23
|
+
*/
|
|
24
|
+
export class ShadeAnimationClipSerializationAdapter extends BinaryClassSerializationAdapter<ShadeAnimationClip> {
|
|
25
|
+
constructor();
|
|
26
|
+
klass: typeof ShadeAnimationClip;
|
|
27
|
+
#private;
|
|
28
|
+
}
|
|
29
|
+
export type BinaryBuffer = import("../../../core/binary/BinaryBuffer.js").BinaryBuffer;
|
|
30
|
+
export type AnimationCurve = import("../../../engine/animation/curve/AnimationCurve.js").AnimationCurve;
|
|
31
|
+
import { ShadeAnimationClip } from "./ShadeAnimationClip.js";
|
|
32
|
+
import { BinaryClassSerializationAdapter } from "../../../engine/ecs/storage/binary/BinaryClassSerializationAdapter.js";
|
|
33
|
+
//# sourceMappingURL=ShadeAnimationClipSerializationAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShadeAnimationClipSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;IACI,iCAA2B;;CAsG9B;2BA1LY,OAAO,sCAAsC,EAAE,YAAY;6BAC3D,OAAO,mDAAmD,EAAE,cAAc;mCAJpD,yBAAyB;gDAFZ,uEAAuE"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deserialize_animation_curve,
|
|
3
|
+
serialize_animation_curve
|
|
4
|
+
} from "../../../engine/animation/curve/animation_curve_binary_codec.js";
|
|
5
|
+
import { BinaryClassSerializationAdapter } from "../../../engine/ecs/storage/binary/BinaryClassSerializationAdapter.js";
|
|
6
|
+
import { ShadeAnimationChannel } from "./ShadeAnimationChannel.js";
|
|
7
|
+
import { ShadeAnimationClip } from "./ShadeAnimationClip.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {import("../../../core/binary/BinaryBuffer.js").BinaryBuffer} BinaryBuffer
|
|
11
|
+
* @typedef {import("../../../engine/animation/curve/AnimationCurve.js").AnimationCurve} AnimationCurve
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Written in place of a curve's index, for a component that is not animated.
|
|
16
|
+
*
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
const NO_CURVE = 0xFFFFFFFF;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Give a curve a place in the clip's table the first time it is met.
|
|
23
|
+
*
|
|
24
|
+
* @param {Map<AnimationCurve, number>} indices
|
|
25
|
+
* @param {AnimationCurve[]} table
|
|
26
|
+
* @param {AnimationCurve|undefined} curve
|
|
27
|
+
*/
|
|
28
|
+
function collect_curve(indices, table, curve) {
|
|
29
|
+
if (curve === undefined || curve === null || indices.has(curve)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
indices.set(curve, table.length);
|
|
34
|
+
table.push(curve);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @param {BinaryBuffer} buffer
|
|
39
|
+
* @param {Map<AnimationCurve, number>} indices
|
|
40
|
+
* @param {AnimationCurve|undefined} curve
|
|
41
|
+
*/
|
|
42
|
+
function write_curve_index(buffer, indices, curve) {
|
|
43
|
+
if (curve === undefined || curve === null) {
|
|
44
|
+
buffer.writeUint32(NO_CURVE);
|
|
45
|
+
} else {
|
|
46
|
+
buffer.writeUint32(indices.get(curve));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param {BinaryBuffer} buffer
|
|
52
|
+
* @param {AnimationCurve[]} table
|
|
53
|
+
* @param {string} clip_name named if the index is outside the table
|
|
54
|
+
* @returns {AnimationCurve|undefined}
|
|
55
|
+
*/
|
|
56
|
+
function read_curve_index(buffer, table, clip_name) {
|
|
57
|
+
const index = buffer.readUint32();
|
|
58
|
+
|
|
59
|
+
if (index === NO_CURVE) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (index >= table.length) {
|
|
64
|
+
throw new Error(`clip '${clip_name}' names curve ${index}, and it holds ${table.length}`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return table[index];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A {@link ShadeAnimationClip} on disk, as a loader's bundle holds it: a channel's target is a place in the
|
|
72
|
+
* bundle's nodes.
|
|
73
|
+
*
|
|
74
|
+
* <pre>
|
|
75
|
+
* UTF8 name
|
|
76
|
+
* UintVar curve count
|
|
77
|
+
* curves each as {@link serialize_animation_curve} writes one: a key count, then time, value, in tangent
|
|
78
|
+
* and out tangent of every key as float32s
|
|
79
|
+
* UintVar channel count
|
|
80
|
+
* channels each: u32 target, u8 property ({@link Node3DProperty}), then u32 x 4 for x, y, z and w: a curve's
|
|
81
|
+
* place in this clip's curves, or 0xFFFFFFFF for a component that is not animated
|
|
82
|
+
* </pre>
|
|
83
|
+
*
|
|
84
|
+
* A curve is in the record once however many components it drives, and a clip read back shares exactly the
|
|
85
|
+
* curves the clip written did: a uniform scale is one curve under three axes, and the animation manager uploads a
|
|
86
|
+
* curve once by which object it is.
|
|
87
|
+
*
|
|
88
|
+
* @extends BinaryClassSerializationAdapter<ShadeAnimationClip>
|
|
89
|
+
*
|
|
90
|
+
* @author Alex Goldring
|
|
91
|
+
* @copyright Company Named Limited (c) 2026
|
|
92
|
+
*/
|
|
93
|
+
export class ShadeAnimationClipSerializationAdapter extends BinaryClassSerializationAdapter {
|
|
94
|
+
klass = ShadeAnimationClip;
|
|
95
|
+
version = 0;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Where each curve of the clip being written is in its table. Held between calls so writing a clip allocates
|
|
99
|
+
* no map.
|
|
100
|
+
*
|
|
101
|
+
* @type {Map<AnimationCurve, number>}
|
|
102
|
+
*/
|
|
103
|
+
#indices = new Map();
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @param {BinaryBuffer} buffer
|
|
107
|
+
* @param {ShadeAnimationClip} value
|
|
108
|
+
*/
|
|
109
|
+
serialize(buffer, value) {
|
|
110
|
+
const channels = value.channels;
|
|
111
|
+
const channel_count = channels.length;
|
|
112
|
+
|
|
113
|
+
const indices = this.#indices;
|
|
114
|
+
|
|
115
|
+
// a clip that could not be written leaves its curves here, and they are not this clip's
|
|
116
|
+
indices.clear();
|
|
117
|
+
|
|
118
|
+
/** @type {AnimationCurve[]} */
|
|
119
|
+
const table = [];
|
|
120
|
+
|
|
121
|
+
for (let i = 0; i < channel_count; i++) {
|
|
122
|
+
const curves = channels[i].curves;
|
|
123
|
+
|
|
124
|
+
collect_curve(indices, table, curves.x);
|
|
125
|
+
collect_curve(indices, table, curves.y);
|
|
126
|
+
collect_curve(indices, table, curves.z);
|
|
127
|
+
collect_curve(indices, table, curves.w);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
buffer.writeUTF8String(value.name);
|
|
131
|
+
|
|
132
|
+
buffer.writeUintVar(table.length);
|
|
133
|
+
|
|
134
|
+
for (let i = 0; i < table.length; i++) {
|
|
135
|
+
serialize_animation_curve(buffer, table[i]);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
buffer.writeUintVar(channel_count);
|
|
139
|
+
|
|
140
|
+
for (let i = 0; i < channel_count; i++) {
|
|
141
|
+
const channel = channels[i];
|
|
142
|
+
const curves = channel.curves;
|
|
143
|
+
|
|
144
|
+
buffer.writeUint32(channel.target);
|
|
145
|
+
buffer.writeUint8(channel.property);
|
|
146
|
+
|
|
147
|
+
write_curve_index(buffer, indices, curves.x);
|
|
148
|
+
write_curve_index(buffer, indices, curves.y);
|
|
149
|
+
write_curve_index(buffer, indices, curves.z);
|
|
150
|
+
write_curve_index(buffer, indices, curves.w);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
indices.clear();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @param {BinaryBuffer} buffer
|
|
158
|
+
* @param {ShadeAnimationClip} value
|
|
159
|
+
*/
|
|
160
|
+
deserialize(buffer, value) {
|
|
161
|
+
const name = buffer.readUTF8String();
|
|
162
|
+
|
|
163
|
+
const curve_count = buffer.readUintVar();
|
|
164
|
+
|
|
165
|
+
/** @type {AnimationCurve[]} */
|
|
166
|
+
const table = new Array(curve_count);
|
|
167
|
+
|
|
168
|
+
for (let i = 0; i < curve_count; i++) {
|
|
169
|
+
table[i] = deserialize_animation_curve(buffer);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const channel_count = buffer.readUintVar();
|
|
173
|
+
|
|
174
|
+
/** @type {ShadeAnimationChannel[]} */
|
|
175
|
+
const channels = new Array(channel_count);
|
|
176
|
+
|
|
177
|
+
for (let i = 0; i < channel_count; i++) {
|
|
178
|
+
const channel = new ShadeAnimationChannel();
|
|
179
|
+
|
|
180
|
+
channel.target = buffer.readUint32();
|
|
181
|
+
channel.property = buffer.readUint8();
|
|
182
|
+
|
|
183
|
+
const curves = channel.curves;
|
|
184
|
+
|
|
185
|
+
curves.x = read_curve_index(buffer, table, name);
|
|
186
|
+
curves.y = read_curve_index(buffer, table, name);
|
|
187
|
+
curves.z = read_curve_index(buffer, table, name);
|
|
188
|
+
curves.w = read_curve_index(buffer, table, name);
|
|
189
|
+
|
|
190
|
+
channels[i] = channel;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
value.name = name;
|
|
194
|
+
value.channels = channels;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A {@link Skin} on disk, as a loader's bundle holds it: joints and meshes are places in the bundle's nodes.
|
|
3
|
+
*
|
|
4
|
+
* <pre>
|
|
5
|
+
* UTF8 name
|
|
6
|
+
* UintVar joint count
|
|
7
|
+
* u32 x count joints, in the order per-vertex joint indices mean
|
|
8
|
+
* f32 x 16 each inverse_bind_matrices, column-major, one a joint
|
|
9
|
+
* UintVar mesh count
|
|
10
|
+
* u32 x count meshes, the nodes this skin deforms
|
|
11
|
+
* </pre>
|
|
12
|
+
*
|
|
13
|
+
* @extends BinaryClassSerializationAdapter<Skin>
|
|
14
|
+
*
|
|
15
|
+
* @author Alex Goldring
|
|
16
|
+
* @copyright Company Named Limited (c) 2026
|
|
17
|
+
*/
|
|
18
|
+
export class SkinSerializationAdapter extends BinaryClassSerializationAdapter<Skin> {
|
|
19
|
+
constructor();
|
|
20
|
+
klass: typeof Skin;
|
|
21
|
+
}
|
|
22
|
+
export type BinaryBuffer = import("../../../core/binary/BinaryBuffer.js").BinaryBuffer;
|
|
23
|
+
import { Skin } from "./Skin.js";
|
|
24
|
+
import { BinaryClassSerializationAdapter } from "../../../engine/ecs/storage/binary/BinaryClassSerializationAdapter.js";
|
|
25
|
+
//# sourceMappingURL=SkinSerializationAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkinSerializationAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/animation/SkinSerializationAdapter.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;GAgBG;AACH;;IACI,mBAAa;CA4ChB;2BAhFY,OAAO,sCAAsC,EAAE,YAAY;qBAHnD,WAAW;gDADgB,uEAAuE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { BinaryClassSerializationAdapter } from "../../../engine/ecs/storage/binary/BinaryClassSerializationAdapter.js";
|
|
2
|
+
import { Skin } from "./Skin.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import("../../../core/binary/BinaryBuffer.js").BinaryBuffer} BinaryBuffer
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @param {BinaryBuffer} buffer
|
|
10
|
+
* @returns {number[]} a count, then as many indices
|
|
11
|
+
*/
|
|
12
|
+
function read_indices(buffer) {
|
|
13
|
+
const count = buffer.readUintVar();
|
|
14
|
+
const result = new Array(count);
|
|
15
|
+
|
|
16
|
+
for (let i = 0; i < count; i++) {
|
|
17
|
+
result[i] = buffer.readUint32();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A {@link Skin} on disk, as a loader's bundle holds it: joints and meshes are places in the bundle's nodes.
|
|
25
|
+
*
|
|
26
|
+
* <pre>
|
|
27
|
+
* UTF8 name
|
|
28
|
+
* UintVar joint count
|
|
29
|
+
* u32 x count joints, in the order per-vertex joint indices mean
|
|
30
|
+
* f32 x 16 each inverse_bind_matrices, column-major, one a joint
|
|
31
|
+
* UintVar mesh count
|
|
32
|
+
* u32 x count meshes, the nodes this skin deforms
|
|
33
|
+
* </pre>
|
|
34
|
+
*
|
|
35
|
+
* @extends BinaryClassSerializationAdapter<Skin>
|
|
36
|
+
*
|
|
37
|
+
* @author Alex Goldring
|
|
38
|
+
* @copyright Company Named Limited (c) 2026
|
|
39
|
+
*/
|
|
40
|
+
export class SkinSerializationAdapter extends BinaryClassSerializationAdapter {
|
|
41
|
+
klass = Skin;
|
|
42
|
+
version = 0;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param {BinaryBuffer} buffer
|
|
46
|
+
* @param {Skin} value
|
|
47
|
+
*/
|
|
48
|
+
serialize(buffer, value) {
|
|
49
|
+
const joints = value.joints;
|
|
50
|
+
const joint_count = joints.length;
|
|
51
|
+
const meshes = value.meshes;
|
|
52
|
+
|
|
53
|
+
if (value.inverse_bind_matrices.length !== joint_count * 16) {
|
|
54
|
+
// not an assert: a record written with the wrong count of matrices reads as garbage from there on
|
|
55
|
+
throw new Error(`skin '${value.name}' has ${joint_count} joints and ${value.inverse_bind_matrices.length} inverse bind matrix elements, where ${joint_count * 16} are due`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
buffer.writeUTF8String(value.name);
|
|
59
|
+
|
|
60
|
+
buffer.writeUintVar(joint_count);
|
|
61
|
+
buffer.writeUint32Array(joints, 0, joint_count);
|
|
62
|
+
buffer.writeFloat32Array(value.inverse_bind_matrices, 0, joint_count * 16);
|
|
63
|
+
|
|
64
|
+
buffer.writeUintVar(meshes.length);
|
|
65
|
+
buffer.writeUint32Array(meshes, 0, meshes.length);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @param {BinaryBuffer} buffer
|
|
70
|
+
* @param {Skin} value
|
|
71
|
+
*/
|
|
72
|
+
deserialize(buffer, value) {
|
|
73
|
+
value.name = buffer.readUTF8String();
|
|
74
|
+
|
|
75
|
+
const joints = read_indices(buffer);
|
|
76
|
+
|
|
77
|
+
const inverse_bind_matrices = new Float32Array(joints.length * 16);
|
|
78
|
+
|
|
79
|
+
buffer.readFloat32Array(inverse_bind_matrices, 0, inverse_bind_matrices.length);
|
|
80
|
+
|
|
81
|
+
value.joints = joints;
|
|
82
|
+
value.inverse_bind_matrices = inverse_bind_matrices;
|
|
83
|
+
value.meshes = read_indices(buffer);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -4,7 +4,7 @@ import { RAD_TO_DEG } from "../../../core/math/RAD_TO_DEG.js";
|
|
|
4
4
|
import { Camera } from "./Camera.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* We are using reverse-z projection to get better accuracy distribution. This is standard circa 2025,
|
|
7
|
+
* We are using reverse-z projection to get better accuracy distribution. This is standard circa 2025, Frostbite and others use this.
|
|
8
8
|
* We also use infinite far projection. This is less well documented, primary source is "Depth Precision Visualized" 2015, by Nathan Reed.
|
|
9
9
|
*
|
|
10
10
|
* Primary goals of what we're doing:
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* - `white_balance_c0..c2`: the white-balance matrix on linear Rec.709, by column.
|
|
6
6
|
* - per zone, `{zone}_saturation`, `_contrast`, `_gamma`, `_gain`, `_offset`: the zone's values with the global ones
|
|
7
|
-
* folded in and each vector's fourth component applied to the first three
|
|
8
|
-
* them.
|
|
7
|
+
* folded in (multiplied, or added for the offset) and each vector's fourth component applied to the first three.
|
|
9
8
|
* - `zone_bounds`: `shadows_max`, `highlights_min`, `highlights_max`.
|
|
10
9
|
* - `curve_counts`: the keys of the hue, saturation and lightness curves. They follow the uniform in `grade_keys`, in
|
|
11
10
|
* that order.
|
|
@@ -26,7 +25,7 @@ export const COLOR_GRADE_HEADER_FLOATS: number;
|
|
|
26
25
|
*/
|
|
27
26
|
export const COLOR_GRADE_KEY_FLOATS: number;
|
|
28
27
|
/**
|
|
29
|
-
* One zone of
|
|
28
|
+
* One zone of the primary grade: shadows, midtones, highlights, or all of them. Each vector is RGB and a master
|
|
30
29
|
* value that scales (or, for the offset, adds to) all three.
|
|
31
30
|
*/
|
|
32
31
|
export class ColorGradeZone {
|
|
@@ -64,11 +63,10 @@ export class ColorGradeZone {
|
|
|
64
63
|
* A colour grade on the exposed scene colour, ahead of the tone-mapping operator, baked into the tone mapper's LUTs.
|
|
65
64
|
* Neutral as constructed. In order:
|
|
66
65
|
*
|
|
67
|
-
* 1. **White balance**,
|
|
68
|
-
* 2. **Primaries**,
|
|
66
|
+
* 1. **White balance**, a temperature and tint white balance on linear Rec.709; see `m3_white_balance_rec709`.
|
|
67
|
+
* 2. **Primaries**, in AP1: saturation, contrast, gamma, gain and offset for {@link global},
|
|
69
68
|
* {@link shadows}, {@link midtones} and {@link highlights}, the zones blended by AP1 luma between
|
|
70
|
-
* {@link shadows_max}, {@link highlights_min} and {@link highlights_max}.
|
|
71
|
-
* settings give the same result.
|
|
69
|
+
* {@link shadows_max}, {@link highlights_min} and {@link highlights_max}.
|
|
72
70
|
* 3. **Gain against luma**, in AP1 after the primaries: each channel multiplied by its gain at the colour's AP1 luma's
|
|
73
71
|
* stops from middle grey — {@link luma_gain_red}, {@link luma_gain_green}, {@link luma_gain_blue} — and every channel
|
|
74
72
|
* by 2 to the power of {@link luma_exposure} there. Grading by tonal range at any luma, with any blend between ranges:
|
|
@@ -77,8 +75,8 @@ export class ColorGradeZone {
|
|
|
77
75
|
* zero.
|
|
78
76
|
* 4. **Saturation against luma**, after the gain against luma: each channel drawn away from the colour's AP1 luma by its
|
|
79
77
|
* factor at that luma's stops from middle grey, `log2(luma / 0.18)`: {@link luma_saturation} times the channel's
|
|
80
|
-
* own curve — {@link luma_saturation_red}, {@link luma_saturation_green}, {@link luma_saturation_blue}.
|
|
81
|
-
* saturation and per-channel saturation, varying across the tonal range. Each curve is evaluated as
|
|
78
|
+
* own curve — {@link luma_saturation_red}, {@link luma_saturation_green}, {@link luma_saturation_blue}. The
|
|
79
|
+
* saturation and per-channel saturation of the primaries, varying across the tonal range. Each curve is evaluated as
|
|
82
80
|
* {@link AnimationCurve#evaluate} would and holds its end keys' values beyond them; a curve with no keys is a factor
|
|
83
81
|
* of 1, and a colour with no luma is left as it is. Clamped at zero, as the primaries' saturation is. The colour is clamped at zero in Rec.709 after it, as the operator takes it.
|
|
84
82
|
* 5. **Hue curves**, in OkLCh. Each curve's time is the colour's OkLCh hue in degrees, 0 to 360, and is evaluated as
|
|
@@ -100,7 +98,7 @@ export class ColorGrade {
|
|
|
100
98
|
*/
|
|
101
99
|
white_temperature: number;
|
|
102
100
|
/**
|
|
103
|
-
* Offset of that white along its isotherm,
|
|
101
|
+
* Offset of that white along its isotherm, in units of 0.05 in CIE 1960 uv. 0 does nothing.
|
|
104
102
|
* @type {number}
|
|
105
103
|
*/
|
|
106
104
|
white_tint: number;
|
|
@@ -126,17 +124,17 @@ export class ColorGrade {
|
|
|
126
124
|
*/
|
|
127
125
|
readonly highlights: ColorGradeZone;
|
|
128
126
|
/**
|
|
129
|
-
* AP1 luma at which the shadows' weight reaches 0.
|
|
127
|
+
* AP1 luma at which the shadows' weight reaches 0.
|
|
130
128
|
* @type {number}
|
|
131
129
|
*/
|
|
132
130
|
shadows_max: number;
|
|
133
131
|
/**
|
|
134
|
-
* AP1 luma at which the highlights' weight starts to rise from 0.
|
|
132
|
+
* AP1 luma at which the highlights' weight starts to rise from 0.
|
|
135
133
|
* @type {number}
|
|
136
134
|
*/
|
|
137
135
|
highlights_min: number;
|
|
138
136
|
/**
|
|
139
|
-
* AP1 luma at which the highlights' weight reaches 1.
|
|
137
|
+
* AP1 luma at which the highlights' weight reaches 1.
|
|
140
138
|
* @type {number}
|
|
141
139
|
*/
|
|
142
140
|
highlights_max: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorGrade.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/deferred/tonemap/ColorGrade.js"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"ColorGrade.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/deferred/tonemap/ColorGrade.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,8CA2BG;AAEH;;;GAGG;AACH,wCAFU,MAAM,CAE4B;AAE5C;;;GAGG;AACH,qCAFU,MAAM,CAEsD;AAEtE;;;GAGG;AACH;IACI;;;;OAIG;IACH,qBAFU,OAAO,CAEoB;IAErC;;;;OAIG;IACH,mBAFU,OAAO,CAEkB;IAEnC;;;;OAIG;IACH,gBAFU,OAAO,CAEe;IAEhC;;;OAGG;IACH,eAFU,OAAO,CAEc;IAE/B;;;;OAIG;IACH,iBAFU,OAAO,CAEgB;CACpC;AAgDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IACI;;;OAGG;IACH,mBAFU,MAAM,CAEsC;IAEtD;;;OAGG;IACH,YAFU,MAAM,CAEwB;IAExC;;;;OAIG;IACH,iBAFU,cAAc,CAEM;IAE9B;;;OAGG;IACH,kBAFU,cAAc,CAEO;IAE/B;;;OAGG;IACH,mBAFU,cAAc,CAEQ;IAEhC;;;OAGG;IACH,qBAFU,cAAc,CAEU;IAElC;;;OAGG;IACH,aAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,gBAFU,MAAM,CAEK;IAErB;;;OAGG;IACH,gBAFU,MAAM,CAEG;IAEnB;;;;OAIG;IACH,oBAFU,cAAc,CAES;IAEjC;;;;OAIG;IACH,yBAFU,cAAc,CAEc;IAEtC;;;;OAIG;IACH,wBAFU,cAAc,CAEa;IAErC;;;;;OAKG;IACH,0BAFU,cAAc,CAEe;IAEvC;;;;;OAKG;IACH,8BAFU,cAAc,CAEmB;IAE3C;;;;;OAKG;IACH,gCAFU,cAAc,CAEqB;IAE7C;;;;;OAKG;IACH,+BAFU,cAAc,CAEoB;IAE5C;;;;OAIG;IACH,wBAFU,cAAc,CAEa;IAErC;;;;OAIG;IACH,0BAFU,cAAc,CAEe;IAEvC;;;;OAIG;IACH,yBAFU,cAAc,CAEc;IAEtC;;;;OAIG;IACH,wBAFU,cAAc,CAEa;IAarC;;;;;;;OAOG;IACH,QAFa,YAAY,CAgFxB;;CACJ;6BA5Z4B,mCAAmC;wBAJxC,kCAAkC;+BAC3B,sDAAsD"}
|
|
@@ -12,8 +12,7 @@ import { m3_white_balance_rec709, WHITE_BALANCE_NEUTRAL_TEMPERATURE, WHITE_BALAN
|
|
|
12
12
|
*
|
|
13
13
|
* - `white_balance_c0..c2`: the white-balance matrix on linear Rec.709, by column.
|
|
14
14
|
* - per zone, `{zone}_saturation`, `_contrast`, `_gamma`, `_gain`, `_offset`: the zone's values with the global ones
|
|
15
|
-
* folded in and each vector's fourth component applied to the first three
|
|
16
|
-
* them.
|
|
15
|
+
* folded in (multiplied, or added for the offset) and each vector's fourth component applied to the first three.
|
|
17
16
|
* - `zone_bounds`: `shadows_max`, `highlights_min`, `highlights_max`.
|
|
18
17
|
* - `curve_counts`: the keys of the hue, saturation and lightness curves. They follow the uniform in `grade_keys`, in
|
|
19
18
|
* that order.
|
|
@@ -64,7 +63,7 @@ export const COLOR_GRADE_HEADER_FLOATS = 88;
|
|
|
64
63
|
export const COLOR_GRADE_KEY_FLOATS = ANIMATION_CURVE_KEYFRAME_FLOATS;
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
* One zone of
|
|
66
|
+
* One zone of the primary grade: shadows, midtones, highlights, or all of them. Each vector is RGB and a master
|
|
68
67
|
* value that scales (or, for the offset, adds to) all three.
|
|
69
68
|
*/
|
|
70
69
|
export class ColorGradeZone {
|
|
@@ -153,11 +152,10 @@ function write_zone(out, at, zone, global) {
|
|
|
153
152
|
* A colour grade on the exposed scene colour, ahead of the tone-mapping operator, baked into the tone mapper's LUTs.
|
|
154
153
|
* Neutral as constructed. In order:
|
|
155
154
|
*
|
|
156
|
-
* 1. **White balance**,
|
|
157
|
-
* 2. **Primaries**,
|
|
155
|
+
* 1. **White balance**, a temperature and tint white balance on linear Rec.709; see `m3_white_balance_rec709`.
|
|
156
|
+
* 2. **Primaries**, in AP1: saturation, contrast, gamma, gain and offset for {@link global},
|
|
158
157
|
* {@link shadows}, {@link midtones} and {@link highlights}, the zones blended by AP1 luma between
|
|
159
|
-
* {@link shadows_max}, {@link highlights_min} and {@link highlights_max}.
|
|
160
|
-
* settings give the same result.
|
|
158
|
+
* {@link shadows_max}, {@link highlights_min} and {@link highlights_max}.
|
|
161
159
|
* 3. **Gain against luma**, in AP1 after the primaries: each channel multiplied by its gain at the colour's AP1 luma's
|
|
162
160
|
* stops from middle grey — {@link luma_gain_red}, {@link luma_gain_green}, {@link luma_gain_blue} — and every channel
|
|
163
161
|
* by 2 to the power of {@link luma_exposure} there. Grading by tonal range at any luma, with any blend between ranges:
|
|
@@ -166,8 +164,8 @@ function write_zone(out, at, zone, global) {
|
|
|
166
164
|
* zero.
|
|
167
165
|
* 4. **Saturation against luma**, after the gain against luma: each channel drawn away from the colour's AP1 luma by its
|
|
168
166
|
* factor at that luma's stops from middle grey, `log2(luma / 0.18)`: {@link luma_saturation} times the channel's
|
|
169
|
-
* own curve — {@link luma_saturation_red}, {@link luma_saturation_green}, {@link luma_saturation_blue}.
|
|
170
|
-
* saturation and per-channel saturation, varying across the tonal range. Each curve is evaluated as
|
|
167
|
+
* own curve — {@link luma_saturation_red}, {@link luma_saturation_green}, {@link luma_saturation_blue}. The
|
|
168
|
+
* saturation and per-channel saturation of the primaries, varying across the tonal range. Each curve is evaluated as
|
|
171
169
|
* {@link AnimationCurve#evaluate} would and holds its end keys' values beyond them; a curve with no keys is a factor
|
|
172
170
|
* of 1, and a colour with no luma is left as it is. Clamped at zero, as the primaries' saturation is. The colour is clamped at zero in Rec.709 after it, as the operator takes it.
|
|
173
171
|
* 5. **Hue curves**, in OkLCh. Each curve's time is the colour's OkLCh hue in degrees, 0 to 360, and is evaluated as
|
|
@@ -190,7 +188,7 @@ export class ColorGrade {
|
|
|
190
188
|
white_temperature = WHITE_BALANCE_NEUTRAL_TEMPERATURE;
|
|
191
189
|
|
|
192
190
|
/**
|
|
193
|
-
* Offset of that white along its isotherm,
|
|
191
|
+
* Offset of that white along its isotherm, in units of 0.05 in CIE 1960 uv. 0 does nothing.
|
|
194
192
|
* @type {number}
|
|
195
193
|
*/
|
|
196
194
|
white_tint = WHITE_BALANCE_NEUTRAL_TINT;
|
|
@@ -221,19 +219,19 @@ export class ColorGrade {
|
|
|
221
219
|
highlights = new ColorGradeZone();
|
|
222
220
|
|
|
223
221
|
/**
|
|
224
|
-
* AP1 luma at which the shadows' weight reaches 0.
|
|
222
|
+
* AP1 luma at which the shadows' weight reaches 0.
|
|
225
223
|
* @type {number}
|
|
226
224
|
*/
|
|
227
225
|
shadows_max = 0.09;
|
|
228
226
|
|
|
229
227
|
/**
|
|
230
|
-
* AP1 luma at which the highlights' weight starts to rise from 0.
|
|
228
|
+
* AP1 luma at which the highlights' weight starts to rise from 0.
|
|
231
229
|
* @type {number}
|
|
232
230
|
*/
|
|
233
231
|
highlights_min = 0.5;
|
|
234
232
|
|
|
235
233
|
/**
|
|
236
|
-
* AP1 luma at which the highlights' weight reaches 1.
|
|
234
|
+
* AP1 luma at which the highlights' weight reaches 1.
|
|
237
235
|
* @type {number}
|
|
238
236
|
*/
|
|
239
237
|
highlights_max = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TONE_MAP_OPERATOR_ACES.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,iDAAgF;
|
|
1
|
+
{"version":3,"file":"TONE_MAP_OPERATOR_ACES.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,iDAAgF;AAqFhF;;GAEG;AACH,qCAFU,eAAe,CAEuC;6BApGnC,uCAAuC;gCAKpC,sBAAsB"}
|
|
@@ -26,7 +26,7 @@ const ACES2_SDR_BLOCK: u32 = 0u;
|
|
|
26
26
|
const ACES2_DISPLAY_BLOCK: u32 = ${ACES2_BLOCK_FLOATS}u;
|
|
27
27
|
|
|
28
28
|
fn tone_map_operator(scene: vec3<f32>, peak_nits: f32) -> vec3<f32> {
|
|
29
|
-
// the SDR picture first,
|
|
29
|
+
// the SDR picture first, on any display
|
|
30
30
|
var picture = tonemap_ue_filmic(scene);
|
|
31
31
|
|
|
32
32
|
if (peak_nits > PAPER_WHITE_NITS) {
|
|
@@ -63,13 +63,12 @@ chunk.add(false, chunk_full);
|
|
|
63
63
|
chunk.add(true, chunk_sdr);
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Filmic ACES tone mapping, the tone mapper's default.
|
|
67
67
|
*
|
|
68
|
-
* - **SDR** is
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* display's headroom, both limited to Rec.709. A display at or under the paper white shows the SDR picture.
|
|
68
|
+
* - **SDR** is a filmic curve on ACES at fixed settings; see `chunk_tonemap_ue_filmic`.
|
|
69
|
+
* - **HDR** keeps the SDR look: the SDR picture, taken back to the scene through the inverse ACES 2.0 output
|
|
70
|
+
* transform for an SDR display, and rendered again with the ACES 2.0 output transform for the display's headroom,
|
|
71
|
+
* both limited to Rec.709. A display at or under the paper white shows the SDR picture.
|
|
73
72
|
*
|
|
74
73
|
* An exposed 0.18 shows at 0.18 of SDR white, with a mid-tone contrast of 1.36 against GT7's 1.05. On HDR the picture
|
|
75
74
|
* expands into the headroom and mid-grey rises with it, by ACES 2.0's design: 0.26 of SDR white at 1000 cd/m².
|
|
@@ -19,7 +19,7 @@ export class ToneMapper {
|
|
|
19
19
|
*/
|
|
20
20
|
constructor(device: GPUDevice);
|
|
21
21
|
/**
|
|
22
|
-
* The tone-mapping function the LUTs are baked from.
|
|
22
|
+
* The tone-mapping function the LUTs are baked from. Filmic ACES unless set. Read every frame.
|
|
23
23
|
* @type {ToneMapOperator}
|
|
24
24
|
*/
|
|
25
25
|
operator: ToneMapOperator;
|
|
@@ -111,7 +111,7 @@ function same_words(a, b) {
|
|
|
111
111
|
*/
|
|
112
112
|
export class ToneMapper {
|
|
113
113
|
/**
|
|
114
|
-
* The tone-mapping function the LUTs are baked from.
|
|
114
|
+
* The tone-mapping function the LUTs are baked from. Filmic ACES unless set. Read every frame.
|
|
115
115
|
* @type {ToneMapOperator}
|
|
116
116
|
*/
|
|
117
117
|
operator = TONE_MAP_OPERATOR_ACES;
|