# Texture flickering in Android

**URL:** <https://forum.needle.tools/t/texture-flickering-in-android/409>\
**Category:** 🌵 Needle Engine\
**Tags:** question\
**Created:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409 "2023-06-26T00:00:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/1 "2023-06-26T00:00:00Z")

</div>

Hi! I am currently facing a problem that model texture flickers only on android browser. It works fine on PC and IOS.  
All the materials are using URP Lit shader. I have tried changing the clipping planes of the camera in case if this is something related to z-fighting but unfortunately it did not work  
So far I found out that if I remove the normal map, the flicker disappear. This workaround works fine in this case but it will be a problem if I need using normal map in the future, so I would like to identify the reason.

Any ideas would be appreciated!

 ![image.png](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/1X/9f39b1bcf06dccef7a5d6d62f3e61bc59e23af02.png)  

[https://cdn.discordapp.com/attachments/1122807555425579008/1122807556495126589/SPOILER\_flickering.mp4?ex=65d31306&is=65c09e06&hm=00710da0a02305593c592221d1db6ddd63e8c297faa3ad64408eb0bc193b3e10&(image larger than 2 MB)](https://cdn.discordapp.com/attachments/1122807555425579008/1122807556495126589/SPOILER_flickering.mp4?ex=65d31306&is=65c09e06&hm=00710da0a02305593c592221d1db6ddd63e8c297faa3ad64408eb0bc193b3e10&)

[Original Post on Discord](https://discord.com/channels/717429793926283276/1122807555425579008)

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/2 "2023-06-26T00:00:00Z")

</div>

Hi, this looks very odd, I haven’t seen this before.

Can you share your scene scale and clipping plane settings? near far  
And did you modify the directional light shadow settings by any chance?  
 ![image.png](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/1X/3417a9ef092a0d3ff63b66d5ba97437a52d94c12.png)

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/3 "2023-06-26T00:00:00Z")

</div>

Sure. Here are my settings. Am I not supposed to change the values in Light Shadow Data?  
Also I am not sure what “scene scale” means so I took a screenshot showing the size of the camera, the light and the models, is this what you want?

 ![image.png](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/1X/843de92b53d1c4b6276542343761a4c6a33b6d17.png)  
 ![image.png](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/1X/1ce71c6d31259fb42490b8df30899d0bbdc61c78.png)  
 ![image.png](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/1X/76f4db62b9311d6cced3fd6976e1451d430c4a87.jpeg)

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/4 "2023-06-26T00:00:00Z")

</div>

Yes you are, my guess would just be that a huge size might lead to the issue that you’re seeing. 500x500 seems pretty large (especially for the 2k texture).  
Can you try with a smaller shadow size (50x50 for testing) and setting the near plane of your camera to something like 1 or 10?

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/5 "2023-06-26T00:00:00Z")

</div>

Tried 50x50 with both near plane 1 and 10 but unfortunately the flickering still exists.

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/6 "2023-06-26T00:00:00Z")

</div>

It does really look like zfighting as you said. Are you sure you don’t have overlapping geometry in the scene?

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/7 "2023-06-26T00:00:00Z")

</div>

The issue only appearing on mobile could mean it has to do with a lower shader precicion being used on weaker devices. But that’s just a wild guess.

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/8 "2023-06-26T00:00:00Z")

</div>

Yes, I am sure.  
I have done a little experiment and found that only surfaces in certain direction seems to have this problem. In the video, I used a red/blue sphere to identify the problematic surfaces. Then keeps rotating the building.  
The first video shows that the surfaces keeps flickering while the other video shows the surfaces remains totally black.  
The only change I did was rotating the building in 90 degree at start.  
Also, I have tried in several android devices with opera/chrome/firefox, all of them have shown this problem.  
So I am guessing if this is an Android problem instead of Chromium since the build on IOS works perfectly either in Chrome or Safari.

[https://cdn.discordapp.com/attachments/1122807555425579008/1122875720796999742/LocalRotation90.mp4?ex=65d35281&is=65c0dd81&hm=40a647a49319a0cae71fd68b3cc5defdec178c1b6a1bb3a995ca09560474c271&(image larger than 4 MB)](https://cdn.discordapp.com/attachments/1122807555425579008/1122875720796999742/LocalRotation90.mp4?ex=65d35281&is=65c0dd81&hm=40a647a49319a0cae71fd68b3cc5defdec178c1b6a1bb3a995ca09560474c271&)
  

[https://cdn.discordapp.com/attachments/1122807555425579008/1122875722432786432/LocalRotation0.mp4?ex=65d35282&is=65c0dd82&hm=854b5cc92febce1faea02d1fa900d9bb2e10f6288cd15852f45512da757081f1&(image larger than 4 MB)](https://cdn.discordapp.com/attachments/1122807555425579008/1122875722432786432/LocalRotation0.mp4?ex=65d35282&is=65c0dd82&hm=854b5cc92febce1faea02d1fa900d9bb2e10f6288cd15852f45512da757081f1&)

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/9 "2023-06-26T00:00:00Z")

</div>

Interesting. Thanks for the update. Do you think you could send us parts of that scene that show the problem? Maybe one or two buildings with your current setup?

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 26, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/10 "2023-06-26T00:00:00Z")

</div>

You can use the Needle Engine Bugreporter (via `Needle Engine/Report a bug`), it’ll only send what is currently being used in the scene (so you could copy your current scene and strip out most of the content but only keep a few models for the bugreport)

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/11 "2023-06-27T00:00:00Z")

</div>

Done. Please check. I guess this should be the report ID? =\> 230627-124017

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/12 "2023-06-27T00:00:00Z")

</div>

Thanks, got it

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/13 "2023-06-27T00:00:00Z")

</div>

@ByeByeParuai I’ve opened the scene on chrome desktop + android with and without rotation but don’t see any shadow flickering. Can you tell me how to reproduce the issue with the scene you sent?

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/14 "2023-06-27T00:00:00Z")

</div>

Nothing special. Just hit the play button.  
Then it starts flickering when I move the scene camera on android.

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/15 "2023-06-27T00:00:00Z")

</div>

mmmh that’s what I did

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/16 "2023-06-27T00:00:00Z")

</div>

BTW I have done a little research and guessing if it is the same issue in this post

> **[\[Solved\] Normal map on Android](https://discourse.threejs.org/t/solved-normal-map-on-android/18055)**
>
> I am having problem with normal maps on Android(9.0.6 oxygen OS) Google Chrome (84.0.4147.125). I have a model in glb format that I load from GLTFLoader in my code. The problem is when I open my app on mobile directional light doesn’t work as...

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/17 "2023-06-27T00:00:00Z")

</div>

What android device are you using??

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/18 "2023-06-27T00:00:00Z")

</div>

I’ll try again

---

<div class="post-metadata">

**Author:** ![discord-import](https://forum.needle.tools/user_avatar/forum.needle.tools/discord-import/32/33_2.png) [@discord-import](https://forum.needle.tools/u/discord-import)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/19 "2023-06-27T00:00:00Z")

</div>

FYI my tested androids are all using Adreno GPUs

_by user 66936191118737408_

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [June 27, 2023, 12:00am UTC](https://forum.needle.tools/t/texture-flickering-in-android/409/20 "2023-06-27T00:00:00Z")

</div>

Ok very interesting. I’ll try again and if I can’t repro I think I can send you some code that you can add on your side to test if the suggested answer fixes the issue (or did you try that already?)

[Next page](https://forum.needle.tools/t/texture-flickering-in-android/409.md?page=2)
