Open birkskyum opened 5 months ago
Taking the texture is problematic in terms of performance and how the hillshade behaves when rotating the map - these are the problematic parts of the terrain implementation. But maybe this approach can be used as a separate shader somehow differently, IDK...
I've tested it, and we cannot activate Vector tiles. FOG is not active on Vector. How can we achieve this?
Current, the fog is part of the hillshade/terrain shader, and thus only active on Terrain 3D mode.
Repro is to disable the terrain here https://maplibre.org/maplibre-gl-js/docs/examples/sky-with-fog-and-terrain/
If would be great also to have the fog in 2D.
Below, I've taken the terrain3d shader and just passed it a 0 elevation, which will give a flat terrain with fog (and hillshade). I don't know if it's the best path to go to "always/default" run through the terrain shader.
The advantage is that we don't need conditional logic around 3d or not 3d, so positioning objects and tile handling might become easier / more consistent, also with globe mode. Disadvantage might be unwanted overhead in cases where none of it is needed, but maybe it's better to just opt-out there.
before
after