             // Exit now if ray missed
             if (!hit)
             {
-                float lightPdf = 0.5; // @todo: should vary in sync with direct lighting emissionProb
+                float emissionProb = EmitterPower/(EmitterPower + SkyPower);
+                float hemispherePdf = abs(dot(wiW, nW));
+                float environmentProb = 1.0 - emissionProb;
+                float lightPdf = environmentProb * hemispherePdf;
                 float misWeight = powerHeuristic(bsdfPdf, lightPdf);
                 float Li = environmentRadiance(wiW);
                 L += throughput * Li * misWeight;

        }
    }


    // Convert wavelenght to RGB (sRGB color space)
    vec3 RGB = texture2D(WavelengthToRgb, vec2(w, 0.5)).rgb;
    vec3 color = RGB * L;

            int material_next;
            bool hit = traceRay(pW, wiW, pW_next, material_next);
            
            // Add contribution from emitter if bounce ray hits it (before next surface vertex)
            float emitterRadiance;
            float emitterPdf;
            if ( emitterHit(pW, pW_next, emitterRadiance, emitterPdf) )
