diff --git a/demos/html5/MAKE.bat b/demos/html5/MAKE.bat
index ed720c9..d34226c 100644
--- a/demos/html5/MAKE.bat
+++ b/demos/html5/MAKE.bat
@@ -32,7 +32,7 @@ exit
:windows
-if "%1"=="" MAKE.bat demo_ui.c
+if "%1"=="" MAKE.bat demo_collide.c
del index.html 2>NUL >NUL
del index.worker.js 2>NUL >NUL
diff --git a/demos/html5/demo_collide.c b/demos/html5/demo_collide.c
index a345a20..56b9368 100644
--- a/demos/html5/demo_collide.c
+++ b/demos/html5/demo_collide.c
@@ -9,7 +9,6 @@
int paused;
camera_t cam;
-skybox_t sky;
void game_loop(void *userdata) {
// key handler
@@ -611,8 +610,6 @@ int main(void) {
// camera that points to origin
cam = camera();
- sky = skybox(0, 0);
-
// main loop
window_loop(game_loop, NULL);
}
diff --git a/engine/art/shaders/fs_3_4_skybox_rayleigh.glsl b/engine/art/shaders/fs_3_4_skybox_rayleigh.glsl
index 6933fa0..f0ce359 100644
--- a/engine/art/shaders/fs_3_4_skybox_rayleigh.glsl
+++ b/engine/art/shaders/fs_3_4_skybox_rayleigh.glsl
@@ -1,4 +1,4 @@
-uniform vec3 uSunPos = vec3( 0, 0.1, -1 ); // = [0, Math.cos(theta) * 0.3 + 0.2, -1];
+uniform vec3 uSunPos;// = vec3( 0, 0.1, -1 ); // = [0, Math.cos(theta) * 0.3 + 0.2, -1];
in vec3 v_direction;
diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h
index bb29233..7f4a6fb 100644
--- a/engine/joint/v4k.h
+++ b/engine/joint/v4k.h
@@ -333729,7 +333729,7 @@ void vfs_reload() {
array_resize(vfs_entries, 0); // @leak
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
-#if 0
+#if defined(EMSCRIPTEN)
for( int i = 0; i < JOBS_MAX; ++i) {
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
@@ -341700,6 +341700,10 @@ skybox_t skybox(const char *asset, int flags) {
sky.cubemap = cubemap6( images, 0 );
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
}
+ } else {
+ // set up mie defaults
+ shader_bind(sky.program);
+ shader_vec3("uSunPos", vec3( 0, 0.1, -1 ));
}
return sky;
diff --git a/engine/split/v4k_file.c b/engine/split/v4k_file.c
index 56c6079..49be99b 100644
--- a/engine/split/v4k_file.c
+++ b/engine/split/v4k_file.c
@@ -515,7 +515,7 @@ void vfs_reload() {
array_resize(vfs_entries, 0); // @leak
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
-#if 0
+#if defined(EMSCRIPTEN)
for( int i = 0; i < JOBS_MAX; ++i) {
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c
index 3bebe9c..728d34a 100644
--- a/engine/split/v4k_render.c
+++ b/engine/split/v4k_render.c
@@ -2395,6 +2395,10 @@ skybox_t skybox(const char *asset, int flags) {
sky.cubemap = cubemap6( images, 0 );
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
}
+ } else {
+ // set up mie defaults
+ shader_bind(sky.program);
+ shader_vec3("uSunPos", vec3( 0, 0.1, -1 ));
}
return sky;
diff --git a/engine/v4k.c b/engine/v4k.c
index 1fbe36b..98ff3c9 100644
--- a/engine/v4k.c
+++ b/engine/v4k.c
@@ -4637,7 +4637,7 @@ void vfs_reload() {
array_resize(vfs_entries, 0); // @leak
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
-#if 0
+#if defined(EMSCRIPTEN)
for( int i = 0; i < JOBS_MAX; ++i) {
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
@@ -12608,6 +12608,10 @@ skybox_t skybox(const char *asset, int flags) {
sky.cubemap = cubemap6( images, 0 );
for( int i = 0; i < countof(images); ++i ) image_destroy(&images[i]);
}
+ } else {
+ // set up mie defaults
+ shader_bind(sky.program);
+ shader_vec3("uSunPos", vec3( 0, 0.1, -1 ));
}
return sky;