# Mesh imported from glb file showing black on android

**URL:** <https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249>\
**Category:** Questions\
**Created:** [July 5, 2020, 8:37pm UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249 "2020-07-05T20:37:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigb](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bigb](https://forum.babylonjs.com/u/bigb)\
**Post date:** [July 5, 2020, 8:37pm UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/1 "2020-07-05T20:37:11Z")

</div>

We have a model of a space ship and it does not seem to be rendering correctly on android devices, with the object appearing unlit (except for emissive colors). It seems to work fine on desktop browser and iPhone 8. Members of my team have tried on 3 different Android devices and all are showing the same issue. I can gather more info on the devices if needed.

I have tried forcing webgl version to 1 and/or using engine.getCaps().highPrecisionShaderSupported = false as mentioned in some other answers, but neither seems to help. In fact, disabling highPrecisionShaderSupported causes the same problem to happen on the iPhone 8, if that is helpful info. PC seems fine either way.

Here is a simple PG link with that loads the model and uses the same lighting as our viewer (though I also tried changing the lighting and it did not seem to help).

[https://www.babylonjs-playground.com/#8CRFQW](https://www.babylonjs-playground.com/#8CRFQW)

Any thoughts on how to fix this?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 5, 2020, 9:59pm UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/2 "2020-07-05T21:59:10Z")

</div>

Would be amazing to copy the error message you get in the console if any ?

I unfortunately do not have an android phone anymore ☹ @RaananW do you still have one ?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 5, 2020, 11:34pm UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/3 "2020-07-05T23:34:44Z")

</div>

Will check it tomorrow

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [July 6, 2020, 2:13am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/4 "2020-07-06T02:13:29Z")

</div>

@bigb your PG works fine on my old Samsung Galaxy S6 with Chrome.

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [July 6, 2020, 2:19am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/5 "2020-07-06T02:19:42Z")

</div>

Also worked in Firefox and Samsung Internet (although pretty sure the latter is just a wrapper for Chrome).

---

<div class="post-metadata">

**Author:** ![bigb](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bigb](https://forum.babylonjs.com/u/bigb)\
**Post date:** [July 6, 2020, 2:21am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/6 "2020-07-06T02:21:17Z")

</div>

Here is the console info from one of my team members:

 ![pgerrorinfo](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/c/c76ab0f63a58e6b97653dce944093cf7ec5cada6.jpeg)

He has a Mi A2 Lite. Unfortunately, I do not have an android device to try this on myself, so it’s been tricky trying to track this down.

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [July 6, 2020, 2:29am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/7 "2020-07-06T02:29:20Z")

</div>

@bigb those are some pretty big numbers for light position & intensity etc. Have you tried scaling these values down so that lights are closer to object and don’t need such high intensities etc?

---

<div class="post-metadata">

**Author:** ![bigb](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bigb](https://forum.babylonjs.com/u/bigb)\
**Post date:** [July 6, 2020, 2:49am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/8 "2020-07-06T02:49:39Z")

</div>

I did play around with the scales some, thinking maybe those big numbers were causing problems with reduced precision floats. After turning off the high precision shader support (which seems to cause the issue on my iPhone 8), scaling things down didn’t seem to make any difference. Of course, I don’t actually know that turning off high precision shader on my iPhone is the same as what is causing the problem on android, but it does look the same.

Here’s the reduced scale PG I was using:

[https://www.babylonjs-playground.com/#T0QB2X#5](https://www.babylonjs-playground.com/#T0QB2X#5)

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [July 6, 2020, 3:10am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/9 "2020-07-06T03:10:45Z")

</div>

`highPrecisionShaderSupport = false` caused issues on my Android. Reverting to `true` it’s fine.

Instead of scaling model down after load have you tried scaling and applying transformations to mesh before export?

---

<div class="post-metadata">

**Author:** ![bigb](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bigb](https://forum.babylonjs.com/u/bigb)\
**Post date:** [July 6, 2020, 3:14am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/10 "2020-07-06T03:14:15Z")

</div>

Actually @inteja, it seems you were on the right path! I had my android users try with the reduced scales and apparently it works ok now!

[https://www.babylonjs-playground.com/#T0QB2X#6](https://www.babylonjs-playground.com/#T0QB2X#6)

So I guess I will consider this solved (and get our modeler busy re-scaling things), though if anyone has any explanation why this is happening only on some devices, or what sorts of values and limits I should aim for, I would certainly appreciate it. I’m pretty new to all this.

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [July 6, 2020, 4:01am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/11 "2020-07-06T04:01:18Z")

</div>

> [@bigb](#):
>
> any explanation why this is happening only on some devices

Yes it’s interesting and I can’t pretend to understand the technical differences but I did a bit of digging and there does seem to be quite some variation in the way different mobile GPUs handle floating point precision e.g. Mi A2 Lite’s Adreno 506 vs Samsung Galaxy S6’s Mali-T760MP8 even when both support 32bit floating point on paper. See:

> **[Benchmarking floating-point precision in mobile GPUs](https://community.arm.com/arm-community-blogs/b/graphics-gaming-and-vr-blog/posts/benchmarking-floating-point-precision-in-mobile-gpus)**
>
> When we talk about GPU performance we usually talk about speed. But, In my next few blogs, I talk about benchmarking the quality of GPU floating-point arithmetic.

> **[Benchmarking floating-point precision in mobile GPUs Part 2](https://community.arm.com/arm-community-blogs/b/graphics-gaming-and-vr-blog/posts/benchmarking-floating-point-precision-in-mobile-gpus---part-ii)**
>
> This is the second in a series of blogs about floating-point quality in GPUs.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 6, 2020, 10:33am UTC](https://forum.babylonjs.com/t/mesh-imported-from-glb-file-showing-black-on-android/12249/12 "2020-07-06T10:33:21Z")

</div>

Most of our android issues (when I say ours I mean the lack of true spec support) seems to be related to a certain class of MALI chipset where we can unfortunately not do a lot on our side to fix ☹ but we at least now have one more trick in our sleaves.
