- Home /
GLSL error
Hello
We are developing a game for android and ios in unity.
We have hit a brick wall in out development today, with some random modifications, suddenly our game wont run on a few devices. We get random crashes on start, right after after initialisation.
Here is a part of the log that we don't understand (it ran on an Atrix android phone):
04-11 16:46:14.011: D/Unity(11800): Vertex Shader:
04-11 16:46:14.011: D/Unity(11800): �
04-11 16:46:14.011: D/Unity(11800): Fragment Shader:
04-11 16:46:14.021: D/Unity(11800): Vertex Shader:
04-11 16:46:14.021: D/Unity(11800): �
04-11 16:46:14.021: D/Unity(11800): Fragment Shader:
04-11 16:46:14.021: D/Unity(11800): -------- GLSL error: xGZ��
04-11 16:46:14.021: D/Unity(11800): Vertex Shader:
04-11 16:46:14.021: D/Unity(11800): Fragment Shader:
04-11 16:46:14.041: D/Unity(11800): -------- GLSL error: �^�H���Ex��
Yes, those are some weird characters (�).
It runs without a flaw even on a Motorla defy with cianogenrom ics, and several other devices, on several android os versions. It also runs without a flaw on windows.
What does this errormessage mean? Help would be appreciated.
Answer by Kantharr · Jan 16, 2013 at 05:00 PM
Sorry that I am bringing this back up but I am actually having the exact same problem on our motorola droid X2. We did not create any fancy shaders, we just only have atlases with materials whose shaders are set to Mobile/Particles/Alpha Blended. When the game starts up we use WWW to load the atlas file depending on aspect resolution and we set it to the material. Well this works on all of our devices (iOS and android) except for the Droid X2. The only "fix" I could find is disabling the camera before the loading of atlas then enabling it when it is done but this causes weird graphic screens on the other android devices. Is there a certain setting that I will need to set for the android devices? Like shaders, graphics, etc...
Thank you for any sort of help you can give me and sorry for bringing this topic back up.
[EDIT] I am putting in Debug.Log as I am trying to find the problem and here is where I believe it is stopping at:
IEnumerator LoadAtlas(string atlasFile, Vector2 atlasDimensions)
{
Debug.Log("Loading Assets");
string url = "";
#if UNITY_EDITOR
url = "file://" + Application.dataPath + "/StreamingAssets/Resources/Images/";
#elif UNITY_ANDROID
url = "jar:file://" + Application.dataPath + "!/assets/Resources/Images/";
#else
url = "file://" + Application.dataPath + "/Raw/Resources/Images/";
#endif
WWW www = new WWW(url + atlasFile);
yield return www;
if(www.error != null)
{
Debug.Log(www.error);
errorObject.transform.FindChild("InternetError").GetComponent<UILabel>().text = atlasFile + " file is missing";
}
else
{
Debug.Log("Comparing Texture");
Texture2D tempTexture = new Texture2D((int)atlasDimensions.x,(int)atlasDimensions.y);
www.LoadImageIntoTexture(tempTexture);
if(tempTexture.width != atlasDimensions.x || tempTexture.height != atlasDimensions.y)
{
errorObj.transform.FindChild("InternetError").GetComponent<UILabel>().text = "This file is " +
tempTexture.width.ToString() + "x" + tempTexture.height.ToString() + " while it's suppose to be " +
atlasDimensions.x.ToString() + "x" + atlasDimensions.y.ToString();
}
else
{
Debug.Log("Assets Loaded");
referenceAtlas.replacement.material.mainTexture = tempTexture;
}
}
www.Dispose();
}
It seems like it is stopping when it is initializing WWW. Is this not supported on the droid X2? Also I have changed the graphics level in the player settings to GLES 1.x but because of this it is now closing silently without reporting any errors when I start the game up.
Your answer
Follow this Question
Related Questions
GLSL shader not working on android 0 Answers
GLSL Shaders not working on android. 0 Answers
How to use #extension with GLSL shader 0 Answers
conditional vertex texture fetch / texture lookups in vertex shader 0 Answers
Uniform variable fails on the android 0 Answers