         float z = (lightDistView-uLightNear)/(uLightFar-uLightNear);
         float z2 = (depth-uLightNear)/(uLightFar-uLightNear);
 
-        if (vPositionWorld.z > 0)
+        if (vPositionWorld.z > 0.0)
             debugColor = hsv2rgb(vec3(z2, 1.0, 0.5));
         else if (z < 0.0) 
             debugColor = vec3(0.0);

//z = (f - n) * (zn + (f + n)/(f-n))/2
//http://www.ogldev.org/www/tutorial47/tutorial47.html
float ndcDepthToEyeSpace(float ndcDepth) {
    return (uLightFar - uLightNear) * (ndcDepth + (uLightFar + uLightNear) / (uLightFar - uLightNear)) / 2;
}

float readDepth(sampler2D depthMap, vec2 coord) {

#ifdef GL_ES
  #extension GL_EXT_shader_texture_lod : require
  #extension GL_OES_standard_derivatives : require
  #extension GL_EXT_draw_buffers : require  
  #define textureCubeLod textureCubeLodEXT
#else
  #extension GL_ARB_shader_texture_lod : require
