Material

Represents a reference to a material.

Constructors

Link copied to clipboard
constructor(filamentMaterial: Material)
constructor(filamentMaterial: Material, useDefaultInstance: Boolean)
constructor(@Nullable lifecycle: Lifecycle, materialInstance: MaterialInstance)

Types

Link copied to clipboard
class Builder
Builder for constructing a Material

Properties

Link copied to clipboard
Link copied to clipboard
val filamentMaterialInstance: MaterialInstance

Functions

Link copied to clipboard
Constructs a Material
Link copied to clipboard
Link copied to clipboard
open fun getFilamentMaterialInstance(): MaterialInstance
Link copied to clipboard
open fun makeCopy(): Material
Creates a new instance of this Material.
Link copied to clipboard
open fun setBaseColorTexture(texture: Texture)
Link copied to clipboard
open fun setBoolean(name: String, x: Boolean)
Link copied to clipboard
open fun setBoolean2(name: String, x: Boolean, y: Boolean)
Link copied to clipboard
open fun setBoolean3(name: String, x: Boolean, y: Boolean, z: Boolean)
Link copied to clipboard
open fun setBoolean4(name: String, x: Boolean, y: Boolean, z: Boolean, w: Boolean)
Link copied to clipboard
open fun setDepthTexture(name: String, depthTexture: Texture)
    Sets a Texture to a parameter of the type 'sampler2d' on this material.
Link copied to clipboard
open fun setExternalTexture(name: String, externalTexture: ExternalTexture)
Sets an ExternalTexture to a parameter of type 'samplerExternal' on this material.
Link copied to clipboard
open fun setFloat(name: String, x: Float)
Link copied to clipboard
open fun setFloat2(name: String, x: Float, y: Float)
Link copied to clipboard
open fun setFloat3(name: String, color: Color)
open fun setFloat3(name: String, value: Vector3)
open fun setFloat3(name: String, x: Float, y: Float, z: Float)
Link copied to clipboard
open fun setFloat4(name: String, color: Color)
open fun setFloat4(name: String, x: Float, y: Float, z: Float, w: Float)
Link copied to clipboard
open fun setInt(name: String, x: Int)
Link copied to clipboard
open fun setInt2(name: String, x: Int, y: Int)
Link copied to clipboard
open fun setInt3(name: String, x: Int, y: Int, z: Int)
Link copied to clipboard
open fun setInt4(name: String, x: Int, y: Int, z: Int, w: Int)
Link copied to clipboard
open fun setTexture(name: String, texture: Texture)