Light Map - c++ 3D

Light

The scene world must have light.

Enable Lighting

The target rendering object must enable lighting.

Material Light Map Type

Material type must be set to any one of supported light map type.

Two Layers of Texture

Tex 0 is used as solid material texture.

Tex 1 is used as light map lighting material texture.

Texture UV supports Light Map

Upgrade texture UV to support light map.


auto * object = new d_3d::light_map_object;
object->set_material_type(d_3d::light_map_type);
object->set_texture(0, tex0_image);
object->set_texture(1, tex1_image);
delete object;
object = nullptr;

Mon Aug 11 11:48:24 PM UTC 2025