X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=respawn.c;fp=respawn.c;h=a8727fc3e213429fb23113e5438be433978f9ace;hb=bf9f3897d358cb6c417e28d659bb412344a52bc3;hp=98b9bcd43ba07cc0d3a1a33866f1771c3e63c188;hpb=f2c3e6ffba0231be14961f0149106cecbade8124;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/respawn.c b/respawn.c index 98b9bcd..a8727fc 100644 --- a/respawn.c +++ b/respawn.c @@ -215,6 +215,9 @@ VG_STATIC void respawn_chooser_shader_uniforms(void){ if( respawn_chooser.spawn ) v3_copy( respawn_chooser.spawn->transform.co, uSpawnPos ); + uPlayerPos[3] = v3_dist(uPlayerPos,uSpawnPos); + uSpawnPos[3] = 1.0f/uPlayerPos[3]; + shader_scene_override_uPlayerPos( uPlayerPos ); shader_scene_override_uSpawnPos( uSpawnPos ); }