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

feat(track): the texture of a shared running surface blends into the texture of the rail it lies on: 2 cm on each side of the boundary both are drawn in tinted variants of their materials that fade per vertex into the mean colour of the two treads, sampled from the texture files, so the edge of the wheels of the other track leaves a soft band instead of a line

This commit is contained in:
maj00r
2026-10-14 00:01:20 +02:00
parent 1219dde073
commit 592d1687d5
9 changed files with 168 additions and 35 deletions

View File

@@ -145,6 +145,8 @@ public:
// 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 );
material_handle
create_tinted( material_handle const Material, glm::vec3 const &Colour );
opengl_material const &
material( material_handle const Material ) const { return m_materials[ Material ]; }
opengl_material &
@@ -174,6 +176,7 @@ private:
material_sequence m_materials;
index_map m_materialmappings;
std::unordered_map<material_handle, material_handle> m_mattes;
std::map<std::tuple<material_handle, float, float, float>, material_handle> m_tints;
};
//---------------------------------------------------------------------------