Issues between ShadowGenerator and IOS/OSX


#1

Hello everyone,

We had very weird stuff happening with the latest Apple products :

Macbook OSX 10: https://youtu.be/p_SVYgJfJ2I
As you can see in the video, it feels like the computer is going to explode :smile:
Plus that is the first time in my life that I see a bug impacting the entire screen outside from the browser window! This only happens with last Macbook Pro, but we had no problem with former models.

|Operating System|Mac OSX 10 (Unknown Version)|
|Screen Resolution|1440 x 900|
|Web Browser|Chrome 71.0.3578.98|
|Browser Size|1417 x 677|
|IP Address|178.208.16.92|
|Color Depth|24|
|JavaScript|Enabled|
|Flash Version|Not Installed|
|Cookies|Enabled|
|User Agent|Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36|

Iphone X

With Iphone the page can’t load at all. It load a first time with an error saying its going to reload the page and when the page has been reloaded, it just can’t show anything.

We spent the entire afternoon looking for what may cause this. And everything stops bugging when we deleted all the ShadowGenerator. So logically it should come from that or something linked to ShadowGenerator.

We currently work with BABYLON V3.3.0

Tell me if you need anything more in order to catch the bug on your side.


#2

Woot! I love Apple product so much :smiley:

One day they will fix their crappy browser for sure…
Anyway.

Can you try with shadows but no blur for instance? Also try to overload console.error and console.log to display the error somewhere so we can get an idea of what is happening

Also do you repro with a Safari on Mac attached to your iphone ? (To get a sense of the error)


#3

Hello @Deltakosh,

In fact it doesn’t depend on the browser. Because the bug is showing no matter if we are on Safari, Chrome or Firefox. So it really is the last Macbook Pro.
And we did go to see the console but there isn’t any errors showing! Or can you tell me how to trigger one error linked to what we see?

Same thing with our iphone. As the page reloads really quickly, this is hard to catch the error in the console with safari open and attached to the phone.

The shadowGenerator we created didn’t set any parameters except the darkness, so I just tried with parameter useBlurExponentialShadowMap set to true but it still bugs.

Hope that helps :wink:


#4

this is sad :slight_smile: They shoudl test their products.

Let’s try another one: call this after creating your engine:

engine.getCaps().textureFloatRender = false;
engine.getCaps().textureHalfFloat= false;
engine.getCaps().textureHalfFloatRender= false;

Also make sure to create your engine with no webgl2 support


#5

Hello,

We tried with what you suggest and no webgl2 support and we still have the bug.

When testing we observed it actually gets worst when on MAC application which has a blur where you can see the 3D scene behind. Like in the video I sent when the select menu appears at the top, the menu has a blur effect.
It also gets worst with MAC animation, like when a window is showing or hiding with the 3D scene behind.

So indeed this must be a MACOS/WebGL conflict!
But why this is only when a ShadowGenerator is present? very curious :wink:


#6

tbh the stuttering on the mbp is pretty common when the gpu gets heavily used. I’ve got a dual 1080p monitor setup at work on a 2015 mbp, it tends to glitch out after an intensive day of 3d dev : same kind of stutters in your video, really weird artifacts on screen, and laggy inputs until you quit any 3d view. It gets even worse on the original retina display… I blame the really low spec gpus on that one, but I’ll agree that ShadowGenerators on Apple products tend to crash perfs like crazy, so I wouldn’t be surprised if the iphone just can’t stand it and gives up before giving a head’s up. We solved it with a blob “shadow” if you’re up for old school solutions :sob:

one thing you could try is through the iOS sim using the mbp’s safari’s “dev” console to connect to the open page in the sim. It can give at least a bit of draw context from the canvas, but it’s not a real application of what happens on device unfortunately


#7

Shadowgenerator is using render to textures so can you try with say a postprocess? I would like to reduce the list of culprits