Contents

UnlitMaterial

A material that doesn’t respond to lights in the scene.

Declaration

struct UnlitMaterial

Mentioned in

Overview

UnlitMaterial materials do not respond to virtual or real lighting.

Add an UnlitMaterial to a model by setting it as one of the materials in a ModelComponent.

let unlitMaterial = UnlitMaterial(color: .red)
let model = ModelComponent(
    mesh: .generateBox(size: 1),
    materials: [unlitMaterial]
)
redBoxEntity.components.set(model)

For example, a SimpleMaterial on the left, and an UnlitMaterial on the right:

Simplematerial

UnlitMaterial

[Image]

[Image]

Topics

Creating an unlit material

Configuring base color

Tinting an unlit material

Controlling opacity

Classes

Initializers

Instance Properties

Type Aliases

See Also

Unlit materials