UbershaderProvider

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "createMaterialInstance/getMaterial throw — filament.js does not expose the ubershader material provider; use precompiled .filamat materials on web.")
actual class UbershaderProvider(engine: Engine) : MaterialProvider

UbershaderProvider uses pre-compiled ubershader materials.

This is the recommended MaterialProvider for most use cases. It uses a small set of pre-compiled, flexible materials that cover most glTF 2.0 features, avoiding the overhead of JIT compilation while maintaining broad compatibility.

See also

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "createMaterialInstance/getMaterial throw — filament.js does not expose the ubershader material provider; use precompiled .filamat materials on web.")
expect class UbershaderProvider(engine: Engine) : MaterialProvider

UbershaderProvider uses pre-compiled ubershader materials.

This is the recommended MaterialProvider for most use cases. It uses a small set of pre-compiled, flexible materials that cover most glTF 2.0 features, avoiding the overhead of JIT compilation while maintaining broad compatibility.

See also

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "createMaterialInstance/getMaterial throw — filament.js does not expose the ubershader material provider; use precompiled .filamat materials on web.")
actual class UbershaderProvider(engine: Engine) : MaterialProvider

UbershaderProvider uses pre-compiled ubershader materials.

This is the recommended MaterialProvider for most use cases. It uses a small set of pre-compiled, flexible materials that cover most glTF 2.0 features, avoiding the overhead of JIT compilation while maintaining broad compatibility.

See also

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "createMaterialInstance/getMaterial throw — filament.js does not expose the ubershader material provider; use precompiled .filamat materials on web.")
actual class UbershaderProvider(engine: Engine) : MaterialProvider

UbershaderProvider uses pre-compiled ubershader materials.

This is the recommended MaterialProvider for most use cases. It uses a small set of pre-compiled, flexible materials that cover most glTF 2.0 features, avoiding the overhead of JIT compilation while maintaining broad compatibility.

See also

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "createMaterialInstance/getMaterial throw — filament.js does not expose the ubershader material provider; use precompiled .filamat materials on web.")
actual class UbershaderProvider(engine: Engine) : MaterialProvider

UbershaderProvider uses pre-compiled ubershader materials.

This is the recommended MaterialProvider for most use cases. It uses a small set of pre-compiled, flexible materials that cover most glTF 2.0 features, avoiding the overhead of JIT compilation while maintaining broad compatibility.

See also

Constructors

Link copied to clipboard
actual constructor(engine: Engine)
expect constructor(engine: Engine)

Create an UbershaderProvider.

actual constructor(engine: Engine)
actual constructor(engine: Engine)
actual constructor(engine: Engine)

Properties

Link copied to clipboard
var nativeHandle: CPointer<FilaMaterialProvider>?

Functions

Link copied to clipboard
actual open override fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

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

expect open override 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.

actual open override fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

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

actual open override fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

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

actual open override fun createMaterialInstance(config: MaterialKey, uvmap: IntArray, label: String?, extras: String?): MaterialInstance?

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

Link copied to clipboard
actual open override fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

expect open override fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

actual open override fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

actual open override fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

actual open override fun destroy()

Frees the provider itself (cached materials survive unless destroyMaterials was called).

Link copied to clipboard
actual open override fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

expect open override fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

actual open override fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

actual open override fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

actual open override fun destroyMaterials()

Destroys all cached materials. NOT called automatically on destroy, which lets clients take ownership of the cache if desired.

Link copied to clipboard
actual open override fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

expect open override fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String? = null): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

actual open override fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

actual open override fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

actual open override fun getMaterial(config: MaterialKey, uvmap: IntArray, label: String?): Material?

Creates or fetches the compiled Filament material corresponding to config, without instancing it.

Link copied to clipboard
actual open override fun getMaterials(): Array<Material>

Gets the provider's cache of compiled materials (weak references).

expect open override fun getMaterials(): Array<Material>

Gets the provider's cache of compiled materials (weak references).

actual open override fun getMaterials(): Array<Material>

Gets the provider's cache of compiled materials (weak references).

actual open override fun getMaterials(): Array<Material>

Gets the provider's cache of compiled materials (weak references).

actual open override fun getMaterials(): Array<Material>

Gets the provider's cache of compiled materials (weak references).

Link copied to clipboard
open override fun getNativeHandle(): MemorySegment?

The underlying FilaMaterialProvider* — used by AssetLoader.

open override fun getNativeHandle(): CPointer<FilaMaterialProvider>?
Link copied to clipboard
open override fun getNativeProvider(): MaterialProvider
Link copied to clipboard
actual open override fun needsDummyData(attrib: Int): Boolean

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.

expect open override fun needsDummyData(attrib: Int): Boolean

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.

actual open override fun needsDummyData(attrib: Int): Boolean

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.

actual open override fun needsDummyData(attrib: Int): Boolean

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.

actual open override fun needsDummyData(attrib: Int): Boolean

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.