 vec3 filterColor(vec3 N)
 {
     //return  textureLod(uCubeMap, N, 3.0).rgb;
-    vec4 color = vec4(0.f);
+    vec3 color = vec3(0.f);
 
     for(int i = 0; i < u_sampleCount; ++i)
     {


        if(u_distribution == cLambertian)
        {
            float NdotH = clamp(dot(N, H), 0.0, 1.0);

            // sample lambertian at a lower resolution to avoid fireflies
            vec3 lambertian = textureLod(uCubeMap, H, lod).rgb;


            // lambertian /= pdf; // invert bias from importance sampling
            // lambertian /= MATH_PI; // convert irradiance to radiance https://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/

            color += lambertian;
        }
        else if(u_distribution == cGGX || u_distribution == cCharlie)
        {
