0ad/binaries/data/mods/official/shaders/instancing_light.vs
prefect 875cb3bca1 Add ARB_vertex_shader specific functions to glext_funcs.h
Add an "instancing" model renderer to improve rendering of
non-transparent,
unanimated models. This renderer is used when the vertexshader path is
rendering path is used.

This was SVN commit r3052.
2005-10-30 00:22:22 +00:00

15 lines
380 B
GLSL

vec3 lighting(vec3 normal);
vec3 InstancingNormal(vec3 normal);
vec4 InstancingPosition(vec4 position);
void main()
{
vec3 normal = InstancingNormal(gl_Normal);
vec4 worldPos = InstancingPosition(gl_Vertex);
gl_FrontColor = gl_BackColor = vec4(lighting(normal),1.0) * gl_Color;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = gl_ModelViewProjectionMatrix * worldPos;
}