Open matteiben-onx opened 1 month ago
Hi @matteiben-onx,
Could you please elaborate more on the expected behavior? Starting with v3.x, GL JS no longer supports the optimizeForTerrain
map option. Layer rendering on the globe and terrain is always optimized now.
@stepankuzmin Sure thing
What I'd expect is shown in seconds 2 - 7 in this video https://github.com/user-attachments/assets/f3f3c43a-e129-49cb-b805-cb1553eaed98
Notice as the camera pans, the lighting updates smoothly. As pointed out above, the smoothly updating lighting is not the norm, even on v2.15.0. I had to get the map into a very specific scenario to result in the smooth lighting updates.
Using v3.4 (with optimizeForTerrain
removed), the gif below shows a behavior where the lighting only updates once the camera has stopped and on mouseup.
Let me know if I can provide more details.
Hi Team Mapbox - appreciate the sync this afternoon. After reviewing our upcoming roadmap intentions, we would appreciate the MB team being able to prioritize looking at this since it's impactful to the customer experience of an upcoming release we are planning.
mapbox-gl-js version: 2.15.0
browser: Chrome
Description
In v2.15.0, when using dynamic hillshade with 3D terrain applied, lighting does not update smoothly. There is one edgecase where it does seem to update smoothly, as noted below.
When in 2D in this example https://docs.mapbox.com/mapbox-gl-js/example/hillshade/, the dynamic hillshade lighting updates smoothly.
In v3+, dynamic hillshade lighting with 3D terrain applied continues to not update smoothly, although the behavior is slightly different than this demo using v2.15.0.
Also worth noting is the mobile SDKs update lighting smoothly in the same scenarios.
Steps to Trigger Behavior
Demo Video: https://github.com/user-attachments/assets/f3f3c43a-e129-49cb-b805-cb1553eaed98
Note at first, the dynamic hillshade lighting updates smoothly. Once I comment other either of the two lines, it will start updating only once the camera has stopped and on mouseup.
Link to Demonstration
Doesn't seem to render correctly in jsbin, so pasting code here
Expected Behavior
In this example, dynamic hillshade lighting updates smoothly. I would expect it to work this way when 3D terrain is added to the map as well.
Actual Behavior
In v2.15, the hillshade only updates smoothly in 3D under a very specific scenario. Under all other scenarios, the lighting updates on camera stop and mouse up.
In v3+, the lighting behavior is slightly different, but still does not update smoothly.