 {
     Material u_Materials[NUM_MATERIALS];
 };
+
+uniform int u_nMaterial;
 
 uniform sampler2D u_sDiffuse;
 uniform sampler2D u_sNormalHeight;

    vec4 vSpecular;
    float fShininess;   // specular exponent
    float fGlow;        // luminescence
};

layout (std140) uniform LightTypesBlock

        {
            vec3 vHalf = normalize(vLightDir + normalize(v_vTEye));
            float fNDotH = max(0.0, dot(vNormal, vHalf));
            vSpecular += u_LightTypes[type].vSpecular.xyz *
                         pow(fNDotH, u_Materials[u_nMaterial].fShininess) * fAttenuation;
        }
    }

    vAmbient *= u_Materials[u_nMaterial].vAmbient;
    vDiffuse *= u_Materials[u_nMaterial].vDiffuse;
    vSpecular *= u_Materials[u_nMaterial].vSpecular;
}

void main(void)
