To create a shader program that implements the Phong reflection model using a directional light source, we'll use the same vertex shader as in the previous recipe, except with a single light source. Within the phongModel function, replace the calculation of the s vector with the following:
vec3 s;
if( Light.Position.w == 0.0 )
s = normalize( Light.Position.xyz );
else
s = normalize( Light.Position.xyz - position );