UnlitMaterial
Represents a material for surfaces that are not affected by lights.
This material is used to render objects with uniform color or texture, without any lighting calculations. It is ideal for UI elements, 2D overlays, or wireframes where shading is not desired.
cpp
auto material = vglx::UnlitMaterial::Create(0x049EF4);
material->albedo_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()
cpp
vglx::UnlitMaterial::UnlitMaterial(const Color &color)
Parameter | Description |
---|---|
color | Color of the material. |
Constructs a UnlitMaterial object.
Factories preferred
UnlitMaterial::Create() auto
cpp
static auto vglx::UnlitMaterial::Create(const Color &color=0xFFFFFF)
Parameter | Description |
---|---|
color | Color of the material. |
Creates a shared pointer to a UnlitMaterial object.
Properties
Albedo (base color) map, optionally containing an alpha channel.
Alpha map that controls the opacity across the surface.
Functions
GetType() MaterialType virtual
cpp
MaterialType vglx::UnlitMaterial::GetType() const override
Returns material type.