# Screen Aligned UV + Camera Offset on mobile

**URL:** <https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440>\
**Category:** Rendering\
**Tags:** uv-coordinates, offset, unreal-engine, Android, question\
**Created:** [October 25, 2016, 10:16pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440 "2016-10-25T22:16:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [October 25, 2016, 10:16pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/1 "2016-10-25T22:16:05Z")

</div>

Hi guys,

I am using an unlit material with both nodes for mobile (android). It is applied on a 10m. sphere around the camera, to use it as background still image. I need to move the camera around and have always a still image on the background, behind any object in the scene.

On the editor it works ok, but on the mobile it doesn’t work **when both nodes are connected**. The surprising thing is that ScreenAlignedUVs works fine on its own, the CameraOffset works fine too on its own, but when I use both at the same time **only the offset works**. Then the mesh doesn’t show the texture but a plain color, taken probably from the texture.

Is this a limitation of Mobile rendering? Any workaround?

Thanks a lot,

Best,  
Alo.

 ![112472-material.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/f/06f34401edd1d3c42a6ccc8da5edd55d8c96e6fb.jpeg)

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [October 26, 2016, 5:58pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/2 "2016-10-26T17:58:59Z")

</div>

Hi Nomte,

When I try this in 4.13, since I no longer have 4.12 installed, everything is working correctly for these nodes. The only issue I had was having to use a lower offset value. With a negative 50000 you’re likely seeing a limitation of mobile here. Try smaller values, as that worked for me. If it’s still a problem in 4.12 try 4.13 and see.

I used your same setup with an offset amount of -500 and also trying an offset value of 500. Also, depending on the device you’re deploying to, it could also be a limitation there, as I’m using a Nexus5 phone running Android 6.0.1.

-Tim

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [October 27, 2016, 8:57am UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/3 "2016-10-27T08:57:12Z")

</div>

Thank you very much Tim!, I’ll try this weekend and let you know 🙂  
Unfortunately, even if it works on 4.13 I don’t want to upgrade right now. I am very close to release and the last time I upgraded and spend a lot of time just making the plugins and everything work again.  
I’ll be back with news.

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [October 27, 2016, 11:31pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/4 "2016-10-27T23:31:27Z")

</div>

Hi again,

I think I am narrowing the issue. I tried 4.13 and it behaves exactly like you said. The same result in 4.12.

Here is the thing. I’ve notice that using ScreenAlignUV doesn’t show the texture from a certain distance on mobile (aprox. 20000 units/centimeters) please see image attached. From that distance it shows just a plain color. When adding the CameraOffset, that “Mobile max distance” works **in addition** of the CameraOffset, that is why combining both with a large offset makes everything looks a plain color. In other words, if the limit is 20000 units and I offset the camera more than 20000 units, no texture is shown. In PIE or PC everything works fine.

Is there a way to remove this mobile limit? I think it should not be about a hardware limitation, because on mobile I can see objects that are farther than 70000 units from camera.

Thanks a lot.

 ![112795-screenaligneduvs.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/b/fcbdf6491ac14521baf8262b7d758e69b43f9543.jpeg)

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [October 31, 2016, 7:13pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/5 "2016-10-31T19:13:56Z")

</div>

When I check this in on a Nexus 5 (Snapdragon chipset) I get the issue you have, however, when I check this on my Samsung S7 Edge (Exynos chipset) there isn’t any issue at the same distances laid out. When tested with an Ipad Mini 2 and Iphone 5s (both using A7 apple chipset), I get the same without issue.

Can you post your phones model number from your Device Settings \> About Device section. I can test a few more devices here with different chipsets and see if this is possibly something related just to Snapdragon chipsets as a limitation or known issue.

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [October 31, 2016, 9:48pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/6 "2016-10-31T21:48:34Z")

</div>

Thank you very much Tim for all your efforts.

I’ve tried in several devices and these are the results:

**Without issue:**  
LG G4S (LG-H735)  
64bits - Qualcomm Snapdragon 615 MSM8939 (28nm)  
GPU Adreno 405

**With issue**  
LG G2 (LG-D802)  
Qualcomm Snapdragon 800 MSM8974  
GPU Adreno 330

Samsung Galaxy Tab 4 (SM-T530)  
Qualcomm Snapdragon 400  
GPU Adreno 305

Samsung S4 Mini  
Qualcomm Snapdragon 400 MSM8930  
GPU Adreno 305

If it is a hardware limitation, I better try another solution. Coming back to the root of the problem:  
Is there any way to place a still image as background of the scene, with a moving camera?

Thanks a lot,  
Alejandro

---

<div class="post-metadata">

**Author:** ![Tim\_Hobson](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tim\_Hobson](https://forums.unrealengine.com/u/Tim_Hobson)\
**Post date:** [November 21, 2016, 9:46pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/7 "2016-11-21T21:46:58Z")

</div>

Hey Alejandro,

sorry for the delay. I’ve submitted a ticket for this one to be investigated. You can follow the status here: [Unreal Engine Issues and Bug Tracker (UE-38923)](https://issues.unrealengine.com/issue/UE-38923)

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [November 21, 2016, 9:52pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/8 "2016-11-21T21:52:32Z")

</div>

No worries, thanks for investigate!

Alejandro.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_afd92cec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afd92cec](https://forums.unrealengine.com/u/anonymous_user_afd92cec)\
**Post date:** [November 25, 2016, 9:04am UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/9 "2016-11-25T09:04:29Z")

</div>

Hi, could you connect ScreenAlignedUVs to a Customized UV in a material and see if it helps? That way UV computation will be done in a vertex shader instead of pixel shader. And floating point precision is way better in vertex shader.

> **[Customized UVs](https://docs.unrealengine.com/5.1/en-US/customized-uvs-in-unreal-engine-materials/)**
>
> Feature that allows running calculations in the vertex shader to increase performance over running them per-pixel.

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [November 25, 2016, 9:44am UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/10 "2016-11-25T09:44:50Z")

</div>

Sounds good! I’ll work on my game again this weekend, I’ll try and let you know.  
Thanks a lot for the suggestion!!

Best,  
Alejandro

---

<div class="post-metadata">

**Author:** ![Nomte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nomte](https://forums.unrealengine.com/u/Nomte)\
**Post date:** [November 28, 2016, 11:16pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/11 "2016-11-28T23:16:02Z")

</div>

Hi ddvlost,

Thanks for the solution. As you imagined, using the customized UV solved the issue with the distance to camera. Cheers for that!. Unfortunately, when looking around the edges of the sphere are visible since the little distortion created by the vertex mapping.

[YOUTUBE TEST Customized UV](https://youtu.be/qBEWtxjj6R0)

I am using a workaround for now. When the issue is solved I’ll apply it to my project again.  
Thanks a lot for your help!

Best,  
Alejandro

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_afd92cec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_afd92cec](https://forums.unrealengine.com/u/anonymous_user_afd92cec)\
**Post date:** [November 30, 2016, 4:14am UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/12 "2016-11-30T04:14:46Z")

</div>

Since 4.13 materials have an option to “Use Full Precision” in a pixel shader on mobile. That should solve that.

---

<div class="post-metadata">

**Author:** ![AloAlvarez](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AloAlvarez](https://forums.unrealengine.com/u/AloAlvarez)\
**Post date:** [November 30, 2016, 7:42pm UTC](https://forums.unrealengine.com/t/screen-aligned-uv-camera-offset-on-mobile/374440/13 "2016-11-30T19:42:05Z")

</div>

Hi ddvlost,  
Thanks for the suggestion. I tried but the issue persists.

Best,  
Alejandro

 ![116941-screenshot_2016-11-30-20-31-05.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/c/f1c67830b3fe6392c72c7473bf5868122467ca5c.jpeg)
