@woosh/meep-engine 3.14.2 → 3.14.3
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/editor/prototypeEditorShell.js +6 -0
- package/package.json +1 -1
- package/src/CODEC_LAYOUT_VERIFICATION.md +420 -0
- package/src/core/binary/zstd/ZstdReverseBitReader.d.ts +76 -0
- package/src/core/binary/zstd/ZstdReverseBitReader.d.ts.map +1 -0
- package/src/core/binary/zstd/ZstdReverseBitReader.js +223 -0
- package/src/core/binary/zstd/zstd_decompress.d.ts +31 -0
- package/src/core/binary/zstd/zstd_decompress.d.ts.map +1 -0
- package/src/core/binary/zstd/zstd_decompress.js +628 -0
- package/src/core/binary/zstd/zstd_fse.d.ts +83 -0
- package/src/core/binary/zstd/zstd_fse.d.ts.map +1 -0
- package/src/core/binary/zstd/zstd_fse.js +265 -0
- package/src/core/binary/zstd/zstd_huffman.d.ts +56 -0
- package/src/core/binary/zstd/zstd_huffman.d.ts.map +1 -0
- package/src/core/binary/zstd/zstd_huffman.js +244 -0
- package/src/core/binary/zstd/zstd_sequence_tables.d.ts +62 -0
- package/src/core/binary/zstd/zstd_sequence_tables.d.ts.map +1 -0
- package/src/core/binary/zstd/zstd_sequence_tables.js +98 -0
- package/src/core/color/COLOR_REVIEW_2026_08_28.md +1 -1
- package/src/core/color/PQ/PQ_constants.d.ts +1 -1
- package/src/core/color/PQ/PQ_constants.js +1 -1
- package/src/engine/asset/GameAssetType.d.ts +1 -0
- package/src/engine/asset/GameAssetType.js +8 -0
- package/src/engine/asset/codec/DecodedImage.d.ts +39 -0
- package/src/engine/asset/codec/DecodedImage.d.ts.map +1 -0
- package/src/engine/asset/codec/DecodedImage.js +26 -0
- package/src/engine/asset/guessAssetType.d.ts.map +1 -1
- package/src/engine/asset/guessAssetType.js +10 -0
- package/src/engine/asset/load_model_scene_bundle.d.ts +1 -1
- package/src/engine/asset/load_model_scene_bundle.d.ts.map +1 -1
- package/src/engine/asset/load_model_scene_bundle.js +6 -2
- package/src/engine/asset/loaders/USDSceneBundleAssetLoader.d.ts +37 -0
- package/src/engine/asset/loaders/USDSceneBundleAssetLoader.d.ts.map +1 -0
- package/src/engine/asset/loaders/USDSceneBundleAssetLoader.js +104 -0
- package/src/engine/asset/loaders/image/IMAGE_CODEC_REVIEW_2026_08_28.md +83 -71
- package/src/engine/asset/loaders/image/ImageDecoderWorker.js +2 -2
- package/src/engine/asset/loaders/image/ImageRGBADataLoader.d.ts +8 -9
- package/src/engine/asset/loaders/image/ImageRGBADataLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/ImageRGBADataLoader.js +12 -3
- package/src/engine/asset/loaders/image/avif/encode_image_source.d.ts +70 -0
- package/src/engine/asset/loaders/image/avif/encode_image_source.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/avif/encode_image_source.js +117 -0
- package/src/engine/asset/loaders/image/avif/encoder_worker.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/avif/threaded_image_encoder.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/codec/AvifCodec.d.ts +34 -0
- package/src/engine/asset/loaders/image/codec/AvifCodec.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/codec/AvifCodec.js +85 -0
- package/src/engine/asset/loaders/image/codec/JpegCodec.d.ts +26 -0
- package/src/engine/asset/loaders/image/codec/JpegCodec.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/codec/JpegCodec.js +66 -0
- package/src/engine/asset/loaders/image/codec/NativeImageDecoder.d.ts +4 -16
- package/src/engine/asset/loaders/image/codec/NativeImageDecoder.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/codec/NativeImageDecoder.js +2 -2
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.d.ts +21 -1
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.js +21 -1
- package/src/engine/asset/loaders/image/prototypePNG.d.ts.map +1 -0
- package/src/engine/asset/loaders/image/prototypePNG.js +37 -0
- package/src/engine/asset/preloader/extractAssetListFromManager.d.ts.map +1 -1
- package/src/engine/asset/preloader/extractAssetListFromManager.js +2 -1
- package/src/engine/graphics/ecs/mesh/assetTypeByPath.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh/assetTypeByPath.js +6 -0
- package/src/engine/graphics/texture/sampler/avif_to_sampler2d.d.ts +25 -0
- package/src/engine/graphics/texture/sampler/avif_to_sampler2d.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/avif_to_sampler2d.js +42 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_compare.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_compare.js +94 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_max_absolute_difference.d.ts +19 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_max_absolute_difference.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_max_absolute_difference.js +62 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_psnr.d.ts +30 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_psnr.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/compare/sampler2d_psnr.js +115 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_avif.d.ts.map +1 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_avif.js +108 -0
- package/src/engine/graphics/texture/sampler/sampler2d_to_f16.d.ts +7 -1
- package/src/engine/graphics/texture/sampler/sampler2d_to_f16.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/sampler2d_to_f16.js +28 -21
- package/src/engine/graphics/texture/sampler/sampler2d_to_uint8_RGBA.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/sampler2d_to_uint8_RGBA.js +3 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/format/image/avif/DECISIONS.md +545 -0
- package/src/format/image/avif/api/AvifDecoder.d.ts.map +1 -0
- package/src/format/image/avif/api/apply_transformations.d.ts.map +1 -0
- package/src/format/image/avif/api/convert_to_rgba.d.ts.map +1 -0
- package/src/format/image/avif/api/convert_to_rgba.js +204 -0
- package/src/format/image/avif/api/decode_avif.d.ts.map +1 -0
- package/src/format/image/avif/api/decode_image_item.d.ts.map +1 -0
- package/src/format/image/avif/api/encode_avif.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/Av1FrameContext.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/block_decoded.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/decode_av1_still.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/decode_coefficients.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/decode_palette.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/decode_palette.js +442 -0
- package/src/format/image/avif/av1/decode/decode_tile.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/decode_tile.js +1213 -0
- package/src/format/image/avif/av1/decode/get_scan.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/read_lr.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/read_lr.js +277 -0
- package/src/format/image/avif/av1/decode/read_transform_type.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/read_transform_type.js +92 -0
- package/src/format/image/avif/av1/decode/reconstruct.d.ts.map +1 -0
- package/src/format/image/avif/av1/decode/reconstruct.js +241 -0
- package/src/format/image/avif/av1/decode/transform_type.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/Av1BlockSnapshot.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/Av1EncodeContext.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/build_headers.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/choose_chroma_alpha.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/choose_filters.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/choose_restoration.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/choose_restoration.js +616 -0
- package/src/format/image/avif/av1/encode/decode_effort.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/encode_av1_still.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/encode_effort.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/encode_tile.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/encode_tile.js +2331 -0
- package/src/format/image/avif/av1/encode/quantise.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/write_coefficients.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/write_lr.d.ts.map +1 -0
- package/src/format/image/avif/av1/encode/write_transform_type.d.ts.map +1 -0
- package/src/format/image/avif/av1/entropy/CdfContext.d.ts.map +1 -0
- package/src/format/image/avif/av1/entropy/SymbolReader.d.ts.map +1 -0
- package/src/format/image/avif/av1/entropy/SymbolWriter.d.ts.map +1 -0
- package/src/format/image/avif/av1/entropy/coefficient_context.d.ts.map +1 -0
- package/src/format/image/avif/av1/entropy/partition_cdf.d.ts.map +1 -0
- package/src/format/image/avif/av1/entropy/symbol_cost.d.ts.map +1 -0
- package/src/format/image/avif/av1/filter/cdef.d.ts.map +1 -0
- package/src/format/image/avif/av1/filter/cdef.js +313 -0
- package/src/format/image/avif/av1/filter/loop_filter.d.ts.map +1 -0
- package/src/format/image/avif/av1/filter/loop_filter.js +377 -0
- package/src/format/image/avif/av1/filter/loop_restoration.d.ts.map +1 -0
- package/src/format/image/avif/av1/filter/loop_restoration.js +451 -0
- package/src/format/image/avif/av1/filter/superres.d.ts.map +1 -0
- package/src/format/image/avif/av1/filter/superres.js +86 -0
- package/src/format/image/avif/av1/grain/FilmGrainState.d.ts.map +1 -0
- package/src/format/image/avif/av1/grain/film_grain.d.ts.map +1 -0
- package/src/format/image/avif/av1/grain/film_grain.js +623 -0
- package/src/format/image/avif/av1/obu/FrameHeader.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/ObuHeader.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/SequenceHeader.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/for_each_obu.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/parse_frame_header.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/parse_frame_header.js +841 -0
- package/src/format/image/avif/av1/obu/parse_obu_header.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/parse_sequence_header.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/write_frame_header.d.ts.map +1 -0
- package/src/format/image/avif/av1/obu/write_sequence_header.d.ts.map +1 -0
- package/src/format/image/avif/av1/predict/IntraPredictionState.d.ts.map +1 -0
- package/src/format/image/avif/av1/predict/intra_filter_type.d.ts.map +1 -0
- package/src/format/image/avif/av1/predict/predict_chroma_from_luma.d.ts.map +1 -0
- package/src/format/image/avif/av1/predict/predict_chroma_from_luma.js +153 -0
- package/src/format/image/avif/av1/predict/predict_intra.d.ts.map +1 -0
- package/src/format/image/avif/av1/predict/predict_intra.js +803 -0
- package/src/format/image/avif/av1/predict/predict_palette.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/av1_symbols.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/av1_symbols.js +419 -0
- package/src/format/image/avif/av1/tables/block_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/block_tables.js +270 -0
- package/src/format/image/avif/av1/tables/cdf_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/cdf_tables.js +1893 -0
- package/src/format/image/avif/av1/tables/coefficient_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/coefficient_tables.js +82 -0
- package/src/format/image/avif/av1/tables/derived_block_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/filter_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/filter_tables.js +313 -0
- package/src/format/image/avif/av1/tables/grain_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/grain_tables.js +190 -0
- package/src/format/image/avif/av1/tables/prediction_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/prediction_tables.js +223 -0
- package/src/format/image/avif/av1/tables/quantizer_matrix_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/quantizer_matrix_tables.js +38 -0
- package/src/format/image/avif/av1/tables/quantizer_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/quantizer_tables.js +160 -0
- package/src/format/image/avif/av1/tables/scan_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/scan_tables.js +727 -0
- package/src/format/image/avif/av1/tables/segmentation_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/segmentation_tables.js +48 -0
- package/src/format/image/avif/av1/tables/transform_tables.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/transform_tables.js +140 -0
- package/src/format/image/avif/av1/tables/unpack_table.d.ts.map +1 -0
- package/src/format/image/avif/av1/tables/unpack_table.js +73 -0
- package/src/format/image/avif/av1/transform/forward_transform_2d.d.ts.map +1 -0
- package/src/format/image/avif/av1/transform/inverse_transform_1d.d.ts.map +1 -0
- package/src/format/image/avif/av1/transform/inverse_transform_1d.js +590 -0
- package/src/format/image/avif/av1/transform/inverse_transform_2d.d.ts.map +1 -0
- package/src/format/image/avif/av1/transform/inverse_transform_2d.js +180 -0
- package/src/format/image/avif/av1/util/ceil_log2.d.ts.map +1 -0
- package/src/format/image/avif/av1/util/floor_log2.d.ts +20 -0
- package/src/format/image/avif/av1/util/floor_log2.d.ts.map +1 -0
- package/src/format/image/avif/av1/util/floor_log2.js +20 -0
- package/src/format/image/avif/av1/util/round2.d.ts.map +1 -0
- package/src/format/image/avif/av1/util/round2_signed.d.ts.map +1 -0
- package/src/format/image/avif/av1/util/tile_log2.d.ts.map +1 -0
- package/src/format/image/avif/bitstream/BitReader.d.ts.map +1 -0
- package/src/format/image/avif/bitstream/BitWriter.d.ts.map +1 -0
- package/src/format/image/avif/color/ColourTransform.d.ts.map +1 -0
- package/src/format/image/avif/color/YuvImage.d.ts.map +1 -0
- package/src/format/image/avif/color/clamp_sample.d.ts.map +1 -0
- package/src/format/image/avif/color/linear_to_transfer.d.ts.map +1 -0
- package/src/format/image/avif/color/linear_to_transfer.js +126 -0
- package/src/format/image/avif/color/primaries.d.ts.map +1 -0
- package/src/format/image/avif/color/rgb_row_to_ycbcr.d.ts.map +1 -0
- package/src/format/image/avif/color/transfer_to_linear.d.ts.map +1 -0
- package/src/format/image/avif/color/transfer_to_linear.js +171 -0
- package/src/format/image/avif/color/upsample_chroma_row.d.ts.map +1 -0
- package/src/format/image/avif/color/upsample_chroma_row.js +89 -0
- package/src/format/image/avif/color/ycbcr_row_to_rgb.d.ts.map +1 -0
- package/src/format/image/avif/color/ycbcr_row_to_rgb.js +78 -0
- package/src/format/image/avif/heif/AvifFile.d.ts.map +1 -0
- package/src/format/image/avif/heif/ItemProperty.d.ts.map +1 -0
- package/src/format/image/avif/heif/find_item_property.d.ts.map +1 -0
- package/src/format/image/avif/heif/find_item_references.d.ts.map +1 -0
- package/src/format/image/avif/heif/find_items_referencing.d.ts.map +1 -0
- package/src/format/image/avif/heif/parse_avif_file.d.ts.map +1 -0
- package/src/format/image/avif/heif/parse_avif_file.js +384 -0
- package/src/format/image/avif/heif/parse_image_grid.d.ts.map +1 -0
- package/src/format/image/avif/heif/parse_image_grid.js +49 -0
- package/src/format/image/avif/heif/parse_item_property.d.ts.map +1 -0
- package/src/format/image/avif/heif/read_item_data.d.ts.map +1 -0
- package/src/format/image/avif/heif/write_avif_file.d.ts.map +1 -0
- package/src/format/image/avif/heif/write_item_property.d.ts.map +1 -0
- package/src/format/image/avif/index.d.ts +12 -0
- package/src/format/image/avif/index.d.ts.map +1 -0
- package/src/format/image/avif/index.js +58 -0
- package/src/format/image/avif/isobmff/BoxHeader.d.ts.map +1 -0
- package/src/format/image/avif/isobmff/BoxWriter.d.ts +118 -0
- package/src/format/image/avif/isobmff/BoxWriter.d.ts.map +1 -0
- package/src/format/image/avif/isobmff/BoxWriter.js +264 -0
- package/src/format/image/avif/isobmff/for_each_box.d.ts.map +1 -0
- package/src/format/image/avif/isobmff/read_box_header.d.ts.map +1 -0
- package/src/format/image/avif/isobmff/read_full_box_header.d.ts.map +1 -0
- package/src/format/image/jpeg/JpegFrame.d.ts.map +1 -0
- package/src/format/image/jpeg/JpegFrameComponent.d.ts.map +1 -0
- package/src/format/image/jpeg/JpegImage.d.ts.map +1 -0
- package/src/format/image/jpeg/JpegImage.js +664 -0
- package/src/format/image/jpeg/buildComponentData.d.ts.map +1 -0
- package/src/format/image/jpeg/buildHuffmanTable.d.ts.map +1 -0
- package/src/format/image/jpeg/decodeScan.d.ts.map +1 -0
- package/src/format/image/jpeg/idct8x8_float.d.ts.map +1 -0
- package/src/format/image/jpeg/idct8x8_float.js +31 -0
- package/src/format/image/jpeg/jpeg_component_row.d.ts.map +1 -0
- package/src/format/image/jpeg/jpeg_decode.d.ts.map +1 -0
- package/src/format/image/png/PNG.d.ts.map +1 -0
- package/src/format/image/png/PNGReader.d.ts +158 -0
- package/src/format/image/png/PNGReader.d.ts.map +1 -0
- package/src/format/image/png/PNGReader.js +656 -0
- package/src/format/image/png/PNG_HEADER_BYTES.d.ts.map +1 -0
- package/src/format/image/png/chunk/png_chunk_decode_iTXt.d.ts.map +1 -0
- package/src/format/image/png/chunk/png_chunk_decode_iTXt.js +53 -0
- package/src/format/image/png/chunk/png_chunk_decode_zTXt.d.ts.map +1 -0
- package/src/format/image/png/chunk/png_chunk_decode_zTXt.js +42 -0
- package/src/format/image/png/crc32.d.ts +2 -0
- package/src/format/image/png/crc32.d.ts.map +1 -0
- package/src/format/image/png/crc32.js +8 -0
- package/src/format/image/png/filter/png_filter_unFilterAverage.d.ts.map +1 -0
- package/src/format/image/png/filter/png_filter_unFilterNone.d.ts.map +1 -0
- package/src/format/image/png/filter/png_filter_unFilterPaeth.d.ts.map +1 -0
- package/src/format/image/png/filter/png_filter_unFilterSub.d.ts.map +1 -0
- package/src/format/image/png/filter/png_filter_unFilterUp.d.ts.map +1 -0
- package/src/format/image/png/filter/png_unfilter.d.ts.map +1 -0
- package/src/format/image/png/filter/png_unfilter.js +68 -0
- package/src/format/image/png/png_inflate.d.ts.map +1 -0
- package/src/format/image/png/png_unpack_samples.d.ts.map +1 -0
- package/src/format/scene/gltf/GLTF_PRIMITIVE_MODE.d.ts.map +1 -0
- package/src/format/scene/gltf/MESHOPT_COMPRESSION_PLAN.md +793 -0
- package/src/format/scene/gltf/coalesce_array_duplicates.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/GltfBufferViewExtension.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/GltfBufferViewExtensionSet.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/GltfBufferViewExtensionSet.js +109 -0
- package/src/format/scene/gltf/ext/gltf_apply_buffer_view_extensions.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/gltf_buffer_view_extensions.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/gltf_geometry_extensions.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/meshopt/MeshoptBufferViewExtension.d.ts.map +1 -0
- package/src/format/scene/gltf/ext/meshopt/MeshoptBufferViewExtension.js +301 -0
- package/src/format/scene/gltf/gltf_component_type.d.ts.map +1 -0
- package/src/format/scene/gltf/gltf_node_world_matrices.d.ts.map +1 -0
- package/src/format/scene/gltf/gltf_node_world_matrices.js +137 -0
- package/src/format/scene/gltf/gltf_parse_container.d.ts.map +1 -0
- package/src/format/scene/gltf/gltf_read_accessor.d.ts.map +1 -0
- package/src/format/scene/gltf/gltf_read_accessor.js +294 -0
- package/src/format/scene/gltf/gltf_used_image_indices.d.ts +51 -0
- package/src/format/scene/gltf/gltf_used_image_indices.d.ts.map +1 -0
- package/src/format/scene/gltf/gltf_used_image_indices.js +122 -0
- package/src/format/scene/usd/UsdError.d.ts.map +1 -0
- package/src/format/scene/usd/parse_usda.d.ts.map +1 -0
- package/src/format/scene/usd/unpack_usdz.d.ts.map +1 -0
- package/src/format/scene/usd/unpack_usdz.js +106 -0
- package/src/format/scene/usd/usd_compose_transform.d.ts.map +1 -0
- package/src/format/scene/usd/usd_compose_transform.js +258 -0
- package/src/format/scene/usd/usd_lz4.d.ts.map +1 -0
- package/src/format/scene/usd/usd_lz4.js +182 -0
- package/src/format/scene/usd/usd_triangulate.d.ts.map +1 -0
- package/src/format/texture/TexelPayload.d.ts +55 -0
- package/src/format/texture/TexelPayload.d.ts.map +1 -0
- package/src/format/texture/TexelPayload.js +39 -0
- package/src/format/texture/basis/BasisBitReader.d.ts +77 -0
- package/src/format/texture/basis/BasisBitReader.d.ts.map +1 -0
- package/src/format/texture/basis/BasisBitReader.js +231 -0
- package/src/format/texture/basis/BasisHuffmanTable.d.ts.map +1 -0
- package/src/format/texture/basis/astc_block.d.ts +92 -0
- package/src/format/texture/basis/astc_block.d.ts.map +1 -0
- package/src/format/texture/basis/astc_block.js +164 -0
- package/src/format/texture/basis/astc_integer_sequence.d.ts +59 -0
- package/src/format/texture/basis/astc_integer_sequence.d.ts.map +1 -0
- package/src/format/texture/basis/astc_integer_sequence.js +251 -0
- package/src/format/texture/basis/astc_partition.d.ts +56 -0
- package/src/format/texture/basis/astc_partition.d.ts.map +1 -0
- package/src/format/texture/basis/astc_partition.js +199 -0
- package/src/format/texture/basis/basis_read_huffman_table.d.ts.map +1 -0
- package/src/format/texture/basis/etc1s/Etc1sSelectorHistory.d.ts.map +1 -0
- package/src/format/texture/basis/etc1s/etc1s_block_colors.d.ts.map +1 -0
- package/src/format/texture/basis/etc1s/etc1s_decode_slice.d.ts.map +1 -0
- package/src/format/texture/basis/etc1s/etc1s_decode_slice.js +290 -0
- package/src/format/texture/basis/etc1s/etc1s_read_endpoint_codebook.d.ts.map +1 -0
- package/src/format/texture/basis/etc1s/etc1s_read_selector_codebook.d.ts.map +1 -0
- package/src/format/texture/basis/etc1s/etc1s_read_slice_tables.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/build_range_plan.d.ts +46 -0
- package/src/format/texture/basis/transcode/build_range_plan.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/etc1s_to_astc.d.ts +30 -0
- package/src/format/texture/basis/transcode/etc1s_to_astc.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/etc1s_to_astc.js +328 -0
- package/src/format/texture/basis/transcode/etc1s_to_bc1.d.ts +34 -0
- package/src/format/texture/basis/transcode/etc1s_to_bc1.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/etc1s_to_bc1.js +486 -0
- package/src/format/texture/basis/transcode/etc1s_to_bc7.d.ts +27 -0
- package/src/format/texture/basis/transcode/etc1s_to_bc7.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/etc1s_to_etc2.d.ts +31 -0
- package/src/format/texture/basis/transcode/etc1s_to_etc2.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/etc1s_to_etc2.js +332 -0
- package/src/format/texture/basis/transcode/etc1s_to_rgba8.d.ts +39 -0
- package/src/format/texture/basis/transcode/etc1s_to_rgba8.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/etc1s_to_rgba8.js +115 -0
- package/src/format/texture/basis/transcode/fit_endpoints.d.ts +79 -0
- package/src/format/texture/basis/transcode/fit_endpoints.d.ts.map +1 -0
- package/src/format/texture/basis/transcode/fit_endpoints.js +297 -0
- package/src/format/texture/basis/transcode_basis.d.ts +109 -0
- package/src/format/texture/basis/transcode_basis.d.ts.map +1 -0
- package/src/format/texture/basis/transcode_basis.js +250 -0
- package/src/format/texture/basis/transcode_uastc.d.ts +55 -0
- package/src/format/texture/basis/transcode_uastc.d.ts.map +1 -0
- package/src/format/texture/basis/transcode_uastc.js +117 -0
- package/src/format/texture/basis/uastc/bc7_tables.d.ts +111 -0
- package/src/format/texture/basis/uastc/bc7_tables.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/bc7_tables.js +276 -0
- package/src/format/texture/basis/uastc/bc7_write_block.d.ts +124 -0
- package/src/format/texture/basis/uastc/bc7_write_block.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/bc7_write_block.js +227 -0
- package/src/format/texture/basis/uastc/uastc_decode_block.d.ts +105 -0
- package/src/format/texture/basis/uastc/uastc_decode_block.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/uastc_decode_block.js +480 -0
- package/src/format/texture/basis/uastc/uastc_tables.d.ts +240 -0
- package/src/format/texture/basis/uastc/uastc_tables.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/uastc_tables.js +383 -0
- package/src/format/texture/basis/uastc/uastc_to_astc.d.ts +30 -0
- package/src/format/texture/basis/uastc/uastc_to_astc.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/uastc_to_astc.js +421 -0
- package/src/format/texture/basis/uastc/uastc_to_bc5.d.ts +26 -0
- package/src/format/texture/basis/uastc/uastc_to_bc5.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/uastc_to_bc5.js +115 -0
- package/src/format/texture/basis/uastc/uastc_to_bc7.d.ts +36 -0
- package/src/format/texture/basis/uastc/uastc_to_bc7.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/uastc_to_bc7.js +602 -0
- package/src/format/texture/basis/uastc/uastc_to_rgba8.d.ts +37 -0
- package/src/format/texture/basis/uastc/uastc_to_rgba8.d.ts.map +1 -0
- package/src/format/texture/basis/uastc/uastc_to_rgba8.js +87 -0
- package/src/format/texture/bc/bc1_write_block.d.ts +28 -0
- package/src/format/texture/bc/bc1_write_block.d.ts.map +1 -0
- package/src/format/texture/bc/bc1_write_block.js +41 -0
- package/src/format/texture/bc/bc4_write_block.d.ts +32 -0
- package/src/format/texture/bc/bc4_write_block.d.ts.map +1 -0
- package/src/format/texture/bc/bc4_write_block.js +50 -0
- package/src/format/texture/bc/bc6h_write_block_mode11.d.ts +30 -0
- package/src/format/texture/bc/bc6h_write_block_mode11.d.ts.map +1 -0
- package/src/format/texture/bc/bc6h_write_block_mode11.js +62 -0
- package/src/format/texture/ktx2/KTX2_IDENTIFIER.d.ts.map +1 -0
- package/src/format/texture/ktx2/KhrDfModel.d.ts.map +1 -0
- package/src/format/texture/ktx2/SupercompressionScheme.d.ts.map +1 -0
- package/src/format/texture/ktx2/ktx2_read.d.ts +105 -0
- package/src/format/texture/ktx2/ktx2_read.d.ts.map +1 -0
- package/src/format/texture/ktx2/ktx2_read.js +909 -0
- package/src/format/texture/ktx2/ktx2_read_basis_lz_global_data.d.ts +27 -0
- package/src/format/texture/ktx2/ktx2_read_basis_lz_global_data.d.ts.map +1 -0
- package/src/format/texture/ktx2/ktx2_read_basis_lz_global_data.js +189 -0
- package/src/format/texture/ktx2/vk_format_to_texture_format.d.ts +55 -0
- package/src/format/texture/ktx2/vk_format_to_texture_format.d.ts.map +1 -0
- package/src/format/texture/ktx2/vk_format_to_texture_format.js +290 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_feature.d.ts +16 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_feature.d.ts.map +1 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_feature.js +44 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_info.d.ts +16 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_info.d.ts.map +1 -1
- package/src/shade/descriptor/texture/format/gpu_texture_format_info.js +24 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_srgb.d.ts +19 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_srgb.d.ts.map +1 -0
- package/src/shade/descriptor/texture/format/gpu_texture_format_srgb.js +50 -0
- package/src/shade/device/COPY_BYTES_PER_ROW_ALIGNMENT.d.ts +14 -0
- package/src/shade/device/COPY_BYTES_PER_ROW_ALIGNMENT.d.ts.map +1 -0
- package/src/shade/device/COPY_BYTES_PER_ROW_ALIGNMENT.js +13 -0
- package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUDevice.js +37 -3
- package/src/shade/device/mock/SoftwareGPUTexture.d.ts +4 -2
- package/src/shade/device/mock/SoftwareGPUTexture.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUTexture.js +39 -3
- package/src/shade/device/mock/SoftwareGPUTextureView.d.ts +7 -0
- package/src/shade/device/mock/SoftwareGPUTextureView.d.ts.map +1 -1
- package/src/shade/device/mock/SoftwareGPUTextureView.js +8 -0
- package/src/shade/device/mock/texture_copy.d.ts.map +1 -1
- package/src/shade/device/mock/texture_copy.js +74 -12
- package/src/shade/playground/basis_textures/README.md +105 -0
- package/src/shade/playground/basis_textures/index.html +141 -0
- package/src/shade/playground/basis_textures/main.d.ts +8 -0
- package/src/shade/playground/basis_textures/main.d.ts.map +1 -0
- package/src/shade/playground/basis_textures/main.js +351 -0
- package/src/shade/playground/basis_textures/make_basis_gltf.d.mts +2 -0
- package/src/shade/playground/basis_textures/make_basis_gltf.d.mts.map +1 -0
- package/src/shade/playground/basis_textures/make_basis_gltf.mjs +197 -0
- package/src/shade/playground/basis_textures/node_modules/basis_universal/bin/basisu.exe +0 -0
- package/src/shade/playground/basis_textures/texture_inventory.d.ts +28 -0
- package/src/shade/playground/basis_textures/texture_inventory.d.ts.map +1 -0
- package/src/shade/playground/basis_textures/texture_inventory.js +98 -0
- package/src/shade/playground/image_decode_bench/README.md +42 -0
- package/src/shade/playground/image_decode_bench/decode_worker.d.ts +2 -0
- package/src/shade/playground/image_decode_bench/decode_worker.d.ts.map +1 -0
- package/src/shade/playground/image_decode_bench/decode_worker.js +19 -0
- package/src/shade/playground/image_decode_bench/index.html +34 -0
- package/src/shade/playground/image_decode_bench/main.d.ts +2 -0
- package/src/shade/playground/image_decode_bench/main.d.ts.map +1 -0
- package/src/shade/playground/image_decode_bench/main.js +211 -0
- package/src/shade/playground/skinned_blas_refit/README.md +1 -1
- package/src/shade/playground/skinned_blas_refit/index.html +15 -1
- package/src/shade/playground/skinned_blas_refit/main.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/main.js +339 -3
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_leaf_triangles.d.ts +8 -1
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_leaf_triangles.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/shader_blas_audit_leaf_triangles.js +27 -5
- package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.d.ts +27 -0
- package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.d.ts.map +1 -0
- package/src/shade/playground/skinned_blas_refit/verify_clone_leaves.js +127 -0
- package/src/shade/playground/skinned_blas_refit/verify_leaf_triangles.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_leaf_triangles.js +3 -3
- package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.d.ts.map +1 -1
- package/src/shade/playground/skinned_blas_refit/verify_skinned_blas_refit.js +10 -8
- package/src/shade/playground/texture_encode/README.md +109 -0
- package/src/shade/playground/texture_encode/index.html +133 -0
- package/src/shade/playground/texture_encode/main.d.ts +24 -0
- package/src/shade/playground/texture_encode/main.d.ts.map +1 -0
- package/src/shade/playground/texture_encode/main.js +1430 -0
- package/src/shade/playground/texture_encode/panel_view.d.ts +118 -0
- package/src/shade/playground/texture_encode/panel_view.d.ts.map +1 -0
- package/src/shade/playground/texture_encode/panel_view.js +363 -0
- package/src/shade/renderer/Renderer.js +2 -2
- package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
- package/src/shade/renderer/animation/GPUAnimationManager.js +49 -5
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
- package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +32 -14
- package/src/shade/renderer/geometry/GPUGeometryManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryManager.js +591 -497
- package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts +9 -0
- package/src/shade/renderer/geometry/GPUGeometryMetadata.d.ts.map +1 -1
- package/src/shade/renderer/geometry/GPUGeometryMetadata.js +10 -0
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_BATCH_PLAN.md +606 -0
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.d.ts +17 -0
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/BLAS_REFIT_TARGET_STRUCT.js +44 -0
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.d.ts +58 -0
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/GPUBLASRefitBatch.js +362 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +38 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +730 -617
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts +15 -2
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.js +15 -1
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.d.ts +39 -0
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.d.ts.map +1 -0
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_batch.js +134 -0
- package/src/shade/renderer/geometry/virtual/build/gltf/gltf_collect_geometries.js +3 -3
- package/src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.js +3 -3
- package/src/shade/renderer/geometry/virtual/build/gltf/gltf_read_geometry.js +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/BVH_NODE_LAYOUT_DEFINITION.d.ts +17 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_NODE_LAYOUT_DEFINITION.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/BVH_NODE_LAYOUT_DEFINITION.js +30 -0
- package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +8 -1
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_climb.d.ts +34 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_climb.d.ts.map +1 -0
- package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_refit_climb.js +102 -0
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit.d.ts +11 -9
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_refit.js +24 -86
- package/src/shade/renderer/loader/gltf/gltf_create_texture.d.ts +18 -0
- package/src/shade/renderer/loader/gltf/gltf_create_texture.d.ts.map +1 -0
- package/src/shade/renderer/loader/gltf/gltf_create_texture.js +103 -0
- package/src/shade/renderer/loader/gltf/gltf_image_roles.d.ts +26 -0
- package/src/shade/renderer/loader/gltf/gltf_image_roles.d.ts.map +1 -0
- package/src/shade/renderer/loader/gltf/gltf_image_roles.js +108 -0
- package/src/shade/renderer/loader/gltf/load_gltf.d.ts +10 -3
- package/src/shade/renderer/loader/gltf/load_gltf.d.ts.map +1 -1
- package/src/shade/renderer/loader/gltf/load_gltf.js +1179 -1253
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +18 -1
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts.map +1 -1
- package/src/shade/renderer/loader/gltf/tiny-gltf.js +837 -646
- package/src/shade/renderer/loader/usd/load_usd.js +3 -3
- package/src/shade/renderer/loader/usd/usd_build_scene.js +2 -2
- package/src/shade/renderer/loader/usd/usd_decode_image.d.ts +6 -5
- package/src/shade/renderer/loader/usd/usd_decode_image.d.ts.map +1 -1
- package/src/shade/renderer/loader/usd/usd_decode_image.js +197 -384
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/postprocess/taa/TAA.d.ts +3 -3
- package/src/shade/renderer/postprocess/taa/TAA.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/TAA.js +2 -6
- package/src/shade/renderer/postprocess/taa/chunk_depth_clip_offset_codec.d.ts +18 -0
- package/src/shade/renderer/postprocess/taa/chunk_depth_clip_offset_codec.d.ts.map +1 -0
- package/src/shade/renderer/postprocess/taa/chunk_depth_clip_offset_codec.js +36 -0
- package/src/shade/renderer/postprocess/taa/chunk_taa_history_color_bounding_box_YCoCg.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/chunk_taa_history_color_bounding_box_YCoCg.js +4 -1
- package/src/shade/renderer/postprocess/taa/shader_depth_occlusion_clip.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/shader_depth_occlusion_clip.js +13 -8
- package/src/shade/renderer/postprocess/taa/shader_taa.d.ts +1 -1
- package/src/shade/renderer/postprocess/taa/shader_taa.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/shader_taa.js +52 -38
- package/src/shade/renderer/restir/di/chunk_restir_temporal_reuse.d.ts +4 -2
- package/src/shade/renderer/restir/di/chunk_restir_temporal_reuse.d.ts.map +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_temporal_reuse.js +9 -6
- package/src/shade/renderer/scene/optimization/deduplicate_images.js +93 -93
- package/src/shade/renderer/scene/optimization/downscale_images.js +216 -216
- package/src/shade/renderer/scene/serialization/decode_image_source_hdr.js +1 -1
- package/src/shade/renderer/scene/serialization/deserialize_scene.js +1 -1
- package/src/shade/renderer/scene/serialization/write_image_source.js +1 -1
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +1 -1
- package/src/shade/renderer/shader/chunk/texture/sample/chunk_texture_sample_catmullrom_hardware_5tap_uv.d.ts +2 -1
- package/src/shade/renderer/shader/chunk/texture/sample/chunk_texture_sample_catmullrom_hardware_5tap_uv.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/texture/sample/chunk_texture_sample_catmullrom_hardware_5tap_uv.js +2 -1
- package/src/shade/renderer/texture/COMPRESSED_TEXTURE_PLAN_2026_09_01.md +893 -10
- package/src/shade/renderer/texture/encode/ENCODE_NOTES_2026_09_02.md +462 -0
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts +33 -0
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_astc_encode_block_4x4_rgb.js +310 -0
- package/src/shade/renderer/texture/encode/chunk_astc_pack_4x4_rgb.d.ts +17 -0
- package/src/shade/renderer/texture/encode/chunk_astc_pack_4x4_rgb.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_astc_pack_4x4_rgb.js +51 -0
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts +42 -0
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc1_encode_block.js +375 -0
- package/src/shade/renderer/texture/encode/chunk_bc1_pack_block.d.ts +12 -0
- package/src/shade/renderer/texture/encode/chunk_bc1_pack_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc1_pack_block.js +24 -0
- package/src/shade/renderer/texture/encode/chunk_bc4_encode_block.d.ts +45 -0
- package/src/shade/renderer/texture/encode/chunk_bc4_encode_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc4_encode_block.js +348 -0
- package/src/shade/renderer/texture/encode/chunk_bc4_pack_block.d.ts +16 -0
- package/src/shade/renderer/texture/encode/chunk_bc4_pack_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc4_pack_block.js +33 -0
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts +32 -0
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc6h_encode_block_mode11.js +346 -0
- package/src/shade/renderer/texture/encode/chunk_bc6h_pack_mode11.d.ts +10 -0
- package/src/shade/renderer/texture/encode/chunk_bc6h_pack_mode11.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc6h_pack_mode11.js +54 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts +36 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_encode_block_mode6.js +327 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts +22 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_bc7_pack_mode6.js +71 -0
- package/src/shade/renderer/texture/encode/chunk_texture_encode_level.d.ts +20 -0
- package/src/shade/renderer/texture/encode/chunk_texture_encode_level.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_texture_encode_level.js +73 -0
- package/src/shade/renderer/texture/encode/chunk_texture_encode_load_block.d.ts +16 -0
- package/src/shade/renderer/texture/encode/chunk_texture_encode_load_block.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/chunk_texture_encode_load_block.js +36 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_astc_4x4.d.ts +13 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_astc_4x4.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_astc_4x4.js +63 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc1.d.ts +12 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc1.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc1.js +60 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc4.d.ts +28 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc4.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc4.js +76 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc4_snorm.d.ts +16 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc4_snorm.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc4_snorm.js +64 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc5.d.ts +14 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc5.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc5.js +67 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc5_snorm.d.ts +10 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc5_snorm.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc5_snorm.js +63 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc6h.d.ts +12 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc6h.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc6h.js +62 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts +14 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/shader_texture_encode_bc7.js +58 -0
- package/src/shade/renderer/texture/encode/texture_encode.d.ts +84 -0
- package/src/shade/renderer/texture/encode/texture_encode.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/texture_encode.js +168 -0
- package/src/shade/renderer/texture/encode/texture_encode_layout.d.ts +196 -0
- package/src/shade/renderer/texture/encode/texture_encode_layout.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/texture_encode_layout.js +248 -0
- package/src/shade/renderer/texture/encode/texture_encode_resources.d.ts +15 -0
- package/src/shade/renderer/texture/encode/texture_encode_resources.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/texture_encode_resources.js +25 -0
- package/src/shade/renderer/texture/encode/texture_encode_shader.d.ts +30 -0
- package/src/shade/renderer/texture/encode/texture_encode_shader.d.ts.map +1 -0
- package/src/shade/renderer/texture/encode/texture_encode_shader.js +108 -0
- package/src/shade/renderer/texture/format/gpu_texture_compression_support.d.ts +3 -1
- package/src/shade/renderer/texture/format/gpu_texture_compression_support.d.ts.map +1 -1
- package/src/shade/renderer/texture/format/gpu_texture_compression_support.js +8 -25
- package/src/shade/renderer/texture/format/texture_format_from_shade_image.d.ts.map +1 -1
- package/src/shade/renderer/texture/format/texture_format_from_shade_image.js +26 -2
- package/src/shade/renderer/texture/source/texel_data_from_ktx2.d.ts +32 -0
- package/src/shade/renderer/texture/source/texel_data_from_ktx2.d.ts.map +1 -0
- package/src/shade/renderer/texture/source/texel_data_from_ktx2.js +48 -0
- package/src/shade/renderer/texture/texture_write_level.d.ts.map +1 -1
- package/src/shade/renderer/texture/texture_write_level.js +11 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +20 -0
- package/src/shade/renderer/volumetrics/NOTES.md +28 -0
- package/src/shade/renderer/volumetrics/taa/chunk_volumetric_history_bounding_box.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/taa/chunk_volumetric_history_bounding_box.js +7 -2
- package/src/shade/renderer/volumetrics/taa/chunk_volumetrics_taa_reproject.d.ts +17 -0
- package/src/shade/renderer/volumetrics/taa/chunk_volumetrics_taa_reproject.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/taa/chunk_volumetrics_taa_reproject.js +168 -0
- package/src/shade/renderer/volumetrics/taa/chunk_volumetrics_taa_resolve.d.ts +13 -0
- package/src/shade/renderer/volumetrics/taa/chunk_volumetrics_taa_resolve.d.ts.map +1 -0
- package/src/shade/renderer/volumetrics/taa/chunk_volumetrics_taa_resolve.js +56 -0
- package/src/shade/renderer/volumetrics/taa/shader_volumetrics_taa.d.ts.map +1 -1
- package/src/shade/renderer/volumetrics/taa/shader_volumetrics_taa.js +134 -334
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
- package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +49 -21
- package/src/avif/encode_image_source.d.ts +0 -70
- package/src/avif/encode_image_source.d.ts.map +0 -1
- package/src/avif/encode_image_source.js +0 -117
- package/src/avif/encoder_worker.d.ts.map +0 -1
- package/src/avif/index.d.ts +0 -5
- package/src/avif/index.d.ts.map +0 -1
- package/src/avif/index.js +0 -21
- package/src/avif/native/DECISIONS.md +0 -545
- package/src/avif/native/api/AvifDecoder.d.ts.map +0 -1
- package/src/avif/native/api/apply_transformations.d.ts.map +0 -1
- package/src/avif/native/api/avif_to_sampler2d.d.ts +0 -25
- package/src/avif/native/api/avif_to_sampler2d.d.ts.map +0 -1
- package/src/avif/native/api/avif_to_sampler2d.js +0 -42
- package/src/avif/native/api/convert_to_rgba.d.ts.map +0 -1
- package/src/avif/native/api/convert_to_rgba.js +0 -204
- package/src/avif/native/api/decode_avif.d.ts.map +0 -1
- package/src/avif/native/api/decode_image_item.d.ts.map +0 -1
- package/src/avif/native/api/encode_avif.d.ts.map +0 -1
- package/src/avif/native/api/sampler2d_to_avif.d.ts.map +0 -1
- package/src/avif/native/api/sampler2d_to_avif.js +0 -108
- package/src/avif/native/av1/decode/Av1FrameContext.d.ts.map +0 -1
- package/src/avif/native/av1/decode/block_decoded.d.ts.map +0 -1
- package/src/avif/native/av1/decode/decode_av1_still.d.ts.map +0 -1
- package/src/avif/native/av1/decode/decode_coefficients.d.ts.map +0 -1
- package/src/avif/native/av1/decode/decode_palette.d.ts.map +0 -1
- package/src/avif/native/av1/decode/decode_palette.js +0 -442
- package/src/avif/native/av1/decode/decode_tile.d.ts.map +0 -1
- package/src/avif/native/av1/decode/decode_tile.js +0 -1213
- package/src/avif/native/av1/decode/get_scan.d.ts.map +0 -1
- package/src/avif/native/av1/decode/read_lr.d.ts.map +0 -1
- package/src/avif/native/av1/decode/read_lr.js +0 -277
- package/src/avif/native/av1/decode/read_transform_type.d.ts.map +0 -1
- package/src/avif/native/av1/decode/read_transform_type.js +0 -92
- package/src/avif/native/av1/decode/reconstruct.d.ts.map +0 -1
- package/src/avif/native/av1/decode/reconstruct.js +0 -241
- package/src/avif/native/av1/decode/transform_type.d.ts.map +0 -1
- package/src/avif/native/av1/encode/Av1BlockSnapshot.d.ts.map +0 -1
- package/src/avif/native/av1/encode/Av1EncodeContext.d.ts.map +0 -1
- package/src/avif/native/av1/encode/build_headers.d.ts.map +0 -1
- package/src/avif/native/av1/encode/choose_chroma_alpha.d.ts.map +0 -1
- package/src/avif/native/av1/encode/choose_filters.d.ts.map +0 -1
- package/src/avif/native/av1/encode/choose_restoration.d.ts.map +0 -1
- package/src/avif/native/av1/encode/choose_restoration.js +0 -616
- package/src/avif/native/av1/encode/decode_effort.d.ts.map +0 -1
- package/src/avif/native/av1/encode/encode_av1_still.d.ts.map +0 -1
- package/src/avif/native/av1/encode/encode_effort.d.ts.map +0 -1
- package/src/avif/native/av1/encode/encode_tile.d.ts.map +0 -1
- package/src/avif/native/av1/encode/encode_tile.js +0 -2331
- package/src/avif/native/av1/encode/quantise.d.ts.map +0 -1
- package/src/avif/native/av1/encode/write_coefficients.d.ts.map +0 -1
- package/src/avif/native/av1/encode/write_lr.d.ts.map +0 -1
- package/src/avif/native/av1/encode/write_transform_type.d.ts.map +0 -1
- package/src/avif/native/av1/entropy/CdfContext.d.ts.map +0 -1
- package/src/avif/native/av1/entropy/SymbolReader.d.ts.map +0 -1
- package/src/avif/native/av1/entropy/SymbolWriter.d.ts.map +0 -1
- package/src/avif/native/av1/entropy/coefficient_context.d.ts.map +0 -1
- package/src/avif/native/av1/entropy/partition_cdf.d.ts.map +0 -1
- package/src/avif/native/av1/entropy/symbol_cost.d.ts.map +0 -1
- package/src/avif/native/av1/filter/cdef.d.ts.map +0 -1
- package/src/avif/native/av1/filter/cdef.js +0 -313
- package/src/avif/native/av1/filter/loop_filter.d.ts.map +0 -1
- package/src/avif/native/av1/filter/loop_filter.js +0 -377
- package/src/avif/native/av1/filter/loop_restoration.d.ts.map +0 -1
- package/src/avif/native/av1/filter/loop_restoration.js +0 -451
- package/src/avif/native/av1/filter/superres.d.ts.map +0 -1
- package/src/avif/native/av1/filter/superres.js +0 -86
- package/src/avif/native/av1/grain/FilmGrainState.d.ts.map +0 -1
- package/src/avif/native/av1/grain/film_grain.d.ts.map +0 -1
- package/src/avif/native/av1/grain/film_grain.js +0 -623
- package/src/avif/native/av1/obu/FrameHeader.d.ts.map +0 -1
- package/src/avif/native/av1/obu/ObuHeader.d.ts.map +0 -1
- package/src/avif/native/av1/obu/SequenceHeader.d.ts.map +0 -1
- package/src/avif/native/av1/obu/for_each_obu.d.ts.map +0 -1
- package/src/avif/native/av1/obu/parse_frame_header.d.ts.map +0 -1
- package/src/avif/native/av1/obu/parse_frame_header.js +0 -841
- package/src/avif/native/av1/obu/parse_obu_header.d.ts.map +0 -1
- package/src/avif/native/av1/obu/parse_sequence_header.d.ts.map +0 -1
- package/src/avif/native/av1/obu/write_frame_header.d.ts.map +0 -1
- package/src/avif/native/av1/obu/write_sequence_header.d.ts.map +0 -1
- package/src/avif/native/av1/predict/IntraPredictionState.d.ts.map +0 -1
- package/src/avif/native/av1/predict/intra_filter_type.d.ts.map +0 -1
- package/src/avif/native/av1/predict/predict_chroma_from_luma.d.ts.map +0 -1
- package/src/avif/native/av1/predict/predict_chroma_from_luma.js +0 -153
- package/src/avif/native/av1/predict/predict_intra.d.ts.map +0 -1
- package/src/avif/native/av1/predict/predict_intra.js +0 -803
- package/src/avif/native/av1/predict/predict_palette.d.ts.map +0 -1
- package/src/avif/native/av1/tables/av1_symbols.d.ts.map +0 -1
- package/src/avif/native/av1/tables/av1_symbols.js +0 -419
- package/src/avif/native/av1/tables/block_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/block_tables.js +0 -270
- package/src/avif/native/av1/tables/cdf_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/cdf_tables.js +0 -1893
- package/src/avif/native/av1/tables/coefficient_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/coefficient_tables.js +0 -82
- package/src/avif/native/av1/tables/derived_block_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/filter_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/filter_tables.js +0 -313
- package/src/avif/native/av1/tables/grain_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/grain_tables.js +0 -190
- package/src/avif/native/av1/tables/prediction_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/prediction_tables.js +0 -223
- package/src/avif/native/av1/tables/quantizer_matrix_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/quantizer_matrix_tables.js +0 -38
- package/src/avif/native/av1/tables/quantizer_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/quantizer_tables.js +0 -160
- package/src/avif/native/av1/tables/scan_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/scan_tables.js +0 -727
- package/src/avif/native/av1/tables/segmentation_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/segmentation_tables.js +0 -48
- package/src/avif/native/av1/tables/transform_tables.d.ts.map +0 -1
- package/src/avif/native/av1/tables/transform_tables.js +0 -140
- package/src/avif/native/av1/tables/unpack_table.d.ts.map +0 -1
- package/src/avif/native/av1/tables/unpack_table.js +0 -73
- package/src/avif/native/av1/transform/forward_transform_2d.d.ts.map +0 -1
- package/src/avif/native/av1/transform/inverse_transform_1d.d.ts.map +0 -1
- package/src/avif/native/av1/transform/inverse_transform_1d.js +0 -590
- package/src/avif/native/av1/transform/inverse_transform_2d.d.ts.map +0 -1
- package/src/avif/native/av1/transform/inverse_transform_2d.js +0 -180
- package/src/avif/native/av1/util/ceil_log2.d.ts.map +0 -1
- package/src/avif/native/av1/util/floor_log2.d.ts +0 -20
- package/src/avif/native/av1/util/floor_log2.d.ts.map +0 -1
- package/src/avif/native/av1/util/floor_log2.js +0 -20
- package/src/avif/native/av1/util/round2.d.ts.map +0 -1
- package/src/avif/native/av1/util/round2_signed.d.ts.map +0 -1
- package/src/avif/native/av1/util/tile_log2.d.ts.map +0 -1
- package/src/avif/native/bitstream/BitReader.d.ts.map +0 -1
- package/src/avif/native/bitstream/BitWriter.d.ts.map +0 -1
- package/src/avif/native/color/ColourTransform.d.ts.map +0 -1
- package/src/avif/native/color/YuvImage.d.ts.map +0 -1
- package/src/avif/native/color/clamp_sample.d.ts.map +0 -1
- package/src/avif/native/color/linear_to_transfer.d.ts.map +0 -1
- package/src/avif/native/color/linear_to_transfer.js +0 -126
- package/src/avif/native/color/primaries.d.ts.map +0 -1
- package/src/avif/native/color/rgb_row_to_ycbcr.d.ts.map +0 -1
- package/src/avif/native/color/transfer_to_linear.d.ts.map +0 -1
- package/src/avif/native/color/transfer_to_linear.js +0 -171
- package/src/avif/native/color/upsample_chroma_row.d.ts.map +0 -1
- package/src/avif/native/color/upsample_chroma_row.js +0 -89
- package/src/avif/native/color/ycbcr_row_to_rgb.d.ts.map +0 -1
- package/src/avif/native/color/ycbcr_row_to_rgb.js +0 -78
- package/src/avif/native/heif/AvifFile.d.ts.map +0 -1
- package/src/avif/native/heif/ItemProperty.d.ts.map +0 -1
- package/src/avif/native/heif/find_item_property.d.ts.map +0 -1
- package/src/avif/native/heif/find_item_references.d.ts.map +0 -1
- package/src/avif/native/heif/find_items_referencing.d.ts.map +0 -1
- package/src/avif/native/heif/parse_avif_file.d.ts.map +0 -1
- package/src/avif/native/heif/parse_avif_file.js +0 -384
- package/src/avif/native/heif/parse_image_grid.d.ts.map +0 -1
- package/src/avif/native/heif/parse_image_grid.js +0 -49
- package/src/avif/native/heif/parse_item_property.d.ts.map +0 -1
- package/src/avif/native/heif/read_item_data.d.ts.map +0 -1
- package/src/avif/native/heif/write_avif_file.d.ts.map +0 -1
- package/src/avif/native/heif/write_item_property.d.ts.map +0 -1
- package/src/avif/native/index.d.ts +0 -14
- package/src/avif/native/index.d.ts.map +0 -1
- package/src/avif/native/index.js +0 -56
- package/src/avif/native/isobmff/BoxHeader.d.ts.map +0 -1
- package/src/avif/native/isobmff/BoxWriter.d.ts +0 -118
- package/src/avif/native/isobmff/BoxWriter.d.ts.map +0 -1
- package/src/avif/native/isobmff/BoxWriter.js +0 -264
- package/src/avif/native/isobmff/for_each_box.d.ts.map +0 -1
- package/src/avif/native/isobmff/read_box_header.d.ts.map +0 -1
- package/src/avif/native/isobmff/read_full_box_header.d.ts.map +0 -1
- package/src/avif/threaded_image_encoder.d.ts.map +0 -1
- package/src/basis/BasisBitReader.d.ts +0 -77
- package/src/basis/BasisBitReader.d.ts.map +0 -1
- package/src/basis/BasisBitReader.js +0 -231
- package/src/basis/BasisHuffmanTable.d.ts.map +0 -1
- package/src/basis/basis_read_huffman_table.d.ts.map +0 -1
- package/src/basis/etc1s/Etc1sSelectorHistory.d.ts.map +0 -1
- package/src/basis/etc1s/etc1s_block_colors.d.ts.map +0 -1
- package/src/basis/etc1s/etc1s_decode_slice.d.ts.map +0 -1
- package/src/basis/etc1s/etc1s_decode_slice.js +0 -258
- package/src/basis/etc1s/etc1s_read_endpoint_codebook.d.ts.map +0 -1
- package/src/basis/etc1s/etc1s_read_selector_codebook.d.ts.map +0 -1
- package/src/basis/etc1s/etc1s_read_slice_tables.d.ts.map +0 -1
- package/src/basis/transcode/etc1s_to_bc1.d.ts +0 -24
- package/src/basis/transcode/etc1s_to_bc1.d.ts.map +0 -1
- package/src/basis/transcode/etc1s_to_bc1.js +0 -205
- package/src/basis/transcode/etc1s_to_bc7.d.ts +0 -30
- package/src/basis/transcode/etc1s_to_bc7.d.ts.map +0 -1
- package/src/basis/transcode/fit_endpoints.d.ts +0 -59
- package/src/basis/transcode/fit_endpoints.d.ts.map +0 -1
- package/src/basis/transcode/fit_endpoints.js +0 -226
- package/src/engine/asset/loaders/gltf/computeObjectBoundingSphere.d.ts +0 -8
- package/src/engine/asset/loaders/gltf/computeObjectBoundingSphere.d.ts.map +0 -1
- package/src/engine/asset/loaders/gltf/computeObjectBoundingSphere.js +0 -70
- package/src/engine/asset/loaders/gltf/isMesh.d.ts +0 -7
- package/src/engine/asset/loaders/gltf/isMesh.d.ts.map +0 -1
- package/src/engine/asset/loaders/gltf/isMesh.js +0 -8
- package/src/engine/asset/loaders/image/jpeg/JpegFrame.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/JpegFrameComponent.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/JpegImage.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/JpegImage.js +0 -664
- package/src/engine/asset/loaders/image/jpeg/buildComponentData.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/buildHuffmanTable.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/decodeScan.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/idct8x8_float.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/idct8x8_float.js +0 -31
- package/src/engine/asset/loaders/image/jpeg/jpeg_component_row.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/jpeg/jpeg_decode.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/PNG.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts +0 -158
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/PNGReader.js +0 -656
- package/src/engine/asset/loaders/image/png/PNG_HEADER_BYTES.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_iTXt.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_iTXt.js +0 -53
- package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_zTXt.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/chunk/png_chunk_decode_zTXt.js +0 -42
- package/src/engine/asset/loaders/image/png/crc32.d.ts +0 -2
- package/src/engine/asset/loaders/image/png/crc32.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/crc32.js +0 -8
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterAverage.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterPaeth.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterSub.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterUp.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/filter/png_unfilter.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/filter/png_unfilter.js +0 -68
- package/src/engine/asset/loaders/image/png/png_inflate.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/png_unpack_samples.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/prototypePNG.d.ts.map +0 -1
- package/src/engine/asset/loaders/image/png/prototypePNG.js +0 -37
- package/src/ktx2/KTX2_IDENTIFIER.d.ts.map +0 -1
- package/src/ktx2/KhrDfModel.d.ts.map +0 -1
- package/src/ktx2/SupercompressionScheme.d.ts.map +0 -1
- package/src/ktx2/ktx2_read.d.ts +0 -71
- package/src/ktx2/ktx2_read.d.ts.map +0 -1
- package/src/ktx2/ktx2_read.js +0 -581
- package/src/ktx2/ktx2_read_basis_lz_global_data.d.ts +0 -27
- package/src/ktx2/ktx2_read_basis_lz_global_data.d.ts.map +0 -1
- package/src/ktx2/ktx2_read_basis_lz_global_data.js +0 -189
- package/src/ktx2/vk_format_to_texture_format.d.ts +0 -55
- package/src/ktx2/vk_format_to_texture_format.d.ts.map +0 -1
- package/src/ktx2/vk_format_to_texture_format.js +0 -290
- package/src/shade/renderer/geometry/bvh/record_blas_refit.d.ts +0 -25
- package/src/shade/renderer/geometry/bvh/record_blas_refit.d.ts.map +0 -1
- package/src/shade/renderer/geometry/bvh/record_blas_refit.js +0 -102
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_leaf_bounds.d.ts +0 -30
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_leaf_bounds.d.ts.map +0 -1
- package/src/shade/renderer/geometry/bvh/shader_blas_refit_leaf_bounds.js +0 -125
- package/src/shade/renderer/loader/gltf/GLTF_PRIMITIVE_MODE.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/MESHOPT_COMPRESSION_PLAN.md +0 -793
- package/src/shade/renderer/loader/gltf/coalesce_array_duplicates.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/GltfBufferViewExtension.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/GltfBufferViewExtensionSet.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/GltfBufferViewExtensionSet.js +0 -109
- package/src/shade/renderer/loader/gltf/ext/gltf_apply_buffer_view_extensions.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/gltf_buffer_view_extensions.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/gltf_geometry_extensions.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/meshopt/MeshoptBufferViewExtension.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/ext/meshopt/MeshoptBufferViewExtension.js +0 -301
- package/src/shade/renderer/loader/gltf/gltf_component_type.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/gltf_node_world_matrices.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/gltf_node_world_matrices.js +0 -137
- package/src/shade/renderer/loader/gltf/gltf_parse_container.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/gltf_read_accessor.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/gltf_read_accessor.js +0 -294
- package/src/shade/renderer/loader/gltf/gltf_used_image_indices.d.ts +0 -25
- package/src/shade/renderer/loader/gltf/gltf_used_image_indices.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/gltf_used_image_indices.js +0 -49
- package/src/shade/renderer/loader/usd/UsdError.d.ts.map +0 -1
- package/src/shade/renderer/loader/usd/parse_usda.d.ts.map +0 -1
- package/src/shade/renderer/loader/usd/unpack_usdz.d.ts.map +0 -1
- package/src/shade/renderer/loader/usd/unpack_usdz.js +0 -106
- package/src/shade/renderer/loader/usd/usd_compose_transform.d.ts.map +0 -1
- package/src/shade/renderer/loader/usd/usd_compose_transform.js +0 -258
- package/src/shade/renderer/loader/usd/usd_lz4.d.ts.map +0 -1
- package/src/shade/renderer/loader/usd/usd_lz4.js +0 -182
- package/src/shade/renderer/loader/usd/usd_triangulate.d.ts.map +0 -1
- package/src/shade/renderer/postprocess/taa/chunk_taa_sample_history_color.d.ts +0 -2
- package/src/shade/renderer/postprocess/taa/chunk_taa_sample_history_color.d.ts.map +0 -1
- package/src/shade/renderer/postprocess/taa/chunk_taa_sample_history_color.js +0 -43
- package/src/shade/renderer/scene/optimization/sampler2d_compare.d.ts.map +0 -1
- package/src/shade/renderer/scene/optimization/sampler2d_compare.js +0 -94
- /package/src/{avif → engine/asset/loaders/image/avif}/encoder_worker.d.ts +0 -0
- /package/src/{avif → engine/asset/loaders/image/avif}/encoder_worker.js +0 -0
- /package/src/{avif → engine/asset/loaders/image/avif}/threaded_image_encoder.d.ts +0 -0
- /package/src/{avif → engine/asset/loaders/image/avif}/threaded_image_encoder.js +0 -0
- /package/src/engine/asset/loaders/image/{png/prototypePNG.d.ts → prototypePNG.d.ts} +0 -0
- /package/src/{shade/renderer/scene/optimization → engine/graphics/texture/sampler/compare}/sampler2d_compare.d.ts +0 -0
- /package/src/{avif/native/api → engine/graphics/texture/sampler}/sampler2d_to_avif.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/NOTICE.md +0 -0
- /package/src/{avif/native → format/image/avif}/api/AvifDecoder.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/api/AvifDecoder.js +0 -0
- /package/src/{avif/native → format/image/avif}/api/apply_transformations.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/api/apply_transformations.js +0 -0
- /package/src/{avif/native → format/image/avif}/api/convert_to_rgba.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/api/decode_avif.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/api/decode_avif.js +0 -0
- /package/src/{avif/native → format/image/avif}/api/decode_image_item.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/api/decode_image_item.js +0 -0
- /package/src/{avif/native → format/image/avif}/api/encode_avif.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/api/encode_avif.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/Av1FrameContext.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/Av1FrameContext.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/block_decoded.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/block_decoded.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/decode_av1_still.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/decode_av1_still.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/decode_coefficients.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/decode_coefficients.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/decode_palette.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/decode_tile.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/get_scan.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/get_scan.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/read_lr.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/read_transform_type.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/reconstruct.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/transform_type.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/decode/transform_type.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/Av1BlockSnapshot.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/Av1BlockSnapshot.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/Av1EncodeContext.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/Av1EncodeContext.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/build_headers.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/build_headers.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/choose_chroma_alpha.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/choose_chroma_alpha.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/choose_filters.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/choose_filters.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/choose_restoration.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/decode_effort.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/decode_effort.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/encode_av1_still.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/encode_av1_still.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/encode_effort.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/encode_effort.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/encode_tile.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/quantise.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/quantise.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/write_coefficients.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/write_coefficients.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/write_lr.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/write_lr.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/write_transform_type.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/encode/write_transform_type.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/CdfContext.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/CdfContext.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/SymbolReader.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/SymbolReader.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/SymbolWriter.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/SymbolWriter.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/coefficient_context.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/coefficient_context.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/partition_cdf.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/partition_cdf.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/symbol_cost.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/entropy/symbol_cost.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/filter/cdef.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/filter/loop_filter.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/filter/loop_restoration.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/filter/superres.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/grain/FilmGrainState.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/grain/FilmGrainState.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/grain/film_grain.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/FrameHeader.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/FrameHeader.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/ObuHeader.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/ObuHeader.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/SequenceHeader.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/SequenceHeader.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/for_each_obu.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/for_each_obu.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/parse_frame_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/parse_obu_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/parse_obu_header.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/parse_sequence_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/parse_sequence_header.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/write_frame_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/write_frame_header.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/write_sequence_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/obu/write_sequence_header.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/IntraPredictionState.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/IntraPredictionState.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/intra_filter_type.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/intra_filter_type.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/predict_chroma_from_luma.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/predict_intra.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/predict_palette.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/predict/predict_palette.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/av1_symbols.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/block_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/cdf_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/coefficient_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/derived_block_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/derived_block_tables.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/filter_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/grain_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/prediction_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/quantizer_matrix_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/quantizer_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/scan_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/segmentation_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/transform_tables.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/tables/unpack_table.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/transform/forward_transform_2d.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/transform/forward_transform_2d.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/transform/inverse_transform_1d.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/transform/inverse_transform_2d.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/ceil_log2.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/ceil_log2.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/round2.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/round2.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/round2_signed.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/round2_signed.js +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/tile_log2.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/av1/util/tile_log2.js +0 -0
- /package/src/{avif/native → format/image/avif}/bitstream/BitReader.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/bitstream/BitReader.js +0 -0
- /package/src/{avif/native → format/image/avif}/bitstream/BitWriter.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/bitstream/BitWriter.js +0 -0
- /package/src/{avif/native → format/image/avif}/color/ColourTransform.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/ColourTransform.js +0 -0
- /package/src/{avif/native → format/image/avif}/color/YuvImage.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/YuvImage.js +0 -0
- /package/src/{avif/native → format/image/avif}/color/clamp_sample.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/clamp_sample.js +0 -0
- /package/src/{avif/native → format/image/avif}/color/linear_to_transfer.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/primaries.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/primaries.js +0 -0
- /package/src/{avif/native → format/image/avif}/color/rgb_row_to_ycbcr.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/rgb_row_to_ycbcr.js +0 -0
- /package/src/{avif/native → format/image/avif}/color/transfer_to_linear.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/upsample_chroma_row.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/color/ycbcr_row_to_rgb.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/AvifFile.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/AvifFile.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/ItemProperty.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/ItemProperty.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/find_item_property.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/find_item_property.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/find_item_references.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/find_item_references.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/find_items_referencing.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/find_items_referencing.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/parse_avif_file.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/parse_image_grid.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/parse_item_property.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/parse_item_property.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/read_item_data.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/read_item_data.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/write_avif_file.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/write_avif_file.js +0 -0
- /package/src/{avif/native → format/image/avif}/heif/write_item_property.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/heif/write_item_property.js +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/BoxHeader.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/BoxHeader.js +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/for_each_box.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/for_each_box.js +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/read_box_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/read_box_header.js +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/read_full_box_header.d.ts +0 -0
- /package/src/{avif/native → format/image/avif}/isobmff/read_full_box_header.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/JpegFrame.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/JpegFrame.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/JpegFrameComponent.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/JpegFrameComponent.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/JpegImage.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/NOTES.md +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/buildComponentData.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/buildComponentData.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/buildHuffmanTable.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/buildHuffmanTable.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/decodeScan.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/decodeScan.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/idct8x8_float.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/jpeg_component_row.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/jpeg_component_row.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/jpeg_decode.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/jpeg/jpeg_decode.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/PNG.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/PNG.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/PNG_HEADER_BYTES.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/PNG_HEADER_BYTES.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/chunk/png_chunk_decode_iTXt.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/chunk/png_chunk_decode_zTXt.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterAverage.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterAverage.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterNone.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterNone.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterPaeth.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterPaeth.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterSub.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterSub.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterUp.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_filter_unFilterUp.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/filter/png_unfilter.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/png_inflate.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/png_inflate.js +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/png_unpack_samples.d.ts +0 -0
- /package/src/{engine/asset/loaders → format}/image/png/png_unpack_samples.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/GLTF_PRIMITIVE_MODE.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/GLTF_PRIMITIVE_MODE.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/coalesce_array_duplicates.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/coalesce_array_duplicates.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/GltfBufferViewExtension.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/GltfBufferViewExtension.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/GltfBufferViewExtensionSet.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/gltf_apply_buffer_view_extensions.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/gltf_apply_buffer_view_extensions.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/gltf_buffer_view_extensions.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/gltf_buffer_view_extensions.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/gltf_geometry_extensions.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/gltf_geometry_extensions.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/ext/meshopt/MeshoptBufferViewExtension.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/gltf_component_type.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/gltf_component_type.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/gltf_node_world_matrices.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/gltf_parse_container.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/gltf_parse_container.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/gltf/gltf_read_accessor.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/UsdError.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/UsdError.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/parse_usda.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/parse_usda.js +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/unpack_usdz.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/usd_compose_transform.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/usd_lz4.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/usd_triangulate.d.ts +0 -0
- /package/src/{shade/renderer/loader → format/scene}/usd/usd_triangulate.js +0 -0
- /package/src/{basis → format/texture/basis}/BasisHuffmanTable.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/BasisHuffmanTable.js +0 -0
- /package/src/{basis → format/texture/basis}/basis_read_huffman_table.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/basis_read_huffman_table.js +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/Etc1sSelectorHistory.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/Etc1sSelectorHistory.js +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_block_colors.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_block_colors.js +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_decode_slice.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_read_endpoint_codebook.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_read_endpoint_codebook.js +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_read_selector_codebook.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_read_selector_codebook.js +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_read_slice_tables.d.ts +0 -0
- /package/src/{basis → format/texture/basis}/etc1s/etc1s_read_slice_tables.js +0 -0
- /package/src/{basis → format/texture/basis}/transcode/build_range_plan.js +0 -0
- /package/src/{basis → format/texture/basis}/transcode/etc1s_to_bc7.js +0 -0
- /package/src/{ktx2 → format/texture/ktx2}/KTX2_IDENTIFIER.d.ts +0 -0
- /package/src/{ktx2 → format/texture/ktx2}/KTX2_IDENTIFIER.js +0 -0
- /package/src/{ktx2 → format/texture/ktx2}/KhrDfModel.d.ts +0 -0
- /package/src/{ktx2 → format/texture/ktx2}/KhrDfModel.js +0 -0
- /package/src/{ktx2 → format/texture/ktx2}/SupercompressionScheme.d.ts +0 -0
- /package/src/{ktx2 → format/texture/ktx2}/SupercompressionScheme.js +0 -0
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
# Batched BLAS refit — one refit per frame, not one per tree
|
|
2
|
+
|
|
3
|
+
> Status: **LANDED, VERIFIED ON DEVICE, REVIEWED TWICE** — 2026-09-02. `490907338` (this plan),
|
|
4
|
+
> `c52ef1691` (P1, the climb chunk), `f42851a62` (P2, residency version and guard), `36d4796df`
|
|
5
|
+
> (P3, the batch), `46ba62862` (P4, the switch and the deletions), `1c04040bd`, `d62a17ffe`,
|
|
6
|
+
> `8377a3de0`, `40066161b` and `f5d343f40` (what the device session turned up, §7). P5: `verify()`
|
|
7
|
+
> and `verify_leaves()` pass on an NVIDIA RTX 4090 at 256 dancers, the batch running as two
|
|
8
|
+
> dispatch pages — §4. An adversarial review against the code preceded the work (twelve findings,
|
|
9
|
+
> none blocking) and a second one followed the landing (thirteen, none blocking); both are folded
|
|
10
|
+
> in below, with §7 as the ledger. §8 is the risk register. Deviations while landing are marked
|
|
11
|
+
> **[deviation]**.
|
|
12
|
+
>
|
|
13
|
+
> Goal: the per-frame refit of every skinned clone's BLAS records a fixed number of commands, whatever
|
|
14
|
+
> the number of skinned meshes — one transient buffer, one clear, one to three dispatches — and the
|
|
15
|
+
> host does no per-tree work in steady state. Today it records two passes and a clear *per tree*, from
|
|
16
|
+
> a CPU loop, which is the opposite of what the engine's GPU-driven frame is meant to look like and
|
|
17
|
+
> becomes the frame's bottleneck somewhere in the low hundreds of characters.
|
|
18
|
+
>
|
|
19
|
+
> Scope: the skinned-clone refit that phase 3a of `GPU_BVH_BUILD_PLAN.md` landed. Full builds, the
|
|
20
|
+
> TLAS, and non-skinning deformers are out of scope, though §3 keeps the door open for the last.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. The problem
|
|
25
|
+
|
|
26
|
+
`GPUMeshSkinningContext#record_blas_refits` (`animation/skinning/GPUMeshSkinningContext.js`) walks
|
|
27
|
+
its binding list and calls `record_blas_refit` (`geometry/bvh/record_blas_refit.js`) once per bound
|
|
28
|
+
mesh. Each call:
|
|
29
|
+
|
|
30
|
+
1. asks the manager where the tree lives (`GPUGeometryBVHManager#get_refit_target`),
|
|
31
|
+
2. dispatches `shader_blas_refit_leaf_bounds` over the tree's leaves,
|
|
32
|
+
3. allocates a transient counters buffer sized to the tree's node count and clears it,
|
|
33
|
+
4. dispatches `shader_bvh_refit` over the same leaves to climb.
|
|
34
|
+
|
|
35
|
+
Every `ComputeShader#dispatch` in this engine is its own compute pass — `constructComputePass`
|
|
36
|
+
begins a pass, sets the pipeline, resolves and sets the bind group, writes immediates, dispatches,
|
|
37
|
+
ends: eight encoder calls per dispatch, one more for the clear, seventeen per tree, plus the
|
|
38
|
+
bind-group descriptor hashing behind them and the transient allocation, which is host work rather
|
|
39
|
+
than an encoder call. On the GPU it is two pass boundaries per tree, each of which orders every
|
|
40
|
+
earlier write to the shared node arena before anything later can start.
|
|
41
|
+
|
|
42
|
+
| per frame, `N` skinned meshes | today |
|
|
43
|
+
|---|---|
|
|
44
|
+
| compute passes | `2N` |
|
|
45
|
+
| buffer clears | `N` |
|
|
46
|
+
| transient allocations | `N` |
|
|
47
|
+
| encoder calls, `N = 300` | ~5,100 |
|
|
48
|
+
| host work | `O(N)`, every frame |
|
|
49
|
+
|
|
50
|
+
The GPU side is the worse half. The trees are independent but never overlap: pass boundaries
|
|
51
|
+
serialise them, and each boundary drains the pipeline. The leaf pass over the playground character
|
|
52
|
+
(28,106 leaves, 440 workgroups of 64) fills a large GPU for a moment; the climb does not. It is a
|
|
53
|
+
chain of dependent atomics as long as the tree is deep, and half the live threads exit at every
|
|
54
|
+
level, so most of a climb is a long tail with the machine nearly idle. Serialising `N` of those
|
|
55
|
+
tails is what a loop of per-tree dispatches costs, and the cost grows linearly in `N` no matter how
|
|
56
|
+
small each tree is.
|
|
57
|
+
|
|
58
|
+
"GPU-driven" here has a precise meaning, and it is not indirect dispatch. The workgroup count is a
|
|
59
|
+
host-known function of the trees in the batch, so an indirect argument would buy nothing. What
|
|
60
|
+
matters is that the command count is independent of `N`, that the host touches the per-tree data
|
|
61
|
+
only when the set of trees changes or a tree's residency changes, and that the GPU sees one flat
|
|
62
|
+
workload with every tree's leaves in it, so a small tree's climb overlaps the next tree's instead of
|
|
63
|
+
waiting on a barrier.
|
|
64
|
+
|
|
65
|
+
## 2. What already exists
|
|
66
|
+
|
|
67
|
+
Everything the batch needs is in the tree; this is a rearrangement, not new machinery.
|
|
68
|
+
|
|
69
|
+
- **The climb.** `gpu_primitive/bvh/shader_bvh_refit.js` — the arrival-counter climb, all
|
|
70
|
+
communicated words through `array<atomic<u32>>`, losers exit, no spin. Pass 4 of the LBVH build
|
|
71
|
+
and the second half of today's refit. Its per-tree offsets (`node_word_offset`,
|
|
72
|
+
`parents_offset`, `leaf_nodes_offset`) already exist precisely so that one kernel can serve a
|
|
73
|
+
tree that owns its buffer and a tree that is a tenant in an arena.
|
|
74
|
+
- **The leaf box.** `chunk_geometry_read_triangle_bounds` reads the triangle a leaf's `child_2`
|
|
75
|
+
names and returns its AABB; it has its own emulator tests in `blas_refit_leaf_bounds.spec.js`.
|
|
76
|
+
The leaf kernel around it is a read, a call, and six stores.
|
|
77
|
+
- **The arenas.** `GPUGeometryBVHManager` keeps every tree's nodes in one buffer and every distinct
|
|
78
|
+
shape's parents and leaf list in two more, and `get_refit_target(owner)` returns all five numbers
|
|
79
|
+
a refit needs for one tree, or `undefined` while it is not resident.
|
|
80
|
+
- **The flat-dispatch idiom.** The skinning pass dispatches one workgroup per `(binding, meshlet)`
|
|
81
|
+
pair through a host-built `dispatch_lookup` table, and paginates past
|
|
82
|
+
`maxComputeWorkgroupsPerDimension` with a `dispatch_offset` immediate. The bounds-refresh chain
|
|
83
|
+
reuses the same table for its scatter and reduce passes. This is the shape the refit takes.
|
|
84
|
+
- **Immediates.** `ShaderResourceSetDescriptor#setImmediate` carries a small per-dispatch struct or
|
|
85
|
+
a single `u32` without a buffer, capped at 64 bytes, which is how both refit kernels already take
|
|
86
|
+
their settings.
|
|
87
|
+
- **The tiers.** The emulator runs the climb's atomics sequentially (`blas_refit_containment.spec.js`
|
|
88
|
+
drives both current kernels through it, one invocation at a time, and checks the bytes against
|
|
89
|
+
CPU oracles in `bvh2_check_bounds.js`); entry parameters arrive in declaration order, so a
|
|
90
|
+
kernel on `workgroup_id` and `local_invocation_id` is driven as `dispatch([wg,0,0], [lane,0,0])`;
|
|
91
|
+
an immediate is supplied as a binding of the same name; a struct array is an array of objects.
|
|
92
|
+
`SoftwareGPUDevice` records passes, dispatches, bind groups, group counts, immediates and
|
|
93
|
+
host-written bytes. It takes `requiredLimits` — lowered only: it refuses to report a limit above
|
|
94
|
+
the spec default — and it enforces neither the storage-buffer budget nor the workgroup cap, so a
|
|
95
|
+
spec can set `maxComputeWorkgroupsPerDimension: 4` and watch the pagination happen, and must
|
|
96
|
+
assert the budget and the cap itself. `src/shade/playground/skinned_blas_refit/` is the device
|
|
97
|
+
tier, with `verify()` holding the refit's root box bit-equal to the bounds chain's independent
|
|
98
|
+
box, and `verify_leaves()` holding every leaf's box to its triangle.
|
|
99
|
+
|
|
100
|
+
## 3. Design
|
|
101
|
+
|
|
102
|
+
### 3.1 Data
|
|
103
|
+
|
|
104
|
+
Three tables, two of them persistent and rebuilt only when the batch changes, one transient.
|
|
105
|
+
|
|
106
|
+
**Target rows** — one per tree in the batch, `BLAS_REFIT_TARGET_STRUCT`, 24 bytes:
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
export const BLAS_REFIT_TARGET_STRUCT = WebGPUStruct.from({
|
|
110
|
+
// u32 word this tree's node 0 starts at in the node arena — what `get_refit_target` returns
|
|
111
|
+
node_word_offset: u32,
|
|
112
|
+
// this tree's parents in the parents arena, its leaf list in the leaf-node arena
|
|
113
|
+
parents_offset: u32,
|
|
114
|
+
leaf_nodes_offset: u32,
|
|
115
|
+
leaf_count: u32,
|
|
116
|
+
// this tree's arrival counters, in the batch's counters buffer — a prefix sum of node counts
|
|
117
|
+
counters_offset: u32,
|
|
118
|
+
// geometry row whose meshlets the leaf payloads index; for a clone, the clone's own row
|
|
119
|
+
geometry_index: u32,
|
|
120
|
+
}, "BlasRefitTarget");
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Workgroup lookup** — one `(target_index, leaf_base)` pair of `u32` per workgroup, across every
|
|
124
|
+
tree in the batch. Tree `t` contributes `ceil(leaf_count_t / 64)` consecutive entries with
|
|
125
|
+
`leaf_base = 0, 64, 128, …`. A workgroup serves one tree and one aligned run of its leaves, so the
|
|
126
|
+
target row is a workgroup-uniform read and the leaf-list read is coalesced. The tail workgroup of a
|
|
127
|
+
tree idles at most 63 lanes; at 440 workgroups per tree that is nothing.
|
|
128
|
+
|
|
129
|
+
**Counters** — one transient `array<atomic<u32>>`, `Σ node_count` words, each tree at its
|
|
130
|
+
`counters_offset`. Sized by node rather than by leaf for the reason today's single-tree buffer is:
|
|
131
|
+
counters are indexed by node id, and a tree read off an arena numbers its nodes with the free
|
|
132
|
+
list's holes in. One `clearBuffer` covers all of them.
|
|
133
|
+
|
|
134
|
+
### 3.2 The kernel
|
|
135
|
+
|
|
136
|
+
One fused kernel, `shader_blas_refit_batch` (`geometry/bvh/shader_blas_refit_batch.js`, label
|
|
137
|
+
`BLAS/RefitBatch`), workgroup size 64. Each lane finds its tree and leaf through the lookup, writes
|
|
138
|
+
that leaf's box, then climbs:
|
|
139
|
+
|
|
140
|
+
```wgsl
|
|
141
|
+
@compute @workgroup_size(64, 1, 1)
|
|
142
|
+
fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid: vec3<u32>) {
|
|
143
|
+
// `dispatch_offset` is the immediate: workgroups already covered by earlier sub-dispatches
|
|
144
|
+
let pair = (wg.x + dispatch_offset) * 2u;
|
|
145
|
+
let target = targets[lookup[pair]];
|
|
146
|
+
let leaf = lookup[pair + 1u] + lid.x;
|
|
147
|
+
|
|
148
|
+
if (leaf >= target.leaf_count) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
let leaf_node = leaf_nodes[target.leaf_nodes_offset + leaf];
|
|
153
|
+
let leaf_word = target.node_word_offset + leaf_node * BVH_NODE_STRIDE;
|
|
154
|
+
|
|
155
|
+
// the leaf already says which triangle it holds
|
|
156
|
+
let payload = atomicLoad(&nodes[leaf_word + BVH_NODE_CHILD_2]);
|
|
157
|
+
let box = geometry_read_triangle_bounds(geometries[target.geometry_index], payload);
|
|
158
|
+
|
|
159
|
+
bvh_node_store_bounds(leaf_word, box.min, box.max);
|
|
160
|
+
bvh_refit_climb(target.node_word_offset, target.parents_offset, target.counters_offset, leaf_node);
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The climb is not a second copy of `shader_bvh_refit`'s loop. It is lifted first, as its own
|
|
165
|
+
no-behaviour-change commit (§6, P1), into `chunk_bvh_refit_climb` beside that kernel:
|
|
166
|
+
|
|
167
|
+
```wgsl
|
|
168
|
+
// Assumes module-scope bindings named `parents` (u32), `counters` and `nodes` (atomic<u32>) —
|
|
169
|
+
// the same convention by which read_meshlet_triangle_bounds assumes `meshlet_metadata`.
|
|
170
|
+
fn bvh_node_store_bounds(node_word: u32, low: vec3<f32>, high: vec3<f32>) { /* six atomicStore */ }
|
|
171
|
+
|
|
172
|
+
fn bvh_refit_climb(node_word_offset: u32, parents_offset: u32, counters_offset: u32, leaf_node: u32) {
|
|
173
|
+
var node = parents[parents_offset + leaf_node];
|
|
174
|
+
loop {
|
|
175
|
+
if (node == BVH_NULL_NODE) { break; } // past the root
|
|
176
|
+
let arrivals = atomicAdd(&counters[counters_offset + node], 1u);
|
|
177
|
+
if (arrivals == 0u) { break; } // first arrival exits
|
|
178
|
+
// second arrival: both children are written; fit this node from them and continue
|
|
179
|
+
...
|
|
180
|
+
node = parents[parents_offset + node];
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`shader_bvh_refit` then becomes a guard and a call — `bvh_refit_climb(settings.node_word_offset,
|
|
186
|
+
settings.parents_offset, 0u, leaf_nodes[settings.leaf_nodes_offset + i])` — and the LBVH build is
|
|
187
|
+
untouched in behaviour. The node-layout constants the chunk needs (`BVH_NODE_STRIDE`,
|
|
188
|
+
`BVH_NODE_BOUNDS`, `BVH_NODE_CHILD_1`, `BVH_NODE_CHILD_2`) move into a `BVH_NODE_LAYOUT_DEFINITION`
|
|
189
|
+
chunk in `gpu_primitive/bvh/`, beside `BVH_BUFFER_LAYOUT.js` it is generated from and the climb
|
|
190
|
+
chunk that needs it, in the style of `BVH_NULL_NODE_DEFINITION`. The `BVH_` prefix is what keeps
|
|
191
|
+
them clear of the unprefixed `NODE_*` copies in `shader_bvh_refit`, `shader_bvh_emit_hierarchy`
|
|
192
|
+
and the playground's audit kernels; the kernels that import the climb drop their local copies,
|
|
193
|
+
because a module-scope `const` declared twice is a WGSL error, and tier 1 is what catches it.
|
|
194
|
+
|
|
195
|
+
Resources, all storage: `targets`, `lookup`, `leaf_nodes`, `parents` read-only; `counters` and
|
|
196
|
+
`nodes` read-write and atomic; `geometries`, `meshlet_metadata`, `meshlet_data` read-only. That is
|
|
197
|
+
**nine storage buffers in one stage**. The engine requests ten (`Renderer.js`,
|
|
198
|
+
`maxStorageBuffersPerShaderStage: 10`) and `gpu_primitive/test/gpu_test.js` refuses an adapter with
|
|
199
|
+
fewer, so the budget holds with one to spare. No device-free tier can see it — the software device
|
|
200
|
+
neither counts storage buffers per stage nor accepts a limit above the spec default of eight — so
|
|
201
|
+
the batch kernel's spec asserts the count its descriptor declares against the engine's floor (§5).
|
|
202
|
+
If the budget ever tightens, the row can carry `meshlets_address` instead of `geometry_index` (it
|
|
203
|
+
is `metadata.meshlets.metadata.offset`, the same number the skinning binding already caches) and
|
|
204
|
+
`geometries` drops out; not done now, because reading through the geometry row is what keeps
|
|
205
|
+
`chunk_geometry_read_triangle_bounds` and its tests untouched.
|
|
206
|
+
|
|
207
|
+
No barriers, no workgroup memory. Subgroup ops are baseline in this engine and are used where they
|
|
208
|
+
pay; the one place in a refit where they might is the bottom of the climb. `bvh2_derive_topology`
|
|
209
|
+
lists leaves in pre-order, so two sibling leaves sit in adjacent lanes, and their parent — roughly
|
|
210
|
+
half of all the handshakes — could be fitted from a shuffle without the counter round trip. That is
|
|
211
|
+
a measured optimisation, not a design input: §9 records it behind P5's profile.
|
|
212
|
+
|
|
213
|
+
### 3.3 The recorder
|
|
214
|
+
|
|
215
|
+
`GPUBLASRefitBatch` (`geometry/bvh/GPUBLASRefitBatch.js`) owns the two persistent tables and
|
|
216
|
+
records the frame's commands. It keeps `record_blas_refit`'s seam: an entry is an `owner` and a
|
|
217
|
+
`geometry_index`, and nothing in the recorder knows what a clone is or why vertices moved.
|
|
218
|
+
|
|
219
|
+
```js
|
|
220
|
+
const batch = new GPUBLASRefitBatch(device);
|
|
221
|
+
|
|
222
|
+
// whenever the set of trees changes — for skinning, whenever #bindings_dirty
|
|
223
|
+
batch.set_entries([{ owner: binding.clone_metadata, geometry_index: binding.clone_geometry_index }, ...]);
|
|
224
|
+
|
|
225
|
+
// every frame, in place of the loop
|
|
226
|
+
const recorded = batch.record(cmd, { blas, geometries }); // boolean, as record_blas_refit's
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
`set_entries` copies the list, asserts no owner appears twice (two rows for one tree would race on
|
|
230
|
+
its nodes), and marks the batch dirty.
|
|
231
|
+
|
|
232
|
+
`record` first decides whether the tables are current: they are stale if the batch is dirty or if
|
|
233
|
+
`blas.residency_version` (§3.4) has moved since they were built. Rebuilding is one host pass over
|
|
234
|
+
the entries: `get_refit_target(owner)` per entry, entries that answer `undefined` or have no leaves
|
|
235
|
+
are left out (the version bump brings them in when they become resident), `counters_offset` is the
|
|
236
|
+
running sum of `node_count`, and the lookup gets one pair per 64 leaves. Both tables go up through
|
|
237
|
+
`queue.writeBuffer`, into buffers grown by doubling, exactly as the skinning context's tables do.
|
|
238
|
+
Then, every frame:
|
|
239
|
+
|
|
240
|
+
1. if the batch has no workgroups, return `false`;
|
|
241
|
+
2. `counters = cmd.allocateTransientBuffer(STORAGE, counter_words * 4)`, `cmd.clearBuffer(counters)`;
|
|
242
|
+
3. for `offset` from 0 to `workgroup_count` in steps of `device.limits.maxComputeWorkgroupsPerDimension`,
|
|
243
|
+
`shader_blas_refit_batch.dispatch({ group_count_x: min(step, remaining), bindings: { dispatch_offset: offset, targets, lookup, leaf_nodes: blas.buffer_leaf_nodes, parents: blas.buffer_parents, counters, nodes: blas.buffer_data, geometries: geometries.buffer_metadata, meshlet_metadata, meshlet_data } })`.
|
|
244
|
+
|
|
245
|
+
The manager's buffers are read off `blas` at record time because `ensure_buffer_capacity` replaces
|
|
246
|
+
the `GPUBuffer` objects when an arena grows (it copies the old bytes across, so the arena *offsets*
|
|
247
|
+
in the rows survive growth). What makes binding them *safe* is call order, not freshness: every
|
|
248
|
+
place that replaces or destroys those buffers — `GPUGeometryBVHManager.update`, which grows all
|
|
249
|
+
three arenas and submits its own copy, and `GPUGeometryManager.build`, which recreates the geometry
|
|
250
|
+
metadata buffer — runs in `Renderer.#begin_frame` through `graphics.update()`, and in
|
|
251
|
+
`GPUViewContext.update → GPUSceneContext.update`, both before the frame's command context is
|
|
252
|
+
created; the refit is recorded into that context through `scene.tick`, and the context is finished
|
|
253
|
+
after. The meshlet arenas the batch also binds are the one exception: a clone allocated during
|
|
254
|
+
`tick` can rebuild them after the context exists, which is safe because nothing recorded earlier in
|
|
255
|
+
that context binds them and the batch reads them at record time — and is why the refit stays after
|
|
256
|
+
the skinning pass, whose own flush of pending clones comes first. `GPUMeshSkinningContext.update`
|
|
257
|
+
already documents the hazard for the metadata buffer. A refit recorded anywhere else would not have
|
|
258
|
+
that guarantee, the recorder's doc says so, and the software device could not catch a violation,
|
|
259
|
+
since it executes nothing at submit.
|
|
260
|
+
|
|
261
|
+
### 3.4 Two additions to the manager: `residency_version` and a residency guard
|
|
262
|
+
|
|
263
|
+
The rows depend on what `get_refit_target` answers, and that answer changes in three places, all
|
|
264
|
+
host-side: a topology is uploaded (`#upload_pending_topology`), a tree's nodes are uploaded
|
|
265
|
+
(`update`), a tree is removed (`remove`). `GPUGeometryBVHManager` gains a monotonic
|
|
266
|
+
`residency_version`. Both uploads report whether anything became resident, and `update` bumps the
|
|
267
|
+
version once when either did — the node upload is a method of its own, so a frame that uploads only
|
|
268
|
+
a shape counts; `remove` bumps when it actually removed something. The batch compares. No queue, no
|
|
269
|
+
dirty set of owners: a version is the smallest thing that says "ask again".
|
|
270
|
+
|
|
271
|
+
The version is coarse on purpose. Any tree's residency change makes the batch rebuild both tables,
|
|
272
|
+
so a frame that streams in an unrelated geometry costs one host pass over the entries and a lookup
|
|
273
|
+
upload — a megabyte at 300 characters. That is the trade for never asking per entry per frame, and
|
|
274
|
+
§5 pins it, so nobody later narrows the trigger into a stale-row bug.
|
|
275
|
+
|
|
276
|
+
The guard closed a hole the batch would otherwise have inherited and trusted. As landed at P2,
|
|
277
|
+
`#register` snapshotted `source.bvh` at `obtain` time, `update` uploaded that snapshot, and
|
|
278
|
+
`MeshletGeometry.bvh` defaults to an empty buffer — so an owner obtained before its bytes existed was
|
|
279
|
+
marked resident over a zero-length region at the arena's end, and once the bytes arrived and the
|
|
280
|
+
shape was derived from them live, `get_refit_target` answered with the shape's counts at an address
|
|
281
|
+
whichever tree was appended next now occupied. P2 made `get_refit_target` refuse a record whose
|
|
282
|
+
uploaded byte length disagrees with the shape. The landing review found the same address still
|
|
283
|
+
went into the ray lookup (§7, R5), and the fix went one level down: the upload now reads the
|
|
284
|
+
geometry's tree when it runs, a record whose geometry has none stays queued until it has one, and
|
|
285
|
+
the lookup names an empty tree at node 0 of the arena meanwhile. The guard remains, as a second
|
|
286
|
+
check that costs nothing.
|
|
287
|
+
|
|
288
|
+
### 3.5 The skinning context
|
|
289
|
+
|
|
290
|
+
`#record_blas_refits` becomes a call into a `#refit_batch` the context owns; `set_entries` runs in
|
|
291
|
+
the `#bindings_dirty` branch of `update`, beside the other table uploads that depend only on the
|
|
292
|
+
binding list; `destroy` destroys the batch. The `geometries.blas === undefined` guard stays — with
|
|
293
|
+
BVH support off there is nothing to refit. The refit stays where it is in the frame, after the
|
|
294
|
+
bounds-refresh chain, for the reason the comment there gives and for the ordering §3.3 relies on.
|
|
295
|
+
|
|
296
|
+
### 3.6 What gets deleted or moved
|
|
297
|
+
|
|
298
|
+
- `record_blas_refit.js` and `record_blas_refit.spec.js` — the batch of one is the recorder now.
|
|
299
|
+
- `shader_blas_refit_leaf_bounds.js` — its body is four lines of the fused kernel. The playground's
|
|
300
|
+
`shader_blas_audit_leaf_triangles.js` imports its `BLAS_LEAF_BOUNDS_SETTINGS_STRUCT` as the audit's
|
|
301
|
+
own immediate and gets a struct of its own; `verify_leaf_triangles.js` imports the same struct
|
|
302
|
+
and never uses it, so that import simply goes.
|
|
303
|
+
- `blas_refit_leaf_bounds.spec.js` splits: its validity test is replaced by the batch kernel's, and
|
|
304
|
+
its `geometry_read_triangle_bounds` block moves next to the chunk it tests, unchanged.
|
|
305
|
+
- `blas_refit_containment.spec.js` is reworked to drive the fused kernel over two trees (§5).
|
|
306
|
+
- `verify_skinned_blas_refit.js` records a batch of one where it recorded `record_blas_refit`.
|
|
307
|
+
- `playground/skinned_blas_refit/README.md` names `record_blas_refit` and `GPU_BVH_BUILD_PLAN.md`
|
|
308
|
+
§5.2 names `shader_blas_refit_leaf_bounds`; both move to the new names in P4 and P5.
|
|
309
|
+
|
|
310
|
+
No other importer exists; the review grepped the repository.
|
|
311
|
+
|
|
312
|
+
### 3.7 What fusing the two passes does to R1
|
|
313
|
+
|
|
314
|
+
Today the leaf boxes are made visible to the climb by a dispatch boundary, which WebGPU guarantees,
|
|
315
|
+
and only the *internal* boxes ride on the builder plan's R1 assumption: a node's six words are
|
|
316
|
+
written through `atomicStore` by the thread that fitted it, before that thread's `atomicAdd` on the
|
|
317
|
+
parent's counter; the second arrival reads them through `atomicLoad` after its own `atomicAdd`
|
|
318
|
+
returned 1. That is the whole handshake, and AR3 in `GPU_BVH_BUILD_PLAN.md` is the argument for it.
|
|
319
|
+
|
|
320
|
+
In the fused kernel a leaf's box is written the same way, by the leaf's own lane, before that lane's
|
|
321
|
+
first `atomicAdd`. The assumption is the same and it is made in the same place, but its surface
|
|
322
|
+
grows: today `N − 1` internal boxes ride on R1 and `N` leaf boxes do not; fused, all `2N − 1` do,
|
|
323
|
+
and the bottom level of the climb — roughly half the handshakes, the ones that read two leaves —
|
|
324
|
+
moves from a guaranteed boundary onto relaxed atomics. What that buys is a pass boundary, a
|
|
325
|
+
barrier, and the re-read of every leaf box.
|
|
326
|
+
|
|
327
|
+
What it costs in mitigation is stated exactly. If tier 4 ever shows a leaf-level failure, splitting
|
|
328
|
+
the leaf store back into its own batched pass is a mechanical change that restores today's surface
|
|
329
|
+
precisely — and no more than that. It is *not* the per-level fallback R1 sketches: that fallback
|
|
330
|
+
dispatches one tree level at a time, and for a batch of trees of differing depths it needs
|
|
331
|
+
per-level node lists per tree that none of the three tables carry. That is a separate design,
|
|
332
|
+
noted in §9, not a step this plan can claim.
|
|
333
|
+
|
|
334
|
+
### 3.8 Alternatives considered
|
|
335
|
+
|
|
336
|
+
- **One workgroup per tree, lanes striding over its leaves.** `N` workgroups for `N` trees; at 300
|
|
337
|
+
that is a sixth of a large GPU's slots, and the climb — the part that needs parallelism most —
|
|
338
|
+
gets 64 lanes per tree. Rejected.
|
|
339
|
+
- **A 2D dispatch, x over leaf blocks, y over trees.** Wastes `max − actual` blocks on every tree
|
|
340
|
+
smaller than the largest, which LODs and props guarantee, and each axis has the 65,535 cap
|
|
341
|
+
anyway. Rejected.
|
|
342
|
+
- **A binary search over the target rows instead of a lookup table.** Removes the per-workgroup
|
|
343
|
+
table at the cost of `log₂ N` dependent uniform loads per workgroup. Sound, but the lookup is the
|
|
344
|
+
idiom the skinning pass already uses, is `O(1)` per workgroup, and is trivially checkable at
|
|
345
|
+
tier 3. Not taken; noted in case the table's rebuild ever shows up.
|
|
346
|
+
- **Extending `SKINNING_BINDING_STRUCT` with the refit fields.** Ties BLAS residency to the skinning
|
|
347
|
+
upload triggers and closes the door to non-skinning deformers using the same batch. Rejected.
|
|
348
|
+
- **Counters indexed by arena node, one persistent buffer.** No per-tree offset, but the clear covers
|
|
349
|
+
every static geometry's nodes every frame, or becomes `N` range clears again. Rejected.
|
|
350
|
+
- **Parity counters, never cleared.** Each refit adds exactly two to every internal node's counter,
|
|
351
|
+
so `arrivals & 1` distinguishes first from second without a clear. Real, and it removes the one
|
|
352
|
+
bandwidth item that scales with node count — but it makes "every leaf climbs every frame" a
|
|
353
|
+
load-bearing invariant that no device-free tier can see broken. Kept as a follow-up behind a
|
|
354
|
+
measurement (§9), not in the design.
|
|
355
|
+
- **Two batched kernels (leaf store, then climb).** The conservative form of §3.7: one more pass and
|
|
356
|
+
a re-read of every leaf, in exchange for keeping the R1 surface where it is today. Not taken; it
|
|
357
|
+
is the first thing the fused kernel splits back into if tier 4 ever says so.
|
|
358
|
+
- **Indirect dispatch.** The count is host-known. Nothing to buy until a GPU-side skip exists (§9).
|
|
359
|
+
|
|
360
|
+
### 3.9 What else touches the trees
|
|
361
|
+
|
|
362
|
+
- **The TLAS never reads a BLAS root box.** `GPUInstancesAccelerationStructure` builds from
|
|
363
|
+
instance world bounds, and the GPU path reads them off the `meshes` table, which the
|
|
364
|
+
bounds-refresh chain writes. Batching the refit changes nothing there.
|
|
365
|
+
- **`shader_build_sdf` reads BLAS root bounds** through `blas_lookup`. Out of scope, but it is a
|
|
366
|
+
consumer of the boxes this pass writes, and it does not run between the refit and the frame graph.
|
|
367
|
+
- **Ordering.** Nothing reads the node arena between the refit's position (`scene.tick`) and the
|
|
368
|
+
frame graph in the same command context, so pass order is what puts the refit before every ray.
|
|
369
|
+
- **Immediates.** The kernel takes `dispatch_offset` as an immediate, as today's kernels take their
|
|
370
|
+
settings, so the batch stays off any device reporting `maxImmediateSize` 0. No new dependency,
|
|
371
|
+
but tier 4 needs a real browser rather than the in-app pane.
|
|
372
|
+
|
|
373
|
+
## 4. Cost model
|
|
374
|
+
|
|
375
|
+
Sizes use the playground character: 28,106 leaves, and 56,211 node slots if its buffer has no
|
|
376
|
+
free-list holes — `topology.node_count` counts slots, so P0 reads the real figure off
|
|
377
|
+
`get_refit_target`. Measured numbers land here at P0 and P5 (§6); the structural claims do not
|
|
378
|
+
depend on them.
|
|
379
|
+
|
|
380
|
+
| `N` skinned meshes | 1 | 64 | 300 |
|
|
381
|
+
|---|---|---|---|
|
|
382
|
+
| passes today / proposed | 2 / 1 | 128 / 1 | 600 / 3 |
|
|
383
|
+
| clears today / proposed | 1 / 1 | 64 / 1 | 300 / 1 |
|
|
384
|
+
| workgroups in the batch | 440 | 28,160 | 132,000 |
|
|
385
|
+
| counters cleared per frame | 225 KB | 14.4 MB | 67.5 MB |
|
|
386
|
+
| lookup table (rebuilt on change only) | 3.5 KB | 225 KB | 1.06 MB |
|
|
387
|
+
| encoder calls today / proposed | 17 / 9 | 1,088 / 9 | 5,100 / 25 |
|
|
388
|
+
|
|
389
|
+
The second sub-dispatch starts at 149 characters of this size. The counters clear is the one cost
|
|
390
|
+
that still scales with node count: 4 bytes per node against the climb's own ~64 bytes per node of
|
|
391
|
+
traffic, so under a tenth of the refit's bandwidth, and one command regardless of `N`. §9 has the
|
|
392
|
+
lever if a profile ever shows it. Past a few hundred characters the wall is not the clear but the
|
|
393
|
+
node arena itself — 1.8 MB per tree, 1.8 GB at a thousand — against `maxStorageBufferBindingSize`
|
|
394
|
+
and `maxBufferSize`, which `#ensure_data_capacity` does not check today (§9).
|
|
395
|
+
|
|
396
|
+
**Device tier, 2026-09-02, NVIDIA RTX 4090, 256 dancers, path traced.** The batch ran as two
|
|
397
|
+
dispatches — 112,640 workgroups, the second page from workgroup 65,535. `verify()`: pass, the tree
|
|
398
|
+
bounds the deformed mesh and follows it, and all 28,105 internal nodes are exactly their children's
|
|
399
|
+
union. `verify_leaves()`: pass, all 28,106 leaf boxes are the builder's. Getting there took two
|
|
400
|
+
fixes outside this plan (§7, L1 and L2).
|
|
401
|
+
|
|
402
|
+
Frame time before and after: _not recorded_. **[deviation]** P0's baseline was not taken ahead of
|
|
403
|
+
the work, the session went to correctness, and a before number needs the pre-switch commit
|
|
404
|
+
(`f42851a62`) at a count the old animation ceiling allows — 128 or fewer. The profile-capture port
|
|
405
|
+
landed after the session (`f5d343f40`), so the next one can read the refit's own span. This table
|
|
406
|
+
takes the numbers whenever a session records them.
|
|
407
|
+
|
|
408
|
+
## 5. Validation
|
|
409
|
+
|
|
410
|
+
Every artefact is assigned to the tiers that can actually see it. Nothing here compares kernel A
|
|
411
|
+
to kernel B, and nothing matches a string in the source.
|
|
412
|
+
|
|
413
|
+
**Tier 1 — WGSL validity.** `shader_blas_refit_batch` and the lifted `shader_bvh_refit` parse and
|
|
414
|
+
validate as assembled (`validate_wgsl_source`). Pins the constants move (§3.2) and the binding set.
|
|
415
|
+
The same spec counts the storage-buffer bindings the batch kernel's descriptor declares and asserts
|
|
416
|
+
they fit the engine's floor of ten — an invariant, and the only device-free place it can live. It
|
|
417
|
+
earned its keep at P3: the row variable's first name was `target`, a WGSL reserved word, and the
|
|
418
|
+
validator refused it while the emulator, which does not care, had already passed every test.
|
|
419
|
+
|
|
420
|
+
**Tier 2 — emulator.** `shader_blas_refit_batch.spec.js`: three trees in one batch — two six-leaf
|
|
421
|
+
trees of different shapes over the same six triangles, and a seventy-two-leaf tree whose leaves
|
|
422
|
+
span two workgroups, which is the only way a lookup pair's `leaf_base` half gets exercised — each at
|
|
423
|
+
its own position in the shared `nodes`, `parents` and `leaf_nodes` arrays with junk words between
|
|
424
|
+
them, `nodes` and `counters` marshalled as `{value}` cells, every `(workgroup, lane)` driven as
|
|
425
|
+
`dispatch([wg,0,0], [lane,0,0])`. The checker it asserts with has a spec of its own,
|
|
426
|
+
`bvh2_check_bounds.spec.js`, that mutates a hand-fitted tree and requires each check to go red; and
|
|
427
|
+
the build's own refit pass keeps an executing tier in `shader_bvh_refit.spec.js`, over a tenant tree
|
|
428
|
+
at non-zero offsets. Asserted on the bytes:
|
|
429
|
+
|
|
430
|
+
- every leaf's box covers the triangle it names (`bvh2_check_leaf_bounds`), per tree, against the
|
|
431
|
+
vertex table the spec wrote;
|
|
432
|
+
- every node's box is exactly its children's union (`bvh2_check_containment`), per tree;
|
|
433
|
+
- every word outside the two trees' bounds words is the sentinel it started as — one tree's lanes
|
|
434
|
+
never touch the other's nodes, and a 64-lane workgroup over a six-leaf tree writes nothing from
|
|
435
|
+
its idle lanes;
|
|
436
|
+
- every internal node's counter is exactly 2 and every other counter word is 0, at each tree's own
|
|
437
|
+
`counters_offset` — the ranges are disjoint and the handshake fired once per node;
|
|
438
|
+
- the wide tree's second run starts where the first ended: after one workgroup leaves 0 to 63 have
|
|
439
|
+
boxes and 64 to 71 do not, after both the tree is fitted and every internal counter reads 2.
|
|
440
|
+
|
|
441
|
+
The emulator runs invocations one at a time, so the arrival protocol always completes; that is the
|
|
442
|
+
same limitation the old spec had, and it is why tier 4 exists.
|
|
443
|
+
|
|
444
|
+
**Tier 3 — `SoftwareGPUDevice`** (`requiredFeatures: ['subgroups']`). A `GPUBLASRefitBatch.spec.js`
|
|
445
|
+
against a real `GPUGeometryBVHManager` with synthetic trees, reading host bytes through the
|
|
446
|
+
dispatch's bind-group entry as `record_blas_refit.spec.js` does, and clears through a spy on the
|
|
447
|
+
command context, since clears do not appear in the recorded pass log:
|
|
448
|
+
|
|
449
|
+
- three trees of 8, 3 and 200 leaves record exactly one clear and one dispatch, with
|
|
450
|
+
`group_count_x = 1 + 1 + 4`, and nothing else;
|
|
451
|
+
- the target rows equal `get_refit_target(owner)` for each tree, with `counters_offset` the prefix
|
|
452
|
+
sum of node counts, and the clear covers `Σ node_count` words;
|
|
453
|
+
- the lookup names, for every workgroup, the right tree and a leaf base that is a multiple of 64
|
|
454
|
+
and below that tree's leaf count;
|
|
455
|
+
- an owner obtained *with* its bytes but before `blas.update()` contributes no row and no
|
|
456
|
+
workgroups; after `blas.update()`, with no `set_entries` in between, the next `record` includes it
|
|
457
|
+
— the `residency_version` handshake, pinned by the dispatch size changing;
|
|
458
|
+
- an upload of an *unrelated* geometry between two frames makes the next `record` rebuild both
|
|
459
|
+
tables, and a frame with no change does not (`writeBuffer` spied on the mock queue after the
|
|
460
|
+
manager's own uploads, or filtered by destination);
|
|
461
|
+
- with `maxComputeWorkgroupsPerDimension: 4` the six workgroups record as two dispatches of 4 and 2
|
|
462
|
+
whose `dispatch_offset` immediates read 0 and 4, and every dispatch's group count is at or under
|
|
463
|
+
the limit — the mock does not enforce the cap itself;
|
|
464
|
+
- a clone entry refits its own nodes, leaving the source's alone — today's last spec, carried over.
|
|
465
|
+
|
|
466
|
+
A new `GPUGeometryBVHManager.spec.js` pins the manager's two additions. `residency_version`:
|
|
467
|
+
unchanged across an idle `update`; moved by a node upload; moved by a topology-only `update`, the
|
|
468
|
+
one that takes the early return; moved by `remove` of a registered owner; unmoved by `remove` of an
|
|
469
|
+
unknown one. The guard: an owner obtained while its geometry's `bvh` is empty, then given bytes and
|
|
470
|
+
updated again, gets `undefined` from `get_refit_target` rather than a row aimed at the next tree's
|
|
471
|
+
nodes — red against today's manager.
|
|
472
|
+
|
|
473
|
+
`GPUMeshSkinningContext.spec.js` gains one test: two bound meshes produce a single refit pass sized
|
|
474
|
+
for both clones' trees. Its fixture geometry has no tree today, so the test needs one — a one-leaf
|
|
475
|
+
tree (`child_1 = BVH_NULL_NODE`, payload 0; `bvh2_derive_topology` accepts a single node) — and
|
|
476
|
+
`GPUSceneContext.build()` runs the geometry update, which is what makes the clones resident before
|
|
477
|
+
the frame. It filters the
|
|
478
|
+
recorded passes by the batch kernel's label, asserts one dispatch of `Σ ceil(leaf_count / 64)` over
|
|
479
|
+
both clones, and asserts both target rows' `node_word_offset` differ from the source's. Red against
|
|
480
|
+
the loop for the right reason: with resident trees the loop records two passes per mesh.
|
|
481
|
+
|
|
482
|
+
**Tier 4 — browser.** `src/shade/playground/skinned_blas_refit/`: `verify()` and `verify_leaves()`
|
|
483
|
+
at 1, 64 and 256 dancers, path traced, on the NVIDIA device the phase-3a record names; the rasterized
|
|
484
|
+
against traced silhouette check by eye at 256. The character count cap in `main.js` (64) is lifted
|
|
485
|
+
for this. Frame times and, with `timestamp-query`, the per-pass spans from a profile capture, before
|
|
486
|
+
and after, into §4. This tier is the only detector for §3.7's enlarged R1 surface.
|
|
487
|
+
|
|
488
|
+
Not tested, on purpose: fused versus two kernels (settled by §3.7), lookup versus binary search
|
|
489
|
+
(settled by §3.8), and any assertion on shader-written bytes from the software device, which
|
|
490
|
+
executes no shaders.
|
|
491
|
+
|
|
492
|
+
## 6. Deliverable sequence
|
|
493
|
+
|
|
494
|
+
Each item is its own commit on `master`, tests red against the tree before it and green after, in
|
|
495
|
+
the order the plan's dependencies force. Nothing is staged with `git add`; new files are `-N` then
|
|
496
|
+
`--only`.
|
|
497
|
+
|
|
498
|
+
| # | item | red-then-green pin |
|
|
499
|
+
|---|---|---|
|
|
500
|
+
| P0 | **Baseline.** Lift the 64-dancer cap in the playground and add the profile-capture idiom from `volumetrics_froxel/main.js`. Read the character's real `node_count` off `get_refit_target`. Record frame time at 16, 64 and 256 with the refit, and with `#record_blas_refits` commented out locally — the ceiling of what P4 can win. Numbers into §4. **[deviation]** Only the cap was lifted (to 512); the rest folds into P5's one session, see §4. | none — measurement, no engine code |
|
|
501
|
+
| P1 | **Lift the climb.** `chunk_bvh_refit_climb` + `BVH_NODE_LAYOUT_DEFINITION` in `gpu_primitive/bvh/`; `shader_bvh_refit` calls the chunk. No behaviour change. **Landed** `c52ef1691`. | the existing containment spec and `graph_bvh_build_lbvh.spec.js` stayed green; tier-1 validity of the reassembled kernel |
|
|
502
|
+
| P2 | **The manager.** `residency_version` bumped once per `update` in which a shape or nodes became resident, and in `remove`; the uploaded byte length on the record and the `get_refit_target` guard. **Landed** `f42851a62`. | the new manager spec of §5: five version cases and the empty-snapshot guard, 5 red then green |
|
|
503
|
+
| P3 | **The batch.** `BLAS_REFIT_TARGET_STRUCT`, `shader_blas_refit_batch`, `GPUBLASRefitBatch`, and the tier 1–3 specs of §5, the descriptor budget assertion included. Nothing calls it yet. **Landed** `36d4796df`. | every case red on the missing modules, then green; the two-tree emulator spec |
|
|
504
|
+
| P4 | **Switch and delete.** The skinning context records the batch; `record_blas_refit`, the single leaf kernel and their specs go; the playground's verify functions, audit kernel and README move over. **Landed** `46ba62862`. | the skinning-context test in §5, red against the loop (no batch pass recorded) |
|
|
505
|
+
| P5 | **Device tier and record.** §5's tier 4, run on an NVIDIA RTX 4090 at 256 dancers; the **[deviation]** note in `GPU_BVH_BUILD_PLAN.md` §5.2 is in. **Done**, with the findings of §7's second table. | `verify()` and `verify_leaves()` pass at 256: the tree bounds the deformed mesh and follows it, 28,105 internal nodes exactly their children's union, all 28,106 leaves the builder's |
|
|
506
|
+
|
|
507
|
+
P1 and P2 are independent of each other and of P0; P3 needs P1 and P2; P4 needs P3; P5 needs P4.
|
|
508
|
+
|
|
509
|
+
## 7. Review
|
|
510
|
+
|
|
511
|
+
An adversarial pass was run against the code on 2026-09-02, after the plan was drafted, beside
|
|
512
|
+
the author's own check of the tier mechanics. Twelve findings, none blocking. Every one is folded
|
|
513
|
+
into the sections above; this is the ledger, so a later reader can see what changed and why.
|
|
514
|
+
|
|
515
|
+
| # | severity | finding | disposition |
|
|
516
|
+
|---|---|---|---|
|
|
517
|
+
| F1 | should-fix | The residency handshake, as first written, described obtaining an owner before its bytes exist. The manager snapshots `source.bvh` at `obtain`, marks such an owner resident over a zero-length region, then answers `get_refit_target` with a live topology and a `node_word_offset` aimed at the next tree appended — a row the batch would ingest faithfully. Pre-existing; today's recorder does the same. | **Accepted.** §3.4 adds the uploaded-byte-length guard, P2 pins it red-then-green, §5's handshake case is reworded to obtain-with-bytes-then-update, B9 added, late-byte upload recorded in §9. |
|
|
518
|
+
| F2 | should-fix | The tier-3 device cannot be built with `maxStorageBuffersPerShaderStage: 10`: the mock refuses any limit above the spec default and never counts storage buffers per stage, so nothing device-free checked the nine-buffer budget. | **Accepted.** The `requiredLimits` line is gone; the batch kernel's tier-1 spec asserts the descriptor's storage-buffer count against the engine's floor (§5); B2 reworded. |
|
|
519
|
+
| F3 | should-fix | §3.7 understated the change to R1's surface (from `N − 1` boxes to `2N − 1`, the bottom level moving onto relaxed atomics) and overclaimed the fallback: the per-level fallback R1 sketches is single-tree, and a batch of mixed depths needs per-level lists the tables do not carry. | **Accepted.** §3.7 rewritten with the counts; the two-kernel split is named as restoring today's surface and nothing more; the batch fallback is a separate design in §9; B1 reworded. |
|
|
520
|
+
| F4 | should-fix | Binding the manager's buffers is safe because of frame call order, not because they are "read fresh": growth between `record` and `finish` would destroy a bound buffer, and the mock could not catch it. | **Accepted.** §3.3 and B4 state the invariant with the call sites; the recorder's doc will say `record` belongs inside the skinning update. |
|
|
521
|
+
| F5 | should-fix | The skinning-context test could neither go red nor green: the spec's fixture geometry has no tree, so both the loop and the batch record nothing. Found independently by the author. | **Accepted.** §5 gives the fixture recipe (a one-leaf tree, `graphics.update()` before the frame) and the assertions. |
|
|
522
|
+
| F6 | should-fix | `residency_version` "bumped at the end of `update`" misses the early return on an empty node queue, which a topology-only frame takes; and the rebuild trigger is broader than §1's wording — any tree's residency change, not only the batch's own. | **Accepted.** §3.4 bumps at both exits and says why the trigger is coarse; §1 reworded; §5 pins the topology-only bump and the unrelated-upload rebuild. |
|
|
523
|
+
| F7 | nit | §3.6 misdescribed the playground imports (the audit kernel takes only the settings struct; `verify_leaf_triangles.js` has a dead import) and missed the README and the build plan's mention of the leaf kernel. | **Accepted.** §3.6 lists all of them; P4 and P5 carry the doc moves. |
|
|
524
|
+
| F8 | nit | Units mixed MB and MiB; the proposed encoder-call counts included the transient allocation while today's did not; 56,211 node slots assumes no holes; the 1,000-character line in B3 is moot because the node arena hits the buffer limits first. | **Accepted.** §4 in decimal MB, 9 / 25, "if no holes" with P0 reading the real count; B3 reworded, `#ensure_data_capacity`'s missing check noted in §9. |
|
|
525
|
+
| F9 | nit | Tier-3 mechanics: clears are visible only through a spy on the context; the `writeBuffer` spy must be scoped past the manager's own uploads; the mock does not enforce the workgroup cap; the idle-lane check restates the sentinel check; the manager spec file does not exist yet. | **Accepted.** §5 says how each assertion is made; the idle-lane bullet is folded into the sentinel one; the manager spec is "new". |
|
|
526
|
+
| F10 | nit | Names fit their neighbours; `BVH_NODE_LAYOUT_DEFINITION` sits better beside `BVH_BUFFER_LAYOUT.js` than in `shader/chunk/bvh/`; the `BVH_` prefix avoids every existing `NODE_*` copy. | **Accepted.** §3.2 places it in `gpu_primitive/bvh/`. |
|
|
527
|
+
| F11 | nit | Scope statements the plan should carry: the TLAS does not read root boxes; `shader_build_sdf` does; nothing reads the arena between the refit and the frame graph; immediates keep the batch off `maxImmediateSize` 0 devices; the `blas === undefined` guard must survive. | **Accepted.** §3.9 added; §3.5 keeps the guard. |
|
|
528
|
+
| F12 | nit, plausible | "Nothing for subgroups to do" was too strong: pre-order leaf lists put sibling leaves in adjacent lanes, so the bottom level of the climb could be a shuffle rather than a counter round trip. | **Accepted as a note.** §3.2 states it; §9 keeps it behind P5's profile, per the measure-first rule. No design change. |
|
|
529
|
+
|
|
530
|
+
Verified correct by the review, so nobody needs to check them again: the §1 step list and encoder
|
|
531
|
+
counts; `get_refit_target`'s contract and the per-source topology sharing; arena offsets surviving
|
|
532
|
+
growth; the skinning lookup and pagination idiom and its `queue.writeBuffer` uploads; immediates
|
|
533
|
+
capped at 64 bytes; the emulator's positional builtins, immediates supplied as bindings, struct
|
|
534
|
+
arrays and `{value}` atomics; the mock's recording surface and its acceptance of lowered limits;
|
|
535
|
+
the nine-buffer count against the ten the engine requests; the arithmetic in §4 (440 workgroups,
|
|
536
|
+
the 149th character, three sub-dispatches at 132,000, the 4 / 2 split); and the edge cases of
|
|
537
|
+
§3.3 — zero entries, zero-leaf and single-leaf trees, remove-then-obtain in one frame,
|
|
538
|
+
source-geometry owners, more than 65,535 workgroups, and geometry indices never being reassigned.
|
|
539
|
+
|
|
540
|
+
What the device session turned up, in the order it did:
|
|
541
|
+
|
|
542
|
+
| # | finding | disposition |
|
|
543
|
+
|---|---|---|
|
|
544
|
+
| L1 | At 256 dancers the load failed in the animation manager: curve uploads were shared by `AnimationCurve` instance, every dancer is a fresh parse, and 256 copies of the dance's ~22,000 keyframe blocks exhausted the block table's 4,096 pages of 128 KB near 170 dancers. | **Fixed**, `d62a17ffe`: curves are interned by content — hash, then key-by-key equality, tangents included — pinned by a new `GPUAnimationManager.spec.js`. Not this plan's subsystem, but it stood between the playground and hundreds of animated characters. |
|
|
545
|
+
| L2 | `verify()` reported a consistent interior and a root box a few frames off, growing with time. The harness reads the root box and the bounds chain's box in two readbacks, and each await lets the frame loop advance the dance; on a 256-dancer path-traced frame the two reads straddle several frames of motion. | **Fixed**, `8377a3de0`: the checks hold the dance still while they measure, and drive their own frames for the "follows it" half. With that, `verify()` passes. A clone-side leaf audit, `verify_clone_leaves()`, was added for the case it had been the kernel; it was not needed. |
|
|
546
|
+
| L3 | A 256-dancer load is a minute of sequential parses behind one status line, and `verify()` called before it finished failed on a list that did not exist yet. | **Fixed**, `1c04040bd`: the status counts dancers and names the two stages after. |
|
|
547
|
+
| L4 | The manager uploaded 512 trees for 256 dancers: each parse registers its own source geometry beside its clone, so the node arena is 921 MB where 462 MB would do. | **Fixed**: `GPUGeometryManager` registers by content — an equal geometry under a tree of the same size becomes another name for the existing record, reference-counted — pinned by a new `GPUGeometryManager.spec.js`. The same story as L1, in the geometry manager. |
|
|
548
|
+
| L5 | Frame times were not recorded. | **Open**: §4 takes the numbers whenever a session records them; the before number needs `f42851a62` at 128 dancers or fewer. |
|
|
549
|
+
|
|
550
|
+
A second adversarial pass ran after the landing, over all of the above — thirteen findings, none
|
|
551
|
+
blocking. Nine were worked, each red-then-green in its own commit; four were left as not worth the
|
|
552
|
+
change, and are recorded so nobody re-finds them.
|
|
553
|
+
|
|
554
|
+
| # | severity | finding | disposition |
|
|
555
|
+
|---|---|---|---|
|
|
556
|
+
| R1 | should-fix | Deleting the two-kernel containment spec also deleted the three tests that proved `bvh2_check_bounds` — the oracle for the emulator spec and the browser tier's `verify()` — can go red. | **Fixed**, `5593ebded`: `bvh2_check_bounds.spec.js`, over a tree fitted by hand, with the three mutation cases and a fourth for a loose parent. |
|
|
557
|
+
| R2 | should-fix | Both emulator trees had six leaves, so `leaf_base` was always zero and the one line where a batch's addressing differs from a single workgroup's never executed; only the device session had. | **Fixed**, `e4115b9fa`: a seventy-two-leaf tree spanning two workgroups, run whole and one run at a time. Shown to bite: the kernel taking `lid.x` alone turns three tests red. |
|
|
558
|
+
| R3 | should-fix | `shader_bvh_refit`, the build's pass 4, ran in no device-free tier after the deletion; the climb was covered through the batch kernel, its framing was not. | **Fixed**, `57a19c7f4`: `shader_bvh_refit.spec.js` over a tenant tree at non-zero offsets. Shown to bite: swapping the two offsets in the call turns all four tests red. |
|
|
559
|
+
| R4 | should-fix | `add_clone` recorded the alias object as the clone's geometry, and the BLAS manager keys shapes by object: 256 parsed dancers shared one source record but derived and uploaded 255 shapes. | **Fixed**, `6becb6e8d`: the clone records the record's geometry; clones of two equal geometries share one parents offset. |
|
|
560
|
+
| R5 | should-fix | A record registered before its bytes existed was resident over nothing at the arena's end; P2's guard kept the refit off it, but `get_address` still published that address into the ray lookup, and late bytes were never uploaded. | **Fixed**, `3f24d9fde`: no record resident over nothing, uploads read the geometry's tree when they run, an empty tree at node 0 for the lookup meanwhile, and the geometry manager runs the BLAS update every call. |
|
|
561
|
+
| R6 | should-fix | Alias matching compared tree sizes read live off the first object while the BLAS snapshot was taken at registration, so a geometry that gained its tree late could lend an equal one its empty region. | **Resolved by R5**: there is no empty region, and a pending record uploads the bytes the live comparison saw; pinned as its own case in `GPUGeometryManager.spec.js`. |
|
|
562
|
+
| R7 | nit | The content key covers meshlets only; bounds and primitive count come from the first object, and the meshlet hash omits vertex data where equality includes it. | **Left**: no path mutates a registered geometry, two parses of one file agree on every field, and equality still covers the data. |
|
|
563
|
+
| R8 | nit | The curve intern bucket holds live curve instances, so a curve mutated after upload could lend a later equal parse its stale blocks. | **Left**: no engine path mutates a curve after `register_clip`. |
|
|
564
|
+
| R9 | nit | This document had drifted from the code in five places, and stated the buffer-lifetime invariant too broadly. | **Fixed** in this revision. |
|
|
565
|
+
| R10 | nit | A node queue holding only released records still bumped the residency version, and built a zero-byte staging buffer to copy nothing. | **Fixed**, `8e5644c82`. |
|
|
566
|
+
| R11 | nit | The geometry table's debug inspector counted names, not rows, and would read past the buffer with aliases present. | **Fixed**: one row per geometry id. |
|
|
567
|
+
| R12 | nit | Three weak assertions — an integer check on the version, batch rows compared against the call the recorder copies from, a default sort on numbers. | **Left**: the row comparison still pins the upload path's field order and offsets, the sort sees two values, and the integer check is a smoke test that costs nothing. |
|
|
568
|
+
| R13 | nit | The playground's pause wrapper restores the previous animation state in `finally`, undoing a Freeze click made during a check. | **Left**: a check takes a second, and the button reads the state when clicked next. |
|
|
569
|
+
|
|
570
|
+
## 8. Risk register
|
|
571
|
+
|
|
572
|
+
| # | risk | mitigation |
|
|
573
|
+
|---|---|---|
|
|
574
|
+
| B1 | R1 of the builder plan now covers every box, leaves included: `2N − 1` instead of `N − 1`, with the bottom level of the climb on relaxed atomics (§3.7) | Same handshake, same all-atomic discipline. Tier 4's `verify_leaves()` and containment check are the only detector. If they ever fail, the two-kernel batched split restores today's surface mechanically; a per-level fallback for a batch is a separate design (§9). |
|
|
575
|
+
| B2 | Nine storage buffers in one stage | The engine requires ten and refuses adapters with fewer; the batch kernel's spec asserts the descriptor's count against that floor, since the mock can neither enforce nor raise the limit; `meshlets_address` in the row is the lever if it ever tightens. |
|
|
576
|
+
| B3 | The counters clear scales with total node count: 67.5 MB at 300 characters | One command, under a tenth of the refit's own traffic; parity counters (§3.8, §9) remove it entirely if a profile says so. Past a few hundred characters the node arena's own size is the wall, not the clear. |
|
|
577
|
+
| B4 | A manager buffer bound by the batch is destroyed before the frame is submitted | Safe by call order: `GPUGeometryBVHManager.update` and `GPUGeometryManager.build` run in `Renderer.#begin_frame` and `GPUViewContext.update`, before the main command context exists; the refit is recorded into that context through `scene.tick`. The recorder is documented as belonging inside `GPUMeshSkinningContext.update`, and nowhere else. The mock cannot detect a violation. |
|
|
578
|
+
| B5 | Pagination: `dispatch_offset` off by a page silently refits the wrong trees; the mock does not enforce the workgroup cap | Pinned at tier 3 with a four-workgroup limit, and every dispatch's group count asserted under the limit; the same idiom the skinning pass has shipped with. |
|
|
579
|
+
| B6 | A device-free tier cannot see a real race; the emulator serialises invocations | Known and unchanged from today; tier 4 on the named device, both verify functions, at 256. |
|
|
580
|
+
| B7 | Two entries for one owner would race on one tree | `set_entries` asserts uniqueness. |
|
|
581
|
+
| B8 | An owner removed from the manager while still in the entries | `remove` bumps the version; the next `record` drops the row, as `get_refit_target` answers `undefined`. Pinned at tier 3. |
|
|
582
|
+
| B9 | An owner obtained before its bytes exist is resident over nothing and later answers with a stranger's address (§3.4) | **Closed** (§7, R5): no record is resident over nothing, late bytes upload on the next update, and the lookup names the empty tree meanwhile. The uploaded-byte-length guard stays as a second check. |
|
|
583
|
+
| B11 | Every traversal starts walking from whatever the lookup names, with no null check, so "no tree" has to be a valid tree | Node 0 of the arena is an internal node whose box is +inf below and -inf above: rays miss it, point queries prune it, nothing fetches a triangle for it. Pinned in `GPUGeometryBVHManager.spec.js`, and the first real tree lands after it. |
|
|
584
|
+
| B10 | Rebuilds happen on any tree's residency change, not only the batch's own | Accepted cost: one host pass and a lookup upload on streaming frames; pinned at tier 3 so it is not "optimised" into a stale-row bug. |
|
|
585
|
+
|
|
586
|
+
## 9. Follow-ups, deliberately outside this plan
|
|
587
|
+
|
|
588
|
+
- **A GPU-written skip.** A per-target word the skin-matrix prep writes when a skin's matrices did
|
|
589
|
+
not change; a workgroup whose target is clean exits before touching memory. Keeps the command
|
|
590
|
+
count fixed and makes an idle character free in bandwidth. Only after a profile shows idle
|
|
591
|
+
characters matter.
|
|
592
|
+
- **Compaction and indirect dispatch**, once the skip exists and most trees are idle: a small pass
|
|
593
|
+
compacts live targets into a work list and `dispatchIndirect` runs exactly those.
|
|
594
|
+
- **Parity counters** (§3.8) if the clear shows in a profile.
|
|
595
|
+
- **Bottom-level sibling pairing with subgroup shuffles** (§3.2), behind P5's profile of the climb.
|
|
596
|
+
- **A per-level fallback for a batch**, should tier 4 ever fail R1: host-derived per-level node
|
|
597
|
+
lists per tree, rebuilt with the tables, and `max_depth` dispatches. Designed only if needed.
|
|
598
|
+
- **`#ensure_data_capacity` has no `maxBufferSize` check**, unlike `GPUDatabase`; at a thousand
|
|
599
|
+
characters of this size the node arena would exceed the binding limit silently.
|
|
600
|
+
- **One parse per file.** Source geometries now share by content (§7, L4), so an instanced cast
|
|
601
|
+
costs one tree in the arena — but it still costs one parse per instance, a minute of them for
|
|
602
|
+
256 dancers. A loader that hands back one parse and instantiates the node hierarchy per copy
|
|
603
|
+
would make the second dancer free.
|
|
604
|
+
- **Other deformers.** Morph targets, cloth, procedural vertex motion enqueue into the same batch;
|
|
605
|
+
the seam is an owner and a geometry index, on purpose.
|
|
606
|
+
- **A source geometry that is itself edited** is a full build (phase 3b), not a refit.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One tree in a batched refit: where it lives, and where its arrival counters live.
|
|
3
|
+
*
|
|
4
|
+
* The first four fields are what {@link GPUGeometryBVHManager#get_refit_target} answers, copied
|
|
5
|
+
* out at the frame the batch's tables are built. The other two are the batch's own: a tree's
|
|
6
|
+
* counters sit at `counters_offset` in one buffer that holds the counters of every tree in the
|
|
7
|
+
* batch — a prefix sum of node counts — and `geometry_index` is the row whose meshlets the leaf
|
|
8
|
+
* payloads index, which for a skinned clone is the clone's own row, the one skinning deformed.
|
|
9
|
+
*
|
|
10
|
+
* Read by {@link shader_blas_refit_batch} once per workgroup, through the workgroup lookup;
|
|
11
|
+
* written by {@link GPUBLASRefitBatch} when the set of trees or their residency changes.
|
|
12
|
+
*
|
|
13
|
+
* @type {WebGPUStruct}
|
|
14
|
+
*/
|
|
15
|
+
export const BLAS_REFIT_TARGET_STRUCT: WebGPUStruct;
|
|
16
|
+
import { WebGPUStruct } from "../../shader/type/WebGPUStruct.js";
|
|
17
|
+
//# sourceMappingURL=BLAS_REFIT_TARGET_STRUCT.d.ts.map
|