+ for( u32 i=0; i<vg_list_size(world_static.instances); i++ ){
+ if( world_static.instances[i].status == k_world_status_loaded ){
+ world_prerender( &world_static.instances[i] );
+ }
+ }
+
+ if( skaterift.activity == k_skaterift_respawning ){
+ world_instance *world = world_current_instance();
+ glDrawBuffers( 1, (GLenum[]){ GL_COLOR_ATTACHMENT0 } );
+
+ v3f bg;
+ v3_muls( world->ub_lighting.g_daysky_colour,
+ world->ub_lighting.g_day_phase -
+ world->ub_lighting.g_sunset_phase*0.1f, bg );
+
+ v3_muladds( bg, world->ub_lighting.g_sunset_colour,
+ (1.0f-0.5f)*world->ub_lighting.g_sunset_phase, bg );
+
+ v3_muladds( bg, world->ub_lighting.g_nightsky_colour,
+ (1.0f-world->ub_lighting.g_day_phase), bg );
+
+ glClearColor( bg[0], bg[1], bg[2], 0.0f );
+ glClear( GL_COLOR_BUFFER_BIT );
+ glDrawBuffers( 2, (GLenum[]){ GL_COLOR_ATTACHMENT0,
+ GL_COLOR_ATTACHMENT1 } );
+
+ m4x3f identity;
+ m4x3_identity( identity );
+ render_world_override( world, world, identity, &skaterift.cam,
+ respawn_chooser.spawn,
+ (v4f){world->tar_min, world->tar_max, 1.0f, 0.0f});
+ render_world_routes( world, world, identity, &skaterift.cam, 0, 1 );
+ return;
+ }
+
+ world_instance *view_world = get_view_world();
+ render_world( view_world, &skaterift.cam, 0, 0, 1, 1 );
+
+#if 0
+ particle_spawn( &particles_grind, localplayer.rb.co,
+ (v3f){vg_randf64()*2.0f,vg_randf64()*3.0f,vg_randf64()*2.0f},
+ vg_randf64(), 0xff0000ff );
+#endif
+ particle_system_update( &particles_grind, vg.time_delta );
+ //particle_system_debug( &particles_grind );
+ particle_system_prerender( &particles_grind );
+ particle_system_render( &particles_grind, &skaterift.cam );
+
+ /*
+ * render transition
+ */
+ if( global_miniworld.transition == 0 )
+ return;
+
+ world_instance *holdout_world = NULL;
+ f32 t = 0.0f;
+
+ if( global_miniworld.transition == 1 ){
+ holdout_world = &world_static.instances[ k_world_purpose_hub ];
+ t = global_miniworld.t;
+ }
+ else{
+ holdout_world = &world_static.instances[ k_world_purpose_client ];
+ t = 1.0f-global_miniworld.t;
+ }
+
+ if( holdout_world->status != k_world_status_loaded )
+ return;