17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-30 00:27:29 +01:00

feat(renderer): a matte variant of a material for the parts of rails no wheel rolls on: it lights the same maps as weathered steel, with the weathering scaled per vertex by userdata, so a polished running surface fades into unused steel without a bright stripe; the cut faces of rails are drawn in it in an extra pass

This commit is contained in:
maj00r
2026-10-13 18:30:16 +02:00
parent c7f9796387
commit 7e1b2c553c
7 changed files with 133 additions and 0 deletions

View File

@@ -142,6 +142,9 @@ public:
// material described by provided text (the content of a .mat file), not kept in a file. returns: handle to the material or null_handle
material_handle
create_from_text( std::string const &Name, std::string const &Definition );
// copy of provided material with its specular highlights and reflections damped. returns: handle to the copy, made once per material
material_handle
create_matte( material_handle const Material );
opengl_material const &
material( material_handle const Material ) const { return m_materials[ Material ]; }
opengl_material &
@@ -170,6 +173,7 @@ private:
// members:
material_sequence m_materials;
index_map m_materialmappings;
std::unordered_map<material_handle, material_handle> m_mattes;
};
//---------------------------------------------------------------------------