Issue Regarding Shaders When Building on Unity CloudBuild

I am using Unity Version 2021.3.4f1. I have tried multiple versions to resolve this issue, I’m going to revert the project to 2020.3LTS, but I expect obselete errors, which was the initial reason I upgraded the version.

Cloudbuild is important for continuous integration for our entire team! We’ve done it before on our prototype with lightship, so it not working now is quite… interesting.

Hi Navvan,

We have been looking over the information provided along with what you included on Discord and will update you as soon as we’ve got something.

The warnings come from the fact that, in the ARCore shader, there is a line #pragma only_renderers gles3 which means that the shader code below will only compile if OpenGL ES 3 is detected. Since this is an iOS device that would be running Metal, the code won’t compile so it looks like it’s just warning you that the code was skipped. Since these are just warnings, they shouldn’t interfere with a build.

The error messages are coming from the same shader by the looks of it, and there is a line in the shader directly below that #pragma directive:

#ifdef SHADER_API_GLES3#extension GL_OES_EGL_image_external_ess13#endif

Check to make sure that this extension is surrounded by that #ifdef. If it’s not, try surrounding it. Additionally, it should be commented out regardless so you can try that as well to see if it suppresses the errors

Is there anywhere else you can think of where OpenGL ES3 might be getting defined?

Hi Navvan,

Just a clarifying point:

On my last statement I mean if you can think of anywhere else in your project, outside of ARDK, where GL ES 3 could possible be getting defined

Hi Jesus,

How can I just not have these shaders compile at all? I did what you said and still have the same errors. It was commented out when I found the shader, and uncommented it to comment it out. I’m not really familiar with shaders, but I’m not really sure what to do here to get this to compile without these errors.

The only other place I can find GL ES 3 is in the ExternalBlit shader.

Apparently the only errors are actually happening inside the ExternalBlit shader. I’m going to wrap these extensions first, then I’m going to see what happens if I just comment them out instead.

I was able to resolve all the errors regarding the GL ES 3 errors, no more of those, but all I have left are these _texture syntax errors, and I’m not a shader person and not sure how to resolve this. @Jesus_Hernandez i appreciate your help so far.

Hi Navvan,

After discussing your issue, we feel like it might be a good idea to reach out to Unity for some cloud build support. When we use cloud build with the same ARDK version that is available to the public, these errors were also present but they were non blocking and allowed builds to complete.

It sounds like Unity isn’t respecting the build settings that you’re attempting to set in place nor the shader variants between iOS and Android. We will continue to look into this on our end and give you any additional updates and suggestions we run into.