+ /* gate markers
+ * ---------------------------------------------------- */
+
+ shader_model_gate_use();
+ shader_model_gate_uPv( cam->mtx.pv );
+ shader_model_gate_uCam( cam->pos );
+ shader_model_gate_uTime( vg.time*0.25f );
+ shader_model_gate_uInvRes( (v2f){
+ 1.0f / (float)vg.window_x,
+ 1.0f / (float)vg.window_y });
+
+ mesh_bind( &world_global.mesh_gate );
+
+ /* skip writing into the motion vectors for this */
+ glDrawBuffers( 1, (GLenum[]){ GL_COLOR_ATTACHMENT0 } );
+
+ for( u32 i=0; i<mdl_arrcount(&world->ent_route); i++ ){
+ ent_route *route = mdl_arritm( &world->ent_route, i );
+
+ if( route->active_checkpoint != 0xffff ){
+ v4f colour;
+ float brightness = 0.3f + world->ub_lighting.g_day_phase;
+ v3_muls( route->colour, brightness, colour );
+ colour[3] = 1.0f-route->factive;
+
+ shader_model_gate_uColour( colour );
+
+ u32 next = route->active_checkpoint+1+layer_depth;
+ next = next % route->checkpoints_count;
+ next += route->checkpoints_start;
+
+ ent_checkpoint *cp = mdl_arritm( &world->ent_checkpoint, next );
+ ent_gate *gate = mdl_arritm( &world->ent_gate, cp->gate_index );
+ shader_model_gate_uMdl( gate->to_world );
+
+ for( u32 j=0; j<4; j++ ){
+ if( gate->routes[j] == i ){
+ mdl_draw_submesh( &world_global.sm_gate_marker[j] );
+ break;
+ }
+ }
+ }
+ }
+ glDrawBuffers( 2, (GLenum[]){ GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 } );