#include "camera.h"
#include "player_model.h"
#include "ent_skateshop.h"
+#include "audio.h"
#include "shaders/model_character_view.h"
#include "shaders/model_board_view.h"
mdl_close( &ctx );
}
+/* TODO: allow error handling */
VG_STATIC void player_board_load( struct player_board *mdl, const char *path )
{
vg_linear_clear( vg_mem.scratch );
v3_zero( vp1 );
}
- struct ub_world_lighting *ubo = &get_active_world()->ub_lighting;
+ struct ub_world_lighting *ubo = &world_current_instance()->ub_lighting;
m4x3_mulv( av->sk.final_mtx[ av->id_board ], vp0, ubo->g_board_0 );
m4x3_mulv( av->sk.final_mtx[ av->id_board ], vp1, ubo->g_board_1 );
player->rewind_length = 1;
player->rewind_total_length = 0.0f;
player->rewind_accum = 0.0f;
- world_global.sky_target_rate = 1.0;
- world_global.time = world_global.last_use;
+ world_render.sky_target_rate = 1.0;
+ world_static.time = world_static.last_use;
}
else{
- world_global.sky_target_rate = -100.0;
+ world_render.sky_target_rate = -100.0;
float budget = vg.time_delta,
overall_length = player->rewind_length;
player__cam_iterate( player );
}
-enum board_shader{
- k_board_shader_player,
- k_board_shader_entity
-};
-
VG_STATIC void render_board( camera *cam, world_instance *world,
struct player_board *board, m4x3f root,
enum board_shader shader )
shader_model_board_view_uTexSceneDepth( 1 );
render_fb_inverse_ratio( gpipeline.fb_main, inverse );
+
inverse[2] = main_camera.farz-main_camera.nearz;
shader_model_board_view_uInverseRatioDepth( inverse );
inverse[2] = cam->farz-cam->nearz;
shader_model_character_view_uInverseRatioMain( inverse );
- world_instance *world = get_active_world();
+ world_instance *world = world_current_instance();
world_link_lighting_ub( world, _shader_model_character_view.id );
world_bind_position_texture( world, _shader_model_character_view.id,
_uniform_model_character_view_g_world_depth, 2 );