ol-mapbox-style
ol-mapbox-style copied to clipboard
Hillshading - Difference with Maplibre
trafficstars
While the actual hill shading rendering function is available, some small differences persists compared to Maplibre.
It is probably due to the different procedure used to generate in shading the relief allowing to better render some details.
Maplibre algorithm is here : https://github.com/maplibre/maplibre-gl-js/blob/main/src/shaders/hillshade.fragment.glsl
Here is an example of (small) differences in the images below with a small advantage to Maplibre :
Maplibre

OpenLayers :

I'm also seeing this, there is a comparison in https://maparatus.github.io/ol-mapbox-style-spec/#paint_hillshade.hillshade-exaggeration if that helps, you can see the style here, and screenshot below