2005-10-30 02:22:22 +02:00
|
|
|
vec3 lighting(vec3 normal);
|
|
|
|
|
|
|
|
vec3 InstancingNormal(vec3 normal);
|
|
|
|
vec4 InstancingPosition(vec4 position);
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec3 normal = InstancingNormal(gl_Normal);
|
|
|
|
vec4 worldPos = InstancingPosition(gl_Vertex);
|
|
|
|
|
2005-11-06 23:47:26 +01:00
|
|
|
gl_FrontColor = vec4(lighting(normal),1.0) * gl_Color;
|
2005-10-30 02:22:22 +02:00
|
|
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
|
|
|
gl_Position = gl_ModelViewProjectionMatrix * worldPos;
|
|
|
|
}
|