+ shader_scene_override_uCamera( pass.cam->transform[3] );
+
+ m4x4f mpvm_prev;
+ m4x3_expand( mmdl, mpvm_prev );
+ m4x4_mul( cam->mtx_prev.pv, mpvm_prev, mpvm_prev );
+
+ m3x3f mnormal;
+ m3x3_inv( mmdl, mnormal );
+ m3x3_transpose( mnormal, mnormal );
+ v3_normalize( mnormal[0] );
+ v3_normalize( mnormal[1] );
+ v3_normalize( mnormal[2] );
+
+ v4f uPlayerPos, uSpawnPos;
+ v4_zero( uPlayerPos );
+ v4_zero( uSpawnPos );
+
+ v3_copy( world->player_co, uPlayerPos );
+
+ if( dest_spawn && (v3_dist2(dest_spawn->transform.co,uPlayerPos) > 0.1f) )
+ v3_copy( dest_spawn->transform.co, uSpawnPos );
+ else
+ v3_add( uPlayerPos, (v3f){0,-1,0}, uSpawnPos );
+
+ uPlayerPos[3] = v3_dist(uPlayerPos,uSpawnPos);
+ uSpawnPos[3] = 1.0f/uPlayerPos[3];
+
+ shader_scene_override_uPlayerPos( uPlayerPos );
+ shader_scene_override_uSpawnPos( uSpawnPos );
+
+
+ glDisable( GL_CULL_FACE );
+ mesh_bind( &world->mesh_geo );
+ pass.geo_type = k_world_geo_type_solid;
+ render_world_override_pass( world, &pass, mmdl, mnormal, mpvm_prev );
+ mesh_bind( &world->mesh_no_collide );
+ pass.geo_type = k_world_geo_type_nonsolid;
+ render_world_override_pass( world, &pass, mmdl, mnormal, mpvm_prev );
+ glEnable( GL_CULL_FACE );