Filamat

actual object Filamat

Filamat is the Filament Material Compiler.

It compiles material source code (.mat files) into binary material packages that can be loaded by Filament's Material system. Filamat generates shader code for multiple backends (OpenGL, Vulkan, Metal, WebGPU) and optimizes them for performance.

Initialization: Call Filamat.init() before building any materials. This initializes internal compiler resources. Call Filamat.shutdown() when finished to release resources.

Typical usage:

Filamat.init()
val builder = MaterialBuilder()
.name("MyMaterial")
.shading(MaterialBuilder.Shading.LIT)
// ... configure material ...
.build()

val package = builder.package
// Use package with Engine.Material creation
Filamat.shutdown()

See also

expect object Filamat

Filamat is the Filament Material Compiler.

It compiles material source code (.mat files) into binary material packages that can be loaded by Filament's Material system. Filamat generates shader code for multiple backends (OpenGL, Vulkan, Metal, WebGPU) and optimizes them for performance.

Initialization: Call Filamat.init() before building any materials. This initializes internal compiler resources. Call Filamat.shutdown() when finished to release resources.

Typical usage:

Filamat.init()
val builder = MaterialBuilder()
.name("MyMaterial")
.shading(MaterialBuilder.Shading.LIT)
// ... configure material ...
.build()

val package = builder.package
// Use package with Engine.Material creation
Filamat.shutdown()

See also

actual object Filamat

Filamat is the Filament Material Compiler.

It compiles material source code (.mat files) into binary material packages that can be loaded by Filament's Material system. Filamat generates shader code for multiple backends (OpenGL, Vulkan, Metal, WebGPU) and optimizes them for performance.

Initialization: Call Filamat.init() before building any materials. This initializes internal compiler resources. Call Filamat.shutdown() when finished to release resources.

Typical usage:

Filamat.init()
val builder = MaterialBuilder()
.name("MyMaterial")
.shading(MaterialBuilder.Shading.LIT)
// ... configure material ...
.build()

val package = builder.package
// Use package with Engine.Material creation
Filamat.shutdown()

See also

actual object Filamat

Filamat is the Filament Material Compiler.

It compiles material source code (.mat files) into binary material packages that can be loaded by Filament's Material system. Filamat generates shader code for multiple backends (OpenGL, Vulkan, Metal, WebGPU) and optimizes them for performance.

Initialization: Call Filamat.init() before building any materials. This initializes internal compiler resources. Call Filamat.shutdown() when finished to release resources.

Typical usage:

Filamat.init()
val builder = MaterialBuilder()
.name("MyMaterial")
.shading(MaterialBuilder.Shading.LIT)
// ... configure material ...
.build()

val package = builder.package
// Use package with Engine.Material creation
Filamat.shutdown()

See also

actual object Filamat

Filamat is the Filament Material Compiler.

It compiles material source code (.mat files) into binary material packages that can be loaded by Filament's Material system. Filamat generates shader code for multiple backends (OpenGL, Vulkan, Metal, WebGPU) and optimizes them for performance.

Initialization: Call Filamat.init() before building any materials. This initializes internal compiler resources. Call Filamat.shutdown() when finished to release resources.

Typical usage:

Filamat.init()
val builder = MaterialBuilder()
.name("MyMaterial")
.shading(MaterialBuilder.Shading.LIT)
// ... configure material ...
.build()

val package = builder.package
// Use package with Engine.Material creation
Filamat.shutdown()

See also

Functions

Link copied to clipboard
actual fun init()

Initialize the Filamat compiler.

expect fun init()

Initialize the Filamat compiler.

actual fun init()

Initialize the Filamat compiler.

actual fun init()

Initialize the Filamat compiler.

actual fun init()

Initialize the Filamat compiler.

Link copied to clipboard
actual fun shutdown()

Release the compiler's global state. Call when done building materials.

expect fun shutdown()

Release the compiler's global state. Call when done building materials.

actual fun shutdown()

Release the compiler's global state. Call when done building materials.

actual fun shutdown()

Release the compiler's global state. Call when done building materials.

actual fun shutdown()

Release the compiler's global state. Call when done building materials.