17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-23 04:11:11 +02:00

feat(terrain): grass follows the seasons and fades out over gfx.grass.fadedistance

This commit is contained in:
2026-10-20 02:20:03 +02:00
parent ceb439b218
commit 07ac7406a0
13 changed files with 129 additions and 28 deletions

View File

@@ -800,9 +800,11 @@ void terrain_streamer::publish_grass(glm::dvec3 const &Camera)
entry.width = kind.width;
entry.density = kind.density;
entry.bend = kind.bend;
entry.dry = glm::pow(glm::clamp(kind.dry, glm::vec3{0.f}, glm::vec3{1.f}), glm::vec3{2.2f});
entry.seasonal = kind.seasonal;
kinds.push_back(entry);
}
auto const reach{static_cast<double>(Global.gfx_grass_distance) + 2.0};
auto const reach{static_cast<double>(std::max(Global.gfx_grass_distance, Global.gfx_grass_fadedistance)) + 2.0};
for (auto const &entry : m_chunks)
{
auto const &chunk{*entry.second};