commit 88fe552020fcc577d44a85bf8aad172b4c40a3e5 parent 7fcdf2ccca64629b437bc90ba25b4473ca8a462d Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Jul 9 11:39:00 +0300 And another Diffstat:
hm.cc | | | 1 | + |
diff --git a/hm.cc b/hm.cc @@ -196,6 +196,7 @@ GAME_FRAME( game_frame ) { m4 P = m4_perspective( VERTICAL_FOV, get_aspect_ratio(), NEAR_PLANE_DEPTH, FAR_PLANE_DEPTH ); m4 V = m4_view( forward, right, up, game->pos ); m4 Vsky = m4_view( forward, right, up, v3( 0 ) ); + v3 sun_dir = v3( -cosf( game->sun_angle ), 0, sinf( game->sun_angle ) ); skybox_render( &game->skybox, Vsky, P, sun_dir ); terrain_render( &game->tm, V, P, game->sun_angle, sun_dir, current_time );