rememberStandardMaterial

fun rememberStandardMaterial(type: StandardMaterial, engine: Engine = LocalFilamentEngine.current ?: noFilamentEngine()): Material

The shared base Material for a StandardMaterial, built on engine and kept alive for the lifetime of the enclosing rememberFilamentScene (one per engine + type, reused across call sites). Outside a scene — when engine is hoisted via rememberFilamentEngine — it builds a material owned by this call site and destroyed when it leaves the composition.

Use this when you want to manage MaterialInstances yourself; otherwise prefer the convenience helpers like rememberColorMaterialInstance.

Parameters

type

Which built-in material to build.

engine

Engine to build on. Defaults to the engine in the current composition scope.