17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 12:48:35 +01:00

Shade the sky and the sun by the scenery around the camera instead of the track environment flags

This commit is contained in:
2026-10-27 16:02:36 +01:00
parent 9dde5b0e5e
commit 2a876befb0
35 changed files with 2351 additions and 55 deletions

View File

@@ -64,6 +64,8 @@ void main()
vec3 walls = abs(world) / (0.5 * size);
opacity *= 1.0 - smoothstep(0.7, 1.0, max(max(walls.x, walls.y), walls.z));
opacity *= smoothstep(0.15, 0.6, length(world));
// none under the roofs, the bridges, in the tunnels
opacity *= 1.0 - sky_occlusion_cover(world);
if (opacity <= 0.002)
return;
vec3 tail = -move * timing.y;