UnlitMaterial
Unlit material rendered without lighting.
Renders surfaces using a uniform color or texture without applying any illumination or shading. Useful for UI elements, overlays, debug geometry, or stylized effects where lighting is not desired. Transparency is supported through the alpha channel of the texture or a separate alpha map.
cpp
auto material = vglx::UnlitMaterial::Create(0xFFFFFF);
material->texture_map = texture;
auto mesh = vglx::Mesh::Create(geometry, material);
scene->Add(mesh);INFO
Derives from Material and inherits all public properties and methods.
Construction
Constructors
UnlitMaterial()
Constructs an unlit material.
cpp
UnlitMaterial::UnlitMaterial(const Color& color);| Parameter | Description |
|---|---|
| color | Base color of the material. |
Factories preferred
UnlitMaterial::Create() auto
Creates a shared instance of UnlitMaterial.
cpp
static auto UnlitMaterial::Create(const Color& color=0xFFFFFF);| Parameter | Description |
|---|---|
| color | Base color of the material. |
Properties
Alpha-only texture providing per-pixel opacity.
cpp
std::shared_ptr<Texture2D> alpha_map {nullptr};Color texture sampled for rendering; alpha channel controls transparency.
cpp
std::shared_ptr<Texture2D> texture_map {nullptr};Functions
Identifies this material as Material::Type::UnlitMaterial.
cpp
Type UnlitMaterial::GetType() const override;