Semantic Segmentation Texture tutorial

Include the following details while filing a bug report (edit as applicable):

  • Issue category: Semantic Segmentation
  • Device type & OS version: Android 11/12
  • Host machine & OS version: Windows
  • Issue Environment : On Device
  • Xcode version:
  • ARDK version:v1.1.0
  • Unity version:2019.4.35f1


After following the “Semantic Segmentation Texture tutorial”, I built and recognized the sky, and the white material was bent 90 degrees to the left and the material came out.

As I see it in the SemanticsShader script
float2 semanticUV = float2(i.semantic_uv.x / i.semantic_uv.z, i.semantic_uv.y / i.semantic_uv.z);
The direction seems to change depending on the . I hope you can tell me how to fix it.


Hi there,

We would like to help if we can. Could you speak more on why you think the problem is in the Shader script? Also what do you mean by the material came out? Any more details you can include would be most appreciated and helpful.

When the app is launched and the camera is centered on the building, according to the tutorial, the sky on the side and above the building should be covered with white, but this turned out to be 90 degrees to the left.
So, while looking for the cause, I tried changing the x and y values of that code part I wrote down, and I saw that it changed in a different direction, so I left a question.

Hello again,

Could you give us a few screenshots of your build settings, or any device logs you may have in your possession? Also a copy/paste of the section of code that you modified in the shader script would be helpful too. This would help us to better understand why you are receiving this error.

If you follow the tutorial directly, not the example scene, you will have the same bugs as me.
It seems to be because the way the example scene and the tutorial are semantic is different.

How curious! I’ve followed the tutorial a few times and haven’t had this issue - did you follow the video guide or the text one? I wonder if there’s something different between those? Could you share a link of exactly which tutorial you’re following and I’ll check whether it’s the same one I’ve been looking at, in case that helps?

Shaders definitely aren’t my strong suit yet, so if there’s something up in the shaders, I’d definitely miss it!

I tried both the text guide and the video guide, both had the same problem.

I’m experiencing the same issue but only on Windows, when I build the project everything works for Android or iOS devices


I, as well as some of my colleagues, have tried running this tutorial and found that it was working as expected. One thing I did notice while looking at your request was that you’re attempting to test by using an image on the internet. Can you try building and running the project again without any changes to the original code and try scanning outside of a window to see if the same thing happens?

Here are some other things I would recommend:

  1. If you typed in the code manually, try copy pasting it instead to rule out any other errors. Here is a link to the tutorial with the code at the end for your reference:
  2. Try on a different image

It’s possible that because you’re attempting to scan an image through a monitor, ARDK is not able to properly and accurately detect the sky. In my attempt at scanning an image it was hit or miss. Can you share the URL of the image you tried to use so that I can test against that one myself?

I copied and pasted the code from the tutorial you linked.

The screenshot I uploaded was made with an image floating on the monitor.

Even when the sky was lit outside the window, the white materials that were supposed to appear at the top were only on the left side.


Thank you for confirming that you’ve already tried copy and pasting the code straight from the example page.

Since the ARDK is mainly meant to be used and tested in the real world (aside from the mock layer provided in Unity) would it be possible to also get a screenshot of the issue happening when pointing your phone outside a window? This would help greatly as we look into your issue further.


I tried reproducing this issue in ARDK 1.2.0, and I was not able to reproduce the rotated textures that you are seeing.

Just to confirm, does this only happen in the Unity editor? Or are you also seeing it on your Android or iOS device?

If it only happens in the Unity editor, there may be a bug occurring. We are still working on adding support for Windows, so it would be possible to run into an issue like this when using Windows.

Also, I am not sure if you are using the SemanticTutorial.cs script and SemanticSh Shader code listed under Completed Source on this page, but that is the code that I used when I tried to reproduce the issue myself.

Both the video tutorial and the written tutorial experienced the same phenomenon.

ARDK 1.1.0 was used, and the test was conducted using two types of mobile phones, Samsung Galaxy Note 20 and Samsung Galaxy S10E, as an Android platform.

Okay, got it, thank you for the information. It’s not clear to me what’s going on here since I wasn’t able to reproduce it, but I suspect that it may have something to do with being on a Windows machine. As mentioned, we’re still working on support for the Windows platform.

It’s also possible that this is an issue with Samsung devices (I tested on a Pixel), so if you have access to something like a Pixel 3 or above, it might be worth trying.

In the meantime, you may have better luck trying this with ARDK 1.2.0. If it still doesn’t work, please let us know. We might not be able to resolve your issue without more information, but it would be very helpful for us to have that data point.