Within the main function of the fragment shader, we access the alpha map texture and store the result in alphaMap. If the alpha component of alphaMap is less than a certain value (0.15, in this example), then we discard the fragment using the discard keyword.
Otherwise, we compute the Blinn-Phong lighting model using the normal vector oriented appropriately, depending on whether or not the fragment is a front facing fragment.