I can only recommend that entire thread my previous link is from. It has a lot of info from Paul, Cliff and others.
There are some AppGameKit specifics, yes.
I'll post the default shaders that are used if you don't set a shader on an object, you can start with those and try stuff out.
vertex shader: (open notepad and save as "something.vs" in the media folder of your project.
attribute vec3 position;
attribute vec3 normal;
attribute vec2 uv;
varying vec2 uvVarying;
varying vec3 normalVarying;
varying vec3 posVarying;
uniform vec4 uvBounds0;
uniform vec4 startUV;
uniform vec4 endUV;
uniform mat4 agk_World;
uniform mat4 agk_ViewProj;
uniform mat3 agk_WorldNormal;
void main()
{
vec4 pos = agk_World * vec4(position,1);
gl_Position = agk_ViewProj * pos;
vec3 norm = agk_WorldNormal * normal;
posVarying = pos.xyz;
normalVarying = norm;
uvVarying = uv * uvBounds0.xy + uvBounds0.zw;
}
Fragment Shader: (AKA pixel shader, save as "something.ps" like the vertex shader.
#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#endif
uniform sampler2D texture0;
varying vec2 uvVarying;
varying vec3 normalVarying;
varying vec3 posVarying;
uniform vec4 agk_PLightPos;
uniform vec4 agk_PLightColor;
uniform vec3 agk_DLightDir;
uniform vec4 agk_DLightColor;
uniform vec4 agk_ObjColor;
void main()
{
vec3 dir = agk_PLightPos.xyz - posVarying;
vec3 norm = normalize(normalVarying);
float atten = dot(dir,dir);
atten = clamp(agk_PLightPos.w/atten,0.0,1.0);
float intensity = dot(normalize(dir),norm);
intensity = clamp(intensity,0.0,1.0);
vec3 color = agk_PLightColor.rgb * intensity * atten;
color = color + clamp(dot(-agk_DLightDir,norm)*agk_DLightColor.rgb,0.2,1.0);
gl_FragColor = texture2D(texture0, uvVarying) * vec4(color,1) * agk_ObjColor;
}
Added to the top of the pixel shader is some code that hopefully will make the shader run smoother on a non-windows machine.
My hovercraft is full of eels