mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-03 15:55:27 +01:00
5c4dbb5831
Step 4 of docs/world-format-eu07.md, its third part. The clouds, the volumetric fog and the shadows of the clouds are worked out in the local axes of the body at the camera: their passes take the view turned from those axes (gfx::weather_rotation) and the place of the camera in them (weather_state::follow / place: the steps of the camera turned into the local axes and its height above the ellipsoid, as no map of a body keeps the distances everywhere). The shaders turn the offsets and directions they hand to the fog and to the cloud shadows with world_frame. The sun shadows cap the height of the sun and look along it against the vertical at the camera (shadow_fit::light_vector, light_up). On the plane, the only body loaded today, the camera, the rotations and the up vector are the ones they were.