createTextureInstance

fun createTextureInstance(texture: Texture, isOpaque: Boolean = true, metallic: Float = kMaterialDefaultMetallic, roughness: Float = kMaterialDefaultRoughness, reflectance: Float = kMaterialDefaultReflectance): MaterialInstance

Creates an an opaque or transparent Material with the Texture passed in.

The Texture can be modified by calling MaterialInstance.setTexture. The metallicness, roughness, and reflectance can be modified using MaterialInstance.setMetallic, MaterialInstance.setRoughness, MaterialInstance.setReflectance.