createMaterialInstance

fun createMaterialInstance(config: MaterialKey, uvmap: UvMap, label: String? = "material", extras: String? = null): MaterialInstance?

Creates or fetches a compiled Filament material, then creates an instance from it.

Parameters

config

Properties of the glTF material; may be mutated to trim unsupported features.

uvmap

Mapping from glTF texcoord sets to Filament UV sets, written by the provider.

label

Debug name for the material instance.

extras

glTF extras as stringified JSON (not part of the cache key).