SimpleMaterial
A basic material that responds to lights in the scene.
Declaration
struct SimpleMaterialOverview
SimpleMaterial responds to both real and virtual lighting to enhance realism.
Add a SimpleMaterial to a model by setting it as one of the materials in a ModelComponent.
let simpleMaterial = SimpleMaterial(
color: .red, isMetallic: false
)
let model = ModelComponent(
mesh: .generateBox(size: 1),
materials: [simpleMaterial]
)
redBoxEntity.components.set(model)For example, a red SimpleMaterial that is not metallic, and one that is metallic:
Not metallic | Metallic |
|---|---|
[Image] | [Image] |