// $LastChangedDate: 2009-12-14 13:08:18 -0500 (Mon, 14 Dec 2009) $
// Fragment shader (default).

@include inc_frag.glsl

/*****************************************************************************
 * Fragment shader.
 *****************************************************************************/
void main( void )
{
    // Compute fragment from texture and color.
#if 1
    gl_FragColor = texture2D( uni_texture_0, gl_TexCoord[0].st );
    gl_FragColor *= gl_Color;
    gl_FragColor.rgb *= var_lightIntensity;
#else
    vec4 texColor  = texture2D( uni_texture_0, gl_TexCoord[0].st );
    gl_FragColor   = texColor * var_lightIntensity;
    gl_FragColor.a = texColor.a;
#endif

    // Compute shadow.
    @include inc_shadow_frag.glsl

    // Compute fog.
    @include inc_fog_frag.glsl

    // Compute brightness (final step).
    @include inc_brightness_frag.glsl
}
