StrandedKitty / streets-gl

🗺 OpenStreetMap 3D renderer powered by WebGL2
http://streets.gl
MIT License
658 stars 49 forks source link

3D features ignore terrain elevation #110

Closed bloerwald closed 9 months ago

bloerwald commented 1 year ago

Describe the bug

With terrain elevation turned on, everything is floating in the air. Location is irrelevant, only determines how high things float.

Expected behavior

Things should clamp to the ground.

Screenshots

image image

System information

Additional context

Console shows possibly related warning:

[Log]     Vendor: Apple Inc.                         (main.460c71927472f098d2fd.js, line 4206)
          Renderer: Apple GPU
[Warning] Couldn't sample height                     (main.460c71927472f098d2fd.js, line 4192, x6)
ivanbranco commented 1 year ago

Seems to be a Safari related problem, reported also with Safari 16.3 (link)

kayD commented 1 year ago

I experience a possibly related problem #133

wiesmann commented 1 year ago

I'm seeing the same issue with Safari 16.5.2, note that the buildings on the nearby mountain (Züriberg) at around 600m altitude seem to correctly elevated, while the buildings in the plains (~430m) seem to be flying.

StreetsGl2 StreetsGL1

kayD commented 1 year ago

@wiesmann It would be nice to know if on Safari the strange behavior shown in 133#issuecomment-1611086030 is also present.

bloerwald commented 1 year ago

It would be nice to know if on Safari the strange behavior shown in 133#issuecomment-1611086030 is also present.

Not that exact behavior, but it really is weird: https://www.youtube.com/watch?v=o66AbxiUXxE

gy-mate commented 9 months ago

The issue still persists in Safari 17.2.1.

StrandedKitty commented 9 months ago

@bloerwald @ivanbranco @kayD @wiesmann @gy-mate Hi guys, please let me know if any of you can still reproduce this problem. It seems like there is a bug in some webgl implementations related to immutable textures (or it's just me not using this part of the API properly), so I've changed the code a bit and it should be fixed now.

gy-mate commented 9 months ago

@StrandedKitty It works for me now, thanks a lot! :)

kayD commented 9 months ago

@StrandedKitty No issues with floating any more, neither on Firefox 120.0, nor on Vivaldi 6.5 (both on ubuntu)! Thanks so much!

wiesmann commented 9 months ago

Also fixed in Safari, thank you very much.

bloerwald commented 9 months ago

image image

Original location to confirm, beautiful drop down to the neighbouring village. :)

kayD commented 9 months ago

@bloerwald which one is the correct image, the elevation in the second screenshot is much more pronounced (can be easily seen by flipping the two images back and forth). Was this another problem apart from the floating buildings?

bloerwald commented 9 months ago

@bloerwald which one is the correct image, the elevation in the second screenshot is much more pronounced (can be easily seen by flipping the two images back and forth). Was this another problem apart from the floating buildings?

Bottom one is with enabled terrain, top with disabled, see settings in top right. Terrain was fine before, it was only the buildings from what I can remember. Features are now correctly attached to terrain.

kayD commented 9 months ago

Please excuse stupid me overlooking that setting... Thanks for the answer!