// $LastChangedDate: 2012-03-24 20:13:01 -0400 (Sat, 24 Mar 2012) $
// Vertex shader (default).

@include inc_vert.glsl

/*****************************************************************************
 * main.
 *****************************************************************************/
void main( void )
{
    // Compute angle (cosine) between VP and surface normal.
    vec4  ecPosition4     = gl_ModelViewMatrix * gl_Vertex;
    vec3  ecNormal        = normalize( gl_NormalMatrix * gl_Normal );
    float cos_VP_surfNorm = dot( ecNormal, normalize(uni_light0_ecPosition.xyz) );
    float base            = 0.25;
    var_lightIntensity    = (cos_VP_surfNorm > 0.0) ? base + cos_VP_surfNorm : base;

    // Compute color.
    @include inc_color_vert.glsl

    // Compute fog.
    @include inc_fog_vert.glsl

    // Compute shadow.
    @include inc_shadow_vert.glsl

    // Other outputs.
    gl_Position    = ftransform();
    gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
}
