I create a project and create a simple model. If I packed it by opengles 1.x for android platform. It will run and display all normally. But If I packed it by opengles 2.0 for android platform, it can run,but cann’t display the model.
The follows is the error log:
V/Unity ( 376): GLES20: failed to compile fragment shader:
V/Unity ( 376): #define IN_HIGHP
V/Unity ( 376): #define IN_MEDIUMP
V/Unity ( 376): #define IN_LOWP
V/Unity ( 376): precision mediump float;
V/Unity ( 376):
V/Unity ( 376): #define SHADER_API_GLES 1
V/Unity ( 376): #define tex2D texture2D
V/Unity ( 376): varying highp vec2 xlv_TEXCOORD0;
V/Unity ( 376): varying lowp vec4 xlv_COLOR;
V/Unity ( 376): uniform sampler2D _HaloFalloff;
V/Unity ( 376): void main ()
V/Unity ( 376): {
V/Unity ( 376): lowp vec4 tmpvar_1;
V/Unity ( 376): mediump float a;
V/Unity ( 376): lowp float tmpvar_2;
V/Unity ( 376): tmpvar_2 = texture2D (_HaloFalloff, xlv_TEXCOORD0).w;
V/Unity ( 376): a = tmpvar_2;
V/Unity ( 376): mediump vec4 tmpvar_3;
V/Unity ( 376): tmpvar_3.xyz = (xlv_COLOR.xyz * a);
V/Unity ( 376): tmpvar_3.w = a;
V/Unity ( 376): tmpvar_1 = tmpvar_3;
V/Unity ( 376): gl_FragData[0] = tmpvar_1;
V/Unity ( 376): }
I have some questions:
I don’t program any shader codes, why have these shader codes?
How can I get these shader codes and change them in project?
And why my android platform cann’t compile fragment shader?
thanks very much!