some great models im seeing here
thought ide have a go at a flat shading shader not seeing much different so on my todo list atleast it dont error
vs
in vec3 vPosition;
in vec3 vNormal;
attribute highp vec3 position;
attribute mediump vec3 normal;
uniform highp mat3 agk_WorldNormal;
uniform highp mat4 agk_World;
uniform highp mat4 agk_ViewProj;
varying vec4 fColor;
varying vec3 viewPosition;
uniform mat4 mvp;
uniform vec3 aColor;
uniform vec3 lDirection;
uniform vec3 lColor;
void main()
{
gl_Position = mvp * vec4(vPosition, 1);
vec4 ambient = vec4(aColor, 1);
vec4 diffuse = vec4(max(dot(lDirection, -vNormal), 0.0) * lColor, 1);
fColor = ambient + diffuse;
highp vec4 pos = agk_World * vec4(position,1.0);
mediump vec3 norm = normalize(agk_WorldNormal * normal);
gl_Position = agk_ViewProj * gl_Position;
}
ps
varying vec4 fColor;
varying vec3 viewPosition;
uniform vec3 aColor;
uniform vec3 lDirection;
uniform vec3 lColor;
void main()
{
gl_FragColor = fColor;
}