From a58dbb9081a08b01931badd953ed1fe6cd5bd1c7 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 11 Feb 2023 17:56:56 -0800 Subject: Fix IBL cubemap coordinate system and put position-normal-tangent in world space in CookTorrance. --- gltfview/src/game.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'gltfview/src/game.c') diff --git a/gltfview/src/game.c b/gltfview/src/game.c index 1db7cba..f822b08 100644 --- a/gltfview/src/game.c +++ b/gltfview/src/game.c @@ -70,8 +70,8 @@ static Texture* load_environment_map(RenderBackend* render_backend) { mstring_make("/assets/skybox/clouds1/clouds1_west.bmp"), mstring_make("/assets/skybox/clouds1/clouds1_up.bmp"), mstring_make("/assets/skybox/clouds1/clouds1_down.bmp"), - mstring_make("/assets/skybox/clouds1/clouds1_north.bmp"), - mstring_make("/assets/skybox/clouds1/clouds1_south.bmp")} + mstring_make("/assets/skybox/clouds1/clouds1_south.bmp"), + mstring_make("/assets/skybox/clouds1/clouds1_north.bmp")} }); } @@ -222,7 +222,7 @@ bool game_new(Game* game, int argc, const char** argv) { // false}); const bool play_result = gfx_play_animation( anima, &(AnimationPlaySettings){.name = "Walk", .loop = true}); - assert(play_result); + // assert(play_result); return true; @@ -251,6 +251,15 @@ void game_update(Game* game, double t, double dt) { /*radius=*/2.5, /*azimuth=*/t * 0.5, /*zenith=*/0); spatial3_lookat(&camera->spatial, orbit_point); + + // spatial3_set_position(&camera->spatial, vec3_make(0, 0, 2)); + // spatial3_lookat(&camera->spatial, vec3_make(0, 0, -1)); + + // spatial3_orbit( + // &camera->spatial, vec3_make(0, 0, 0), + // /*radius=*/2.5, + // /*azimuth=*/t * 0.2, /*zenith=*/0); + // spatial3_lookat(&camera->spatial, vec3_make(0, 0, 0)); } void game_render(const Game* game) { -- cgit v1.2.3