createMaterialInstance

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): 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

Output: mapping from glTF texcoord sets to Filament UV sets, written by the provider.

label

Optional debug name for the material instance.

extras

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

expect abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String? = null, 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

Output: mapping from glTF texcoord sets to Filament UV sets, written by the provider.

label

Optional debug name for the material instance.

extras

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

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): 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

Output: mapping from glTF texcoord sets to Filament UV sets, written by the provider.

label

Optional debug name for the material instance.

extras

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

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): 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

Output: mapping from glTF texcoord sets to Filament UV sets, written by the provider.

label

Optional debug name for the material instance.

extras

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

actual abstract fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): 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

Output: mapping from glTF texcoord sets to Filament UV sets, written by the provider.

label

Optional debug name for the material instance.

extras

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