}
/* update gate camera */
- gate_camera.fov = cam->fov;
- gate_camera.nearz = 0.1f;
- gate_camera.farz = 2000.0f;
+ world_gates.cam.fov = cam->fov;
+ world_gates.cam.nearz = 0.1f;
+ world_gates.cam.farz = 2000.0f;
- m4x3_mul( gate->transport, cam->transform, gate_camera.transform );
- camera_update_view( &gate_camera );
- camera_update_projection( &gate_camera );
+ m4x3_mul( gate->transport, cam->transform, world_gates.cam.transform );
+ camera_update_view( &world_gates.cam );
+ camera_update_projection( &world_gates.cam );
/* Add special clipping plane to projection */
v4f surface;
q_mulv( gate->q[1], (v3f){0.0f,0.0f,-1.0f}, surface );
surface[3] = v3_dot( surface, gate->co[1] );
- m4x3_mulp( gate_camera.transform_inverse, surface, surface );
+ m4x3_mulp( world_gates.cam.transform_inverse, surface, surface );
surface[3] = -fabsf(surface[3]);
if( dist < -0.5f )
- m4x4_clip_projection( gate_camera.mtx.p, surface );
+ m4x4_clip_projection( world_gates.cam.mtx.p, surface );
/* Ready to draw with new camrea */
- camera_finalize( &gate_camera );
+ camera_finalize( &world_gates.cam );
- vg_line_pt3( gate_camera.transform[3], 0.3f, 0xff00ff00 );
+ vg_line_point( world_gates.cam.transform[3], 0.3f, 0xff00ff00 );
{
shader_model_gate_use();
shader_model_gate_uPv( cam->mtx.pv );
glStencilMask( 0x00 );
}
- render_world( world_inside, &gate_camera, layer_depth );
+ render_world( world_inside, &world_gates.cam, layer_depth );
{
glDisable( GL_STENCIL_TEST );
- render_water_texture( world_inside, &gate_camera, layer_depth );
+ render_water_texture( world_inside, &world_gates.cam, layer_depth );
render_fb_bind( gpipeline.fb_main, 1 );
glEnable( GL_STENCIL_TEST );
- render_water_surface( world_inside, &gate_camera );
+ render_water_surface( world_inside, &world_gates.cam );
glStencilMask( 0xFF );
glStencilFunc( GL_ALWAYS, 1, 0xFF );
continue;
if( gate->type == k_gate_type_nonlocel ){
- if( skaterift.async_op == k_async_op_world_loading ||
- skaterift.async_op == k_async_op_world_preloading ){
+ if( world_loader.state != k_world_loader_none ){
continue;
}
}