// $LastChangedDate: 2010-11-12 11:27:22 -0500 (Fri, 12 Nov 2010) $
// 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( normalize(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;
}
