17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-24 01:16:13 +02:00

feat(track): rails and ballast blended into those of the tracks joined, where their textures differ

This commit is contained in:
2026-10-21 22:34:57 +02:00
parent 407a555803
commit c5a894a674
19 changed files with 721 additions and 14 deletions

View File

@@ -111,6 +111,11 @@ public:
// the same material with its highlights damped, for faces which aren't polished like the surfaces they are cut from. backends which can't make one give back the material itself
virtual auto Matte_Material( material_handle const Material ) -> material_handle { return Material; }
virtual auto Tinted_Material( material_handle const Material, glm::vec3 const &Colour ) -> material_handle { return Material; }
// the material of a track blending its texture with those of up to three others (null: none) by the weights in y, z and w of the user data
// of the vertices, the others as grains with Grain (world/TrackBlend.h). backends which can't make one give back the material itself
virtual auto Blend_Material( material_handle const Material, std::array<material_handle, 3> const &Others, bool const Grain ) -> material_handle { return Material; }
// whether a material can be blended so
virtual auto Blendable_Material( material_handle const Material ) -> bool { return false; }
// heightmap terrain: material of a chunk blending the materials of up to 8 layers by their weights.
// Weights: (Samples + 1)^2 values per layer, planar, rows of growing z, the weights of a sample adding up to 255; null with a single layer.
// Placement: corner of the chunk (x, z) in the texture coordinates of its mesh, and the size of the chunk.