X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_routes.h;h=501915a0643859d812a41dd31d87a6cffd110ddc;hb=7e7dddda61cb3ccef02dbefd06a9cbaf39a94581;hp=bd4ce0cf803fa91ac97eec10acfa429e31b1233d;hpb=409edea2cf6271956137918e4e0b4f1c2addf620;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_routes.h b/world_routes.h index bd4ce0c..501915a 100644 --- a/world_routes.h +++ b/world_routes.h @@ -789,8 +789,6 @@ VG_STATIC void world_routes_create_mesh( world_instance *world, u32 route_id ) scene_copy_slice( world->scene_lines, &route->sm ); } -VG_STATIC void world_scene_compute_light_clusters( world_instance *world, - scene *sc ); /* * Create the strips of colour that run through the world along course paths */ @@ -802,8 +800,6 @@ VG_STATIC void world_routes_generate( world_instance *world ) for( u32 i=0; iroute_count; i++ ) world_routes_create_mesh( world, i ); - world_scene_compute_light_clusters( world, world->scene_lines ); - vg_acquire_thread_sync(); { scene_upload( world->scene_lines, &world->mesh_route_lines ); @@ -1145,6 +1141,9 @@ VG_STATIC void bind_terrain_noise(void); VG_STATIC void world_bind_light_array( world_instance *world, GLuint shader, GLuint location, int slot ); +VG_STATIC void world_bind_light_index( world_instance *world, + GLuint shader, GLuint location, + int slot ); VG_STATIC void render_world_routes( world_instance *world, camera *cam ) { @@ -1158,6 +1157,8 @@ VG_STATIC void render_world_routes( world_instance *world, camera *cam ) _uniform_scene_route_g_world_depth, 2 ); world_bind_light_array( world, _shader_scene_route.id, _uniform_scene_route_uLightsArray, 3 ); + world_bind_light_index( world, _shader_scene_route.id, + _uniform_scene_route_uLightsIndex, 4 ); bind_terrain_noise(); shader_scene_route_uPv( cam->mtx.pv );