+"#line 4 0 \n"
+"\n"
+"vec3 scene_do_lighting( vec3 diffuse, vec3 wnormal )\n"
+"{\n"
+" // Lighting\n"
+" vec3 halfview = uCamera - aWorldCo;\n"
+" float fdist = length(halfview);\n"
+" halfview /= fdist;\n"
+"\n"
+" vec3 total_light = newlight_compute_ambient();\n"
+" \n"
+" // Compute world lighting contribution and apply it according to the\n"
+" // shadow map\n"
+" //\n"
+" vec3 world_light = newlight_compute_world_diffuse( wnormal );\n"
+" world_light += newlight_compute_sun_spec( wnormal, halfview, 0.1 );\n"
+"\n"
+" float world_shadow = newlight_compute_sun_shadow();\n"
+"\n"
+" total_light += world_light * world_shadow;\n"
+"\n"
+" // Compute the other lights that exist in the map, not effected by the sun\n"
+" // shadow\n"
+" total_light += newlight_compute_quadratic\n"
+" ( \n"
+" wnormal, halfview,\n"
+" g_point_light_positions[ aLights.x ].xyz,\n"
+" g_point_light_colours[ aLights.x ].rgb \n"
+" );\n"
+" total_light += newlight_compute_quadratic\n"
+" ( \n"
+" wnormal, halfview,\n"
+" g_point_light_positions[ aLights.y ].xyz,\n"
+" g_point_light_colours[ aLights.y ].rgb \n"
+" );\n"
+" total_light += newlight_compute_quadratic\n"
+" ( \n"
+" wnormal, halfview,\n"
+" g_point_light_positions[ aLights.z ].xyz,\n"
+" g_point_light_colours[ aLights.z ].rgb \n"
+" );\n"
+"\n"
+" return apply_fog( diffuse * total_light, fdist );\n"
+"}\n"
+"\n"