Home | History | Annotate | Download | only in OGLES3
      1 attribute highp vec4  inVertex;
      2 attribute highp vec3  inNormal;
      3 attribute highp vec2  inTexCoord;
      4 
      5 uniform highp mat4   MVPMatrix;
      6 uniform highp vec3   LightDirection;
      7 uniform highp float  MaterialBias;
      8 uniform highp float  MaterialScale;
      9 
     10 varying lowp vec3  DiffuseLight;
     11 varying lowp vec3  SpecularLight;
     12 varying mediump vec2  TexCoord;
     13 
     14 void main()
     15 {
     16 	gl_Position = MVPMatrix * inVertex;
     17 	
     18 	DiffuseLight = vec3(max(dot(inNormal, LightDirection), 0.0));
     19 	SpecularLight = vec3(max((DiffuseLight.x - MaterialBias) * MaterialScale, 0.0));
     20 	
     21 	TexCoord = inTexCoord;
     22 }
     23