-" world_info world;\n"
-" scene_state( g_time, world );\n"
-"\n"
-" // Lighting\n"
-" vec3 halfview = uCamera - aWorldCo;\n"
-" float fdist = length(halfview);\n"
-" halfview /= fdist;\n"
-"\n"
-" vec3 total_light = vec3(0.0);\n"
-"\n"
-"\n"
-" float world_shadow = newlight_compute_sun_shadow( world.sun_dir \n"
-" * (1.0/(max(world.sun_dir.y,0.0)+0.2)) );\n"
-" float board_shadow = compute_board_shadow();\n"
-"\n"
-" total_light += scene_lighting( wnormal, min( board_shadow, world_shadow ), \n"
-" halfview, world );\n"
-"\n"
-" //total_light += scene_lighting_old( wnormal, world );\n"
-"\n"
-" // Compute the other lights that exist in the map, not effected by the sun\n"
-" // shadow\n"
-"\n"
-" // read lights\n"
-" vec4 light_colour_0 = texelFetch( uLightsArray, light_indices.x*3+0 );\n"
-" vec4 light_colour_1 = texelFetch( uLightsArray, light_indices.y*3+0 );\n"
-" vec4 light_colour_2 = texelFetch( uLightsArray, light_indices.z*3+0 );\n"
-" vec4 light_co_0 = texelFetch( uLightsArray, light_indices.x*3+1 );\n"
-" vec4 light_co_1 = texelFetch( uLightsArray, light_indices.y*3+1 );\n"
-" vec4 light_co_2 = texelFetch( uLightsArray, light_indices.z*3+1 );\n"
-" vec4 light_dir_0 = texelFetch( uLightsArray, light_indices.x*3+2 );\n"
-" vec4 light_dir_1 = texelFetch( uLightsArray, light_indices.y*3+2 );\n"
-" vec4 light_dir_2 = texelFetch( uLightsArray, light_indices.z*3+2 );\n"
-"\n"
-" if( g_debug_indices == 1 )\n"
-" {\n"
-" float rings = min( fract(distance(light_co_0.xyz,aWorldCo)),\n"
-" min( fract(distance(light_co_1.xyz,aWorldCo)),\n"
-" fract(distance(light_co_2.xyz,aWorldCo)) ) \n"
-" );\n"
-" \n"
-" return vec3(fract(light_indices.x * 0.125), fract(light_indices.y*0.125),\n"
-" fract(light_indices.z * 0.125 )) + (rings-0.5) * 0.25;\n"
-" }\n"
-"\n"
-" if( g_debug_complexity == 1 )\n"
-" {\n"
-" return vec3(1.0,0.0,0.0) * ( light_indices.w/3.0 );\n"
-" }\n"
-"\n"
-" if( light_indices.w >= 1 )\n"
-" {\n"
-" total_light += newlight_compute_spot\n"
-" ( \n"
-" wnormal, halfview,\n"
-" light_colour_0.rgb,\n"
-" light_co_0.xyz,\n"
-" light_dir_0\n"
-" ) * board_shadow \n"
-" * step( world.day_phase, light_colour_0.w );\n"
-"\n"
-" if( light_indices.w >= 2 )\n"
-" {\n"
-" total_light += newlight_compute_spot\n"
-" ( \n"
-" wnormal, halfview,\n"
-" light_colour_1.rgb,\n"
-" light_co_1.xyz,\n"
-" light_dir_1\n"
-" ) * board_shadow\n"
-" * step( world.day_phase, light_colour_1.w );\n"
-"\n"
-" if( light_indices.w >= 3 )\n"
-" {\n"
-" total_light += newlight_compute_spot\n"
-" ( \n"
-" wnormal, halfview,\n"
-" light_colour_2.rgb,\n"
-" light_co_2.xyz,\n"
-" light_dir_2\n"
-" ) * board_shadow\n"
-" * step( world.day_phase, light_colour_2.w );\n"
-" }\n"
-" }\n"
-" }\n"
-"\n"
-" vec3 fog_colour = scene_sky( -halfview, world );\n"
-" \n"
-" return scene_apply_fog( diffuse * total_light, fog_colour, fdist );\n"