UnlitMaterial
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.
auto material = vglx::UnlitMaterial::Create({
.color = 0xFFFFFF,
.texture_map = texture
});
my_scene->Add(vglx::Mesh::Create(geometry, material));INFO
Derives from Material and inherits all public properties and methods.
Construction
Constructors
UnlitMaterial()
Constructs an unlit material with default parameters.
UnlitMaterial::UnlitMaterial();UnlitMaterial()
Constructs an unlit material from the given parameters.
UnlitMaterial::UnlitMaterial(const Parameters& params);| Parameter | Description |
|---|---|
| params | Initialization parameters. |
Factories preferred
UnlitMaterial::Create() std::shared_ptr<UnlitMaterial>
Creates a shared instance of UnlitMaterial with default parameters.
static std::shared_ptr<UnlitMaterial> UnlitMaterial::Create();UnlitMaterial::Create() std::shared_ptr<UnlitMaterial>
Creates a shared instance of UnlitMaterial.
static std::shared_ptr<UnlitMaterial> UnlitMaterial::Create(const Parameters& params);| Parameter | Description |
|---|---|
| params | Initialization parameters. |
Types
UnlitMaterial::Parameters struct
Parameters for constructing an UnlitMaterial object.
| Parameter | Description |
|---|---|
| color Color | Base surface color. |
| texture_map std::shared_ptr<Texture> | Surface color texture. |
| alpha_map std::shared_ptr<Texture> | Per-pixel opacity map. |
Properties
Alpha-only texture providing per-pixel opacity.
std::shared_ptr<Texture> alpha_map {};Color texture sampled for rendering; alpha channel controls transparency.
std::shared_ptr<Texture> texture_map {};Functions
Identifies this material as Material::Type::UnlitMaterial.
Type UnlitMaterial::GetType() const override;