1
0
forked from 0ad/0ad
0ad/binaries/data/mods/official/shaders/model_lightp.vs
prefect e2bbd9a654 #Models receive shadows now, including self-shadows.
This is a huge patch, including:
* add a LitRenderModifier abstract base class for RenderModifiers with
  shadow+light
* add LitRenderModifiers for all types of models
* add STREAM_TEXGENTOUV1 to request generation of shadow map texcoords
  for models
* create facilities to pass the texture matrix from the
  RenderModifier (fragment stage) to the ModelRenderer (vertex stage)
* split ambient and diffuse terms of lighting until further down in the
  pipeline; this is necessary since shadowed regions receive only
ambient light
* small improvement in how RenderPathVertexShader scales to a greater
  number of vertex shaders

This was SVN commit r3690.
2006-03-26 00:54:20 +00:00

11 lines
234 B
GLSL

vec3 lighting(vec3 normal);
vec4 postouv1(vec4 pos);
void main()
{
gl_FrontColor = vec4(lighting(gl_Normal),1.0) * gl_Color;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_TexCoord[1] = postouv1(gl_Vertex);
gl_Position = ftransform();
}