From 53b63dff586d6178bd7ed8051f704f8280766553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Mon, 11 Sep 2023 13:38:43 +0200 Subject: [PATCH] update sponza demo with day/night cycle --- demos/99-sponza.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/99-sponza.c b/demos/99-sponza.c index 6a23cc9..2ddf155 100644 --- a/demos/99-sponza.c +++ b/demos/99-sponza.c @@ -39,7 +39,7 @@ int main() { // initialize SH coefficients from rayleigh skybox if (flag("--mie") && sky_update_until <= window_time()) { shader_bind(sky.program); - shader_vec3("uSunPos", cam.position); + shader_vec3("uSunPos", vec3(0, (cosf((float)window_time())*0.3)+0.2, -1)); skybox_mie_calc_sh(&sky); sky_update_until = window_time() + 0.02; }