uniform sampler2D uTexMain;
uniform vec3 uCamera;
-#include "light_clearskies_stddef.glsl"
-#include "common_scene.glsl"
+in vec2 aUv;
+in vec4 aNorm;
+in vec3 aCo;
+in vec3 aWorldCo;
+
+layout (location = 0) out vec4 oColour;
+
#include "motion_vectors_fs.glsl"
-void main(){
+void main()
+{
oMotionVec = vec2(0.0);
vec4 vsamplemain = texture( uTexMain, aUv );
if( player_subsystems[ localplayer.subsystem ]->update )
player_subsystems[ localplayer.subsystem ]->update();
- if( localplayer.glider_orphan &&
- (skaterift.activity != k_skaterift_replay) )
+ if( localplayer.glider_orphan && (skaterift.activity != k_skaterift_replay) )
glider_physics( (v2f){0,0} );
+
+
+ if( localplayer.rb.co[1] < _world.main.scene_geo.bbx[0][1] - 40.0f )
+ {
+ ent_spawn *rp = world_find_closest_spawn( &_world.main, localplayer.rb.co );
+ if( rp )
+ {
+ vg_error( "Resetting player because they fell out of the world.\n" );
+ player__spawn( rp );
+ }
+ }
}
void player__post_update(void)
}
AF_LOAD_ARRAY_STRUCT( af, &world->ent_route, ent_route, heap );
+ AF_LOAD_ARRAY_STRUCT( af, &world->ent_region, ent_region, heap );
if( load_all )
{
AF_LOAD_ARRAY_STRUCT( af, &world->ent_cubemap, ent_cubemap, heap );
AF_LOAD_ARRAY_STRUCT( af, &world->ent_miniworld, ent_miniworld, heap );
AF_LOAD_ARRAY_STRUCT( af, &world->ent_prop, ent_prop, heap );
- AF_LOAD_ARRAY_STRUCT( af, &world->ent_region, ent_region, heap );
AF_LOAD_ARRAY_STRUCT( af, &world->ent_glider, ent_glider, heap );
}
}
}
-static void bindpoint_fxglow( world_instance *world,
- struct world_surface *mat )
+static void bindpoint_fxglow( world_instance *world, struct world_surface *mat )
{
struct shader_props_standard *props = mat->info.props.compiled;
shader_scene_fxglow_uUvOffset( (v2f){ 0.0f, 0.0f } );
shader_scene_fxglow_uTexMain(1);
shader_scene_fxglow_uPv( cam->mtx.pv );
- WORLD_BIND_LIGHT_BUFFERS_UB0_TEX234( world, scene_fxglow );
-
+ //WORLD_BIND_LIGHT_BUFFERS_UB0_TEX234( world, scene_fxglow );
shader_scene_fxglow_uCamera( cam->transform[3] );
glDisable(GL_CULL_FACE);
if( generic )
world_render_both_stages( world, &pass );
- if( regions ){
+ if( regions )
+ {
mesh_bind( &world->mesh_no_collide );
u32 last_material = 0;
- for( u32 i=0; i<af_arrcount(&world->ent_region); i ++ ){
+ for( u32 i=0; i<af_arrcount(&world->ent_region); i ++ )
+ {
shader_scene_fxglow_uUvOffset( (v2f){ 0.0f, 0.0f } );
ent_region *region = af_arritm( &world->ent_region, i );
mesh_bind( &world->mesh_no_collide );
pass.geo_type = k_world_geo_type_nonsolid;
render_world_override_pass( world, &pass, mmdl, mnormal, mpvm_prev );
+
+ //render_world_fxglow( world, world, cam, mmdl, 0, 0, 1 );
glEnable( GL_CULL_FACE );
}