instance

  • Creates GPU instances (with EXT_mesh_gpu_instancing) for shared Mesh references. In engines supporting the extension, reused Meshes will be drawn with GPU instancing, greatly reducing draw calls and improving performance in many cases. If you're not sure that identical Meshes share vertex data and materials ("linked duplicates"), run dedup first to link them.

    Example:

    import { dedup, instance } from '@gltf-transform/functions';
    
    await document.transform(
        dedup(),
        instance({min: 2}),
    );
    
Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.