Here is an example below to add emissive with basic lighting and fog. I haven't tested this, so consider that it may need a little fixing/modification, I just put this together quickly as a rough example. This example has the diffuse texture in index 0 and any emissive texture in index 1 (so you'd need to texture the object you apply the shader to in that order):
Vertex Shader:
// emissive vertex example, keep varyings in sequential order between vertex and fragment shaders
varying vec2 uvVarying0;
varying vec3 posVarying;
varying mediump vec3 normalVarying;
varying mediump vec3 lightVarying;
attribute highp vec3 position;
attribute mediump vec3 normal;
attribute mediump vec2 uv;
mediump vec3 GetVSLighting( mediump vec3 normal, highp vec3 pos );
uniform highp mat3 agk_WorldNormal;
uniform highp mat4 agk_World;
uniform highp mat4 agk_ViewProj;
void main()
{
uvVarying0 = uv; // just pass through for now without tiling or other changes
highp vec4 pos = agk_World * vec4(position,1);
gl_Position = agk_ViewProj * pos;
mediump vec3 norm = normalize(agk_WorldNormal * normal);
posVarying = pos.xyz;
normalVarying = norm;
lightVarying = GetVSLighting( norm, posVarying );
}
Fragment Shader:
// emissive fragment example, keep varyings in sequential order between vertex and fragment shaders
varying vec2 uvVarying0;
varying vec3 posVarying;
varying mediump vec3 normalVarying;
varying mediump vec3 lightVarying;
vec4 diffuse;
vec4 emissive;
uniform sampler2D texture0;
uniform sampler2D texture1;
mediump vec3 GetPSLighting( mediump vec3 normal, highp vec3 pos );
mediump vec3 ApplyFog( mediump vec3 color, highp vec3 pointPos );
void main()
{
diffuse = texture2D(texture0, uvVarying0.xy);
emissive = texture2D(texture1, uvVarying0.xy);
mediump vec3 norm = normalize(normalVarying);
mediump vec3 light = lightVarying + GetPSLighting( norm, posVarying );
mediump vec3 color = (diffuse.rgb * light) + emissive.rgb; // note how you just add the emissive element
color = ApplyFog( color, posVarying );
gl_FragColor = vec4(color,1.0);
}