Move Teapot to android-17 and set APP_ABI := all

For the default configuration to run on more devices: ARM/Intel/MIPS >= API17

Change-Id: I52145374d0c51624c7a295dc8092f8492e591dee
This commit is contained in:
Andrew Hsieh
2013-09-16 10:32:55 +08:00
parent f74a8b0a63
commit 1b8ffe3331
35 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
//
// ShaderPlain.fsh
//
#define USE_PHONG (1)
uniform lowp vec3 vMaterialAmbient;
uniform lowp vec4 vMaterialSpecular;
varying lowp vec4 colorDiffuse;
#if USE_PHONG
uniform highp vec3 vLight0;
varying mediump vec3 position;
varying mediump vec3 normal;
#else
varying lowp vec4 colorSpecular;
#endif
void main()
{
#if USE_PHONG
mediump vec3 halfVector = normalize(-vLight0 + position);
mediump float NdotH = max(dot(normal, halfVector), 0.0);
mediump float fPower = vMaterialSpecular.w;
mediump float specular = pow(NdotH, fPower);
lowp vec4 colorSpecular = vec4( vMaterialSpecular.xyz * specular, 1 );
gl_FragColor = colorDiffuse + colorSpecular;
#else
gl_FragColor = colorDiffuse + colorSpecular;
#endif
}

View File

@@ -0,0 +1,54 @@
//
// ShaderPlain.vsh
//
#define USE_PHONG (1)
attribute highp vec3 myVertex;
attribute highp vec3 myNormal;
attribute mediump vec2 myUV;
attribute mediump vec4 myBone;
varying mediump vec2 texCoord;
varying lowp vec4 colorDiffuse;
#if USE_PHONG
varying mediump vec3 position;
varying mediump vec3 normal;
#else
varying lowp vec4 colorSpecular;
#endif
uniform highp mat4 uMVMatrix;
uniform highp mat4 uPMatrix;
uniform highp vec3 vLight0;
uniform lowp vec4 vMaterialDiffuse;
uniform lowp vec3 vMaterialAmbient;
uniform lowp vec4 vMaterialSpecular;
void main(void)
{
highp vec4 p = vec4(myVertex,1);
gl_Position = uPMatrix * p;
texCoord = myUV;
highp vec3 worldNormal = vec3(mat3(uMVMatrix[0].xyz, uMVMatrix[1].xyz, uMVMatrix[2].xyz) * myNormal);
highp vec3 ecPosition = p.xyz;
colorDiffuse = dot( worldNormal, normalize(-vLight0+ecPosition) ) * vMaterialDiffuse + vec4( vMaterialAmbient, 1 );
#if USE_PHONG
normal = worldNormal;
position = ecPosition;
#else
highp vec3 halfVector = normalize(ecPosition - vLight0);
highp float NdotH = max(-dot(worldNormal, halfVector), 0.0);
float fPower = vMaterialSpecular.w;
highp float specular = min( pow(NdotH, fPower), 1.0);
colorSpecular = vec4( vMaterialSpecular.xyz * specular, 1 );
#endif
}