         normal = frag_normal;
     }
     ivec2 tile_id = ivec2(gl_FragCoord.xy / TILE_SIZE);
-    uint tile_index = tile_id.y * push_constants.tile_nums.x + tile_id.x; 
+    uint tile_index = tile_id.y * push_constants.tile_nums.x + tile_id.x;
 
     // debug view
     if (push_constants.debugview_index > 1)
     {
         if (push_constants.debugview_index == 2)
         {
-            //heat map debug view
-            float intensity = float(light_visiblities[tile_index].count) / MAX_POINT_LIGHT_PER_TILE;
-            out_color = vec4(vec3(intensity, intensity, intensity), 1.0) ; //light culling debug
-        }   
-        else if (push_constants.debugview_index == 3)
+					//heat map debug view
+					float intensity = float(light_visiblities[tile_index].count) / MAX_POINT_LIGHT_PER_TILE;
+					out_color = vec4(vec3(intensity, intensity, intensity), 1.0) ; //light culling debug
+					float minumum = 0.0;
+					float maximum = 1.0;
+					float ratio = 2 * (intensity - minimum) / (maximum - minimum);
+					int b = int(max(0, 255*(1 - ratio)));
+					int r = int(max(0, 255*(ratio - 1)));
+					int g = 255 - b - r;
+		      out_color = vec4(vec3(r,g,b), 1.0);
+				}
+				else if (push_constants.debugview_index == 3)
         {
             // depth debug view
             out_color = vec4(vec3( pre_depth ),1.0);

    }

    // render view
    out_color = vec4(illuminance, 1.0); 

    //out_color = vec4(0.0, 0.0, 0.0, 1.0);
    //out_color[light_visiblities[tile_index].count] = 1.0;
    //out_color = vec4(illuminance, 1.0); 
    //out_color = vec4(abs(normal), 1.0);
    //out_color = vec4(abs(texture(normal_sampler, frag_tex_coord).rgb), 1.0); // normal map debug view
}

        diffuse = vec3(1.0);
    }

    vec3 normal;
    if (material.has_normal_map > 0)
    {
        normal = applyNormalMap(frag_normal, texture(normal_sampler, frag_tex_coord).rgb);
