MaterialProvider
MaterialProvider supplies materials to glTF assets during loading: the ubershader provider picks from a pre-compiled set of materials, see createUbershaderProvider.
See also
Properties
The materials compiled so far (weak references). materialsCount counts the cache's slots, which fill as they're used.
The native object, for interop with code calling the Fila* C API directly. Read-only: this wrapper owns it.
Functions
Creates or fetches a compiled Filament material, then creates an instance from it.
Frees the provider itself; cached materials survive unless destroyMaterials was called.
Destroys all cached materials. NOT called by destroy, which lets clients take ownership of the cache if desired.
Creates or fetches the compiled Filament material corresponding to config, without instancing it.
Returns true if the given vertex attribute must be present. Some providers (e.g. ubershader) require dummy attribute values when the glTF model does not provide them.