UnlitMaterial
A material that doesn’t respond to lights in the scene.
Declaration
struct UnlitMaterialMentioned 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:
| |
|---|---|
[Image] | [Image] |
Topics
Creating an unlit material
init()init(color:)init(applyPostProcessToneMap:)init(color:applyPostProcessToneMap:)init(program:)init(texture:)
Configuring base color
Tinting an unlit material
Controlling opacity
Classes
Initializers
Instance Properties
faceCullingprogramreadsDepthsecondaryTextureCoordinateTransformtextureCoordinateTransformtintColortriangleFillModewritesDepth