shuding / cobe

5kB WebGL globe lib.
https://cobe.vercel.app
MIT License
3.25k stars 176 forks source link

Sample code not working on Chrome on Android 12 #16

Closed rjyo closed 2 years ago

rjyo commented 2 years ago

Thanks for the great lib!

The Demo does not work. It looks like the texture is not wrapped around the globe.

The following two work

I tried to put it in a minimum next.js app, the result is the same as the demo on cobe.vercel.app.

https://github.com/rjyo/cobe-test

https://cobe-test.vercel.app/

rjyo commented 2 years ago

I found out that the working demos are using 0.4.0. It's only broken in the latest 0.4.1 version with the shader.

diegobarroso commented 2 years ago

Indeed, it also works in mobile using version 0.4.0 using Angular. https://codesandbox.io/s/broken-darkness-1e97o

shuding commented 2 years ago

It was possibly introduced in https://github.com/shuding/cobe/commit/d8b449df43e89c5ecdcaa2f0fa3e42eed3df2dc8, which needs further investigation.

farteryhr commented 2 years ago

https://codesandbox.io/s/xvuej?file=/src/App.js

a hacky solution but at least works on my android device.

need to find an elegant and compatible way (among webgl shader implementations) to preserve lowest bits / get reliable warping behavior on overflow for multiplication. int is THE pitfall.

meerns commented 2 years ago

any update on this ? @shuding

shuding commented 2 years ago

Apologize for the delay, I just released v0.4.2 which includes @farteryhr's fix. But unfortunately I don't have an Android device to verify, hope one of you can give it a test :)

meerns commented 2 years ago

I tested it and it's working 🎉🚀 @shuding Platform: Chrome 99 - Android 12

https://bespoke-mochi-44d1f5.netlify.app/

shuding commented 2 years ago

Thanks!