three-mesh-ui icon indicating copy to clipboard operation
three-mesh-ui copied to clipboard

IOS error.

Open gonnavis opened this issue 4 years ago • 8 comments

I ran into a problem with ios running, I added vconsole to previous demos:

https://raw.githack.com/gonnavis/three.js/three-mesh-ui/examples/three-mesh-ui_hellospaceworld.html

https://raw.githack.com/gonnavis/three.js/three-mesh-ui/examples/three-mesh-ui.html

on my iphone6sp safari ios13.6.1 can see these errors:

image

colleague's iphoneXR safari ios14.2 see these errors too:

image

pc and android work OK.

gonnavis avatar Dec 04 '20 09:12 gonnavis

Ah that's because of WebGL 1.0...
I ported the shaders to WebGL 2.0 since it's the default three.js renderer now, but WebGL 2.0 in IOS is still under a flag.

I will make it adapted to WebGL 1.0, in the meantime enable WebGL 2.0 for testing

felixmariotto avatar Dec 04 '20 12:12 felixmariotto

So as I understand it, this was caused by this fix I made a few days ago. At that time I gathered that the things you add at the begining of a THREE.ShaderMaterial shader, like extensions, are actually prepended when compiled by three.js. It didn't matter for Chrome and others, but iOS does not want extensions enabled elsewhere that at the very beginning of a shader. In a hurry to fix it fast, I removed it altogether. But my shader actually needed the derivatives extension, and I didn't have an opportunity to test again with a WebGL 1.0 browser so I didn't realize it until now.

Now it should be fixed with version 4.4.7, but please can you take the time to enable WebGL 2.0 in Safari Experimental Features and see if it works both with WebGL 1.0 and 2.0 in Safari ? I can't test myslef because I don't have an iPhone.

felixmariotto avatar Dec 04 '20 14:12 felixmariotto

Thanks! Windows Android IOS are all works well now.

I'll try to turn on WebGL 2.0 in Safari and test.

gonnavis avatar Dec 05 '20 02:12 gonnavis

After turn on ios safari experimental WebGL 2.0, the above demos does not display anything, and warning:

THREE.WebGLRenderer: OES_texture_float_linear extension not supported.

gonnavis avatar Dec 06 '20 02:12 gonnavis

Ok thanks for the pointer... I'm tired of safari...

felixmariotto avatar Dec 06 '20 08:12 felixmariotto

Are you still using Safari 13.6.1 ?
Does it work on your colleague's iPhone with 14.2 ?

Because it doesn't seem related to the derivatives extension.

felixmariotto avatar Dec 06 '20 09:12 felixmariotto

Yes, I still using ios13.6.1. I just asked my colleague to help test the iphoneXR ios14.2 safari WebGL 2.0, there is the same warning but the "Hello world" text can be displayed normally. So this should be a problem with the ios13 system. For me, there is no strong need to enable WebGl 2.0 on ios13, as long as safari can display text under the default settings, so the current state is very OK.

gonnavis avatar Dec 06 '20 11:12 gonnavis

OK, so let's keep it as it is for now, but I will keep this issue open until Safari release a version with a stable WebGL 2.0 by default.

felixmariotto avatar Dec 06 '20 12:12 felixmariotto