 void obtainMaterialProperties()
 {
     // We can use the instance ID to reconstruct the diffuse and specular colours from the RGBA material buffer.
-    int materialID      = obtainMaterialID();    
+    int materialID      = obtainMaterialID();
 
     // Each material is allocated 16 bytes of data for the diffuse colour and 16 bytes for the specular colour.
     vec4 diffusePart    = texelFetch (materials, materialID);

    float halfAngle     = light.coneAngle / 2;

    // Attenuate using smoothstep. Don't cut off at zero, maintains spotlight look.
    float attenuation   = lightAngle <= halfAngle ? smoothstep (1.0, 0.5, lightAngle / halfAngle) : 0;
    
    // Return the calculated attenuation factor.
    return attenuation;


int obtainMaterialID()
{
    /// This really isn't a nice way to do this, in future I will avoid this and just make the material ID an instance-specific 
    /// vertex attribute. However the alternative method is used here which features a samplerBuffer object and we then obtain
    /// the correct attribute using texelFetch().

    // Each instance is allocated 4-bytes of data for the material ID. We calculate the row by dividing the instance ID
    // by 4 and then the column by calculating the remainder.
    ivec4 idRow = texelFetch (materialIDs, instanceID / 4);
