About Store Forum Documentation Contact



Post Reply 
[Android] Bug report Galaxy Tab 3
Author Message
MrPi Offline
Member

Post: #1
[Android] Bug report Galaxy Tab 3
Hi,

we have a customer reporting that the game won't start on his Galaxy Tab 3.
The following was logged inside "Esenthel Error.txt":

PHP Code:
Error accessing ShaderTech "Draw2DTex" in Shader "Main".
Error linking vertex+pixel shader in technique "Draw2DTex" of shader "Main"
Vertex Shader:
#ifndef GL_ES
#define GL_ES
#endif
//GLSL
#ifdef GL_ES
precision highp float;
precision highp int;
#endif
#define COLOR 0
#ifdef GL_ES
#define HP highp
#define MP mediump
#define LP lowp
#else
#define HP
#define MP
#define LP
#endif
#define PAR uniform
#define VAR varying
#define EPS 0.0001
#define EPSL 0.01
#define PI 3.14159265
#define PI2 6.28318531
#define SBUMP_ZERO 0
#define SBUMP_FLAT 1
#define SBUMP_NORMAL 2
#define FX_NONE 0
#define FX_GRASS 1
#define FX_LEAF 2
#define FX_LEAFS 3
#define FX_BONE 4
#define Sat(x) clamp(x,0.0,1.0)
MP float Sum(MP vec2 v){return v.x+v.y;}
MP float Sum(MP vec3 v){return v.x+v.y+v.z;}
MP float Sum(MP vec4 v){return v.x+v.y+v.z+v.w;}
MP float Sqr(MP float x){return x*x;}
MP vec2 Sqr(MP vec2 x){return x*x;}
MP float Cube(MP float x){return x*x*x;}
HP float Length2(HP vec2 v){return dot(v,v);}
HP float Length2(HP vec3 v){return dot(v,v);}
HP float Length2(HP vec4 v){return dot(v,v);}
MP vec2 Rotate(MP vec2 vec,MP vec2 cos_sin)
{
return 
vec2(vec.x*cos_sin.x-vec.y*cos_sin.y,
vec.x*cos_sin.y+vec.y*cos_sin.x);
}
MP float LerpR(MP float from,MP float to,MP float v){return(v-from)/(to-from);}
MP float LerpRS(MP float from,MP float to,MP float v){return Sat((v-from)/(to-from));}
LP float LPMax(LP float x,LP float y,LP float z,LP float w){return max(x,max(y,max(z,w)));}
LP float LPMax(LP vec4 v){return LPMax(v.x,v.y,v.z,v.w);}
VAR 
HP vec2 IO_tex;
PAR HP float VtxHeightmap;
PAR MP float VtxSkinning;
#define ATTR attribute
ATTR HP vec4 ATTR0;
ATTR MP vec3 ATTR9;
ATTR MP vec3 ATTR1;
ATTR MP vec4 ATTR2;
ATTR HP vec2 ATTR3;
ATTR HP vec2 ATTR4;
ATTR HP vec2 ATTR11;
ATTR MP float ATTR10;
ATTR MP vec3 ATTR5;
ATTR MP vec3 ATTR6;
ATTR LP vec4 ATTR8;
ATTR LP vec4 ATTR7;
MP vec3 vtx_nrm(){return ATTR1;}
MP vec3 vtx_tan(){return ATTR2.xyz;}
MP float vtx_tanW(){return ATTR2.w;}
HP vec4 vtx_pos4(){return ATTR0;}
HP vec3 vtx_pos(){return ATTR0.xyz;}
MP vec3 vtx_hlp(){return ATTR9;}
HP vec2 vtx_tex(const bool can_be_heightmap){return(can_be_heightmap&&bool(VtxHeightmap))?ATTR0.xz*vec2(VtxHeightmap,-VtxHeightmap):ATTR3;}
HP vec2 vtx_tex1(){return ATTR4;}
HP vec2 vtx_tex2(){return ATTR11;}
MP ivec3 vtx_bone(){return bool(VtxSkinning)?ivec3(ATTR5):ivec3(0,0,0);}
#ifdef GL_ES
MP vec3 vtx_weight(){MP float w=ATTR6.x/(ATTR6.x+ATTR6.y);return vec3(w,1.0-w,0.0);}
#else
MP vec3 vtx_weight(){return ATTR6;}
#endif
LP vec4 vtx_color(){return ATTR7;}
LP vec4 vtx_material(){return ATTR8;}
MP float vtx_size(){return ATTR10;}
PAR HP vec2 PixSize;
PAR HP vec4 Coords;
void main()
{
gl_Position=vec4(vtx_pos().xy*Coords.xy+Coords.zw,0.0,1.0);
IO_tex=vtx_tex(false);
}
Pixel Shader:
#ifndef GL_ES
#define GL_ES
#endif
//GLSL
#extension GL_ARB_shader_texture_lod:enable
#extension GL_EXT_shader_texture_lod:enable
#extension GL_EXT_shadow_samplers:enable
#ifdef GL_ES
precision lowp float;
precision lowp int;
#define texture2DLod texture2DLodEXT
#define shadow2DProj shadow2DProjEXT
#endif
#define COLOR 0
#ifdef GL_ES
#define HP highp
#define MP mediump
#define LP lowp
#else
#define HP
#define MP
#define LP
#endif
#define PAR uniform
#define VAR varying
#define EPS 0.0001
#define EPSL 0.01
#define PI 3.14159265
#define PI2 6.28318531
#define SBUMP_ZERO 0
#define SBUMP_FLAT 1
#define SBUMP_NORMAL 2
#define FX_NONE 0
#define FX_GRASS 1
#define FX_LEAF 2
#define FX_LEAFS 3
#define FX_BONE 4
#define Sat(x) clamp(x,0.0,1.0)
MP float Sum(MP vec2 v){return v.x+v.y;}
MP float Sum(MP vec3 v){return v.x+v.y+v.z;}
MP float Sum(MP vec4 v){return v.x+v.y+v.z+v.w;}
MP float Sqr(MP float x){return x*x;}
MP vec2 Sqr(MP vec2 x){return x*x;}
MP float Cube(MP float x){return x*x*x;}
HP float Length2(HP vec2 v){return dot(v,v);}
HP float Length2(HP vec3 v){return dot(v,v);}
HP float Length2(HP vec4 v){return dot(v,v);}
MP vec2 Rotate(MP vec2 vec,MP vec2 cos_sin)
{
return 
vec2(vec.x*cos_sin.x-vec.y*cos_sin.y,
vec.x*cos_sin.y+vec.y*cos_sin.x);
}
MP float LerpR(MP float from,MP float to,MP float v){return(v-from)/(to-from);}
MP float LerpRS(MP float from,MP float to,MP float v){return Sat((v-from)/(to-from));}
LP float LPMax(LP float x,LP float y,LP float z,LP float w){return max(x,max(y,max(z,w)));}
LP float LPMax(LP vec4 v){return LPMax(v.x,v.y,v.z,v.w);}
VAR 
HP vec2 IO_tex;
#define AlphaTest(alpha) if(alpha+MaterialColor().a<1.0)discard
PAR sampler2D Col,Col1,Col2,Col3,
Nrm,Nrm1,Nrm2,Nrm3,
Lum;
PAR samplerCube Rfl;
PAR MP float AllowBackFlip;
#define BackFlip(dir) {if(gl_FrontFacing==false)dir*=AllowBackFlip;}
struct ViewportClass
{
HP float from,range;
HP vec2 clamp_min,clamp_max,center,size,size_fov_tan;
HP vec4 FracToPosXY,ScreenToPosXY,PosToScreen;
};
PAR ViewportClass Viewport;
HP vec2 ViewportClamp(HP vec2 screen,const bool do_clamp){return do_clamp?clamp(screen,Viewport.clamp_min,Viewport.clamp_max):screen;}
PAR LP vec4 Color[4];
void main()
{
#if COLOR!=0
gl_FragColor=texture2D(Col,IO_tex)*Color[0]+Color[1];
#else
gl_FragColor=texture2D(Col,IO_tex);
#endif


On Android 4.4.2. Any idea, Greg?
(This post was last modified: 11-14-2014 08:49 PM by MrPi.)
11-14-2014 08:27 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: [Android] Bug report Galaxy Tab 3
Hello,

I'm aware of the issue, however I don't have an idea how to workaround this problem.
The shader is fine itself and compiles ok on other devices.
I don't have galaxy tab 3 so can't perform any tests.
Personally I would just disable galaxy tab 3 from Android app store supported devices, so customers can't download/buy the game on those devices.
11-15-2014 12:41 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: [Android] Bug report Galaxy Tab 3
There's one thing that came to my mind
GL_FRAGMENT_PRECISION_HIGH
And
glGetShaderPrecisionFormat
I'll need to investigate that.
11-15-2014 12:58 AM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #4
RE: [Android] Bug report Galaxy Tab 3
Allen has a Galaxy Tab 3, so once you have some fix to try out, please let us know.
Deactivating such a rather popular device is not really a solution.
Thanks.
11-15-2014 01:32 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: [Android] Bug report Galaxy Tab 3
Hello!

I've just made some changes to the Source and Shaders, please let me know if that helps.
11-15-2014 03:04 PM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #6
RE: [Android] Bug report Galaxy Tab 3
Hi Greg, just to verify which submit this is (you only add "ok" to your comments smile ), is this the submit from 15.11.2014 at 15:02:59?
I can't merge all the recent changes, especially not all the Gui changes, as that would break the game code and that's to risky while our app is already in Early Access.
11-16-2014 11:48 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: [Android] Bug report Galaxy Tab 3
Hello,

This is the commit - https://github.com/Esenthel/EsenthelEngi...00d0f85924

However in general I discourage from merging just single commit changes, I think this should be OK, but in other cases there can be problems.
11-16-2014 12:37 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: [Android] Bug report Galaxy Tab 3
Hello,
latest source release includes some additional improvements to shaders, I recommend using latest version. This time there's no single commit available, but I recommend upgrading to latest version (all commits).
11-18-2014 09:15 AM
Find all posts by this user Quote this message in a reply
Post Reply