summaryrefslogtreecommitdiff
path: root/gltfview
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2023-02-11 17:56:56 -0800
committer3gg <3gg@shellblade.net>2023-02-11 17:56:56 -0800
commita58dbb9081a08b01931badd953ed1fe6cd5bd1c7 (patch)
treea335076f364bdd28d341c3ef2dac318bd0d447a6 /gltfview
parent53582d2a90fb72e02056612163239b3b3f62eb4a (diff)
Fix IBL cubemap coordinate system and put position-normal-tangent in world space in CookTorrance.
Diffstat (limited to 'gltfview')
-rw-r--r--gltfview/src/game.c15
1 files changed, 12 insertions, 3 deletions
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) {
70 mstring_make("/assets/skybox/clouds1/clouds1_west.bmp"), 70 mstring_make("/assets/skybox/clouds1/clouds1_west.bmp"),
71 mstring_make("/assets/skybox/clouds1/clouds1_up.bmp"), 71 mstring_make("/assets/skybox/clouds1/clouds1_up.bmp"),
72 mstring_make("/assets/skybox/clouds1/clouds1_down.bmp"), 72 mstring_make("/assets/skybox/clouds1/clouds1_down.bmp"),
73 mstring_make("/assets/skybox/clouds1/clouds1_north.bmp"), 73 mstring_make("/assets/skybox/clouds1/clouds1_south.bmp"),
74 mstring_make("/assets/skybox/clouds1/clouds1_south.bmp")} 74 mstring_make("/assets/skybox/clouds1/clouds1_north.bmp")}
75 }); 75 });
76} 76}
77 77
@@ -222,7 +222,7 @@ bool game_new(Game* game, int argc, const char** argv) {
222 // false}); 222 // false});
223 const bool play_result = gfx_play_animation( 223 const bool play_result = gfx_play_animation(
224 anima, &(AnimationPlaySettings){.name = "Walk", .loop = true}); 224 anima, &(AnimationPlaySettings){.name = "Walk", .loop = true});
225 assert(play_result); 225 // assert(play_result);
226 226
227 return true; 227 return true;
228 228
@@ -251,6 +251,15 @@ void game_update(Game* game, double t, double dt) {
251 /*radius=*/2.5, 251 /*radius=*/2.5,
252 /*azimuth=*/t * 0.5, /*zenith=*/0); 252 /*azimuth=*/t * 0.5, /*zenith=*/0);
253 spatial3_lookat(&camera->spatial, orbit_point); 253 spatial3_lookat(&camera->spatial, orbit_point);
254
255 // spatial3_set_position(&camera->spatial, vec3_make(0, 0, 2));
256 // spatial3_lookat(&camera->spatial, vec3_make(0, 0, -1));
257
258 // spatial3_orbit(
259 // &camera->spatial, vec3_make(0, 0, 0),
260 // /*radius=*/2.5,
261 // /*azimuth=*/t * 0.2, /*zenith=*/0);
262 // spatial3_lookat(&camera->spatial, vec3_make(0, 0, 0));
254} 263}
255 264
256void game_render(const Game* game) { 265void game_render(const Game* game) {